Skip to content

NPE when URL value tag is used without java.net.* import #54

@gluon-bot

Description

@gluon-bot

Originally reported by: Andre Krause (Bitbucket: akrause, GitHub: akrause)


If a tag is used within the fxml without importing the java.net.* package, a NPE is thrown if you want to open the Properties tab on the right side bar. The SB is not usable anymore after this exception.

The following NPE is thrown:

#!java

java.lang.NullPointerException
	at com.oracle.javafx.scenebuilder.kit.metadata.util.PrefixedValue.getPrefixedValueType(PrefixedValue.java:239)
	at com.oracle.javafx.scenebuilder.kit.metadata.util.PrefixedValue.<init>(PrefixedValue.java:67)
	at com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.StylesheetEditor.getType(StylesheetEditor.java:361)
	at com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.StylesheetEditor.getType(StylesheetEditor.java:348)
	at com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.StylesheetEditor.setValue(StylesheetEditor.java:158)
	at com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.InspectorPanelController.setEditorValueFromSelection(InspectorPanelController.java:1340)
	at com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.InspectorPanelController.getInitializedPropertyEditor(InspectorPanelController.java:800)
	at com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.InspectorPanelController.buildSection(InspectorPanelController.java:769)
	at com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.InspectorPanelController.buildExpandedSection(InspectorPanelController.java:692)
	at com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.InspectorPanelController.rebuild(InspectorPanelController.java:657)
	at com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.InspectorPanelController.updateInspector(InspectorPanelController.java:606)
	at com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.InspectorPanelController.editorSelectionDidChange(InspectorPanelController.java:533)
	at com.oracle.javafx.scenebuilder.kit.editor.panel.util.AbstractPanelController.lambda$new$25(AbstractPanelController.java:231)
	at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:361)
	at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81)
	at javafx.beans.property.IntegerPropertyBase.fireValueChangedEvent(IntegerPropertyBase.java:106)
	at javafx.beans.property.IntegerPropertyBase.markInvalid(IntegerPropertyBase.java:113)
	at javafx.beans.property.IntegerPropertyBase.set(IntegerPropertyBase.java:147)
	at com.oracle.javafx.scenebuilder.kit.editor.selection.Selection.incrementRevision(Selection.java:506)
	at com.oracle.javafx.scenebuilder.kit.editor.selection.Selection.endUpdate(Selection.java:454)
	at com.oracle.javafx.scenebuilder.kit.editor.selection.Selection.select(Selection.java:370)
	at com.oracle.javafx.scenebuilder.kit.editor.selection.Selection.select(Selection.java:101)
	at com.oracle.javafx.scenebuilder.kit.editor.selection.Selection.select(Selection.java:90)
	at com.oracle.javafx.scenebuilder.kit.editor.panel.content.gesture.mouse.SelectAndMoveGesture.mousePressed(SelectAndMoveGesture.java:122)
	at com.oracle.javafx.scenebuilder.kit.editor.panel.content.gesture.mouse.AbstractMouseDragGesture.start(AbstractMouseDragGesture.java:103)
	at com.oracle.javafx.scenebuilder.kit.editor.panel.content.mode.EditModeController.activateGesture(EditModeController.java:927)
	at com.oracle.javafx.scenebuilder.kit.editor.panel.content.mode.EditModeController.mousePressedOnGlassLayer(EditModeController.java:702)
	at com.oracle.javafx.scenebuilder.kit.editor.panel.content.mode.EditModeController.lambda$new$12(EditModeController.java:537)
	at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
	at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
	at javafx.event.Event.fireEvent(Event.java:198)
	at javafx.scene.Scene$MouseHandler.process(Scene.java:3757)
	at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3485)
	at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762)
	at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2494)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:352)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:275)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$355(GlassViewEventHandler.java:388)
	at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:387)
	at com.sun.glass.ui.View.handleMouseEvent(View.java:555)
	at com.sun.glass.ui.View.notifyMouse(View.java:937)
	at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at com.sun.glass.ui.win.WinApplication.lambda$null$149(WinApplication.java:191)
	at java.lang.Thread.run(Thread.java:745)

I tested it with the attached fxml.

From Saxonia Systems.


Metadata

Metadata

Labels

bugSomething isn't workingmajor

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions