JDK-8096792 : NPE using the auto-suggest editors
  • Type: Bug
  • Component: javafx
  • Sub-Component: tools-scenebuilder
  • Affected Version: 8u40
  • Priority: P2
  • Status: Resolved
  • Resolution: Cannot Reproduce
  • Submitted: 2014-06-13
  • Updated: 2015-06-12
  • Resolved: 2014-08-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8u40Resolved
Related Reports
Blocks :  
Duplicate :  
Description
Drop a Button
From the inspector, click in the style property first TextField, and enter 'fill'
Select '-fx-text-fill'
The following NPE is raised:

java.lang.NullPointerException
	at com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.StyleEditor$StyleItem.getValue(StyleEditor.java:330)
	at com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.StyleEditor$StyleItem.lambda$0(StyleEditor.java:256)
	at com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.StyleEditor$StyleItem$$Lambda$563/1310439762.handle(Unknown Source)
	at com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.InspectorPanelController.lambda$8(InspectorPanelController.java:1178)
	at com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.InspectorPanelController$$Lambda$539/1925236360.changed(Unknown Source)
	at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:182)
	at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81)
	at javafx.beans.property.BooleanPropertyBase.fireValueChangedEvent(BooleanPropertyBase.java:103)
	at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:110)
	at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:143)
	at javafx.beans.property.BooleanProperty.setValue(BooleanProperty.java:77)
	at com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.InlineListEditor.editing(InlineListEditor.java:90)
	at com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.StyleEditor$StyleItem.lambda$2(StyleEditor.java:293)

Comments
Cannot reproduce anymore with Java 8u40 b02
26-08-2014

I got the same exception using the Style property. I also got the exception below however I don't know if it's related. ao��t 19, 2014 12:29:24 PM com.oracle.javafx.scenebuilder.app.SceneBuilderApp$SceneBuilderUncaughtExceptionHandler uncaughtException GRAVE: An exception was thrown: java.lang.NullPointerException at com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.StyleEditor$StyleItem.lambda$initialize$186(StyleEditor.java:276) at com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.StyleEditor$StyleItem$$Lambda$564/116361495.changed(Unknown Source) at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:361) at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81) at javafx.scene.control.TextInputControl$TextProperty.fireValueChangedEvent(TextInputControl.java:1123) at javafx.scene.control.TextInputControl$TextProperty.markInvalid(TextInputControl.java:1127) at javafx.scene.control.TextInputControl$TextProperty.invalidate(TextInputControl.java:1066) at javafx.scene.control.TextInputControl$TextProperty.access$1300(TextInputControl.java:1038) at javafx.scene.control.TextInputControl.lambda$new$163(TextInputControl.java:134) at javafx.scene.control.TextInputControl$$Lambda$123/1015607104.invalidated(Unknown Source) at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:137) at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81) at javafx.scene.control.TextField$TextFieldContent.insert(TextField.java:88) at javafx.scene.control.TextInputControl.replaceText(TextInputControl.java:467) at com.sun.javafx.scene.control.skin.TextFieldSkin.replaceText(TextFieldSkin.java:576) at com.sun.javafx.scene.control.behavior.TextFieldBehavior.replaceText(TextFieldBehavior.java:191) at com.sun.javafx.scene.control.behavior.TextInputControlBehavior.defaultKeyTyped(TextInputControlBehavior.java:250) at com.sun.javafx.scene.control.behavior.TextInputControlBehavior.callAction(TextInputControlBehavior.java:147) at com.sun.javafx.scene.control.behavior.BehaviorBase.callActionForEvent(BehaviorBase.java:218) at com.sun.javafx.scene.control.behavior.TextInputControlBehavior.callActionForEvent(TextInputControlBehavior.java:135) at com.sun.javafx.scene.control.behavior.BehaviorBase.lambda$new$74(BehaviorBase.java:135) at com.sun.javafx.scene.control.behavior.BehaviorBase$$Lambda$303/429230827.handle(Unknown Source) at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218) at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80) 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.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$KeyHandler.process(Scene.java:3931) at javafx.scene.Scene$KeyHandler.access$1800(Scene.java:3877) at javafx.scene.Scene.impl_processKeyEvent(Scene.java:2006) at javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.java:2468) at com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:197) at com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:147) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleKeyEvent(GlassViewEventHandler.java:227) at com.sun.glass.ui.View.handleKeyEvent(View.java:544) at com.sun.glass.ui.View.notifyKey(View.java:954)
19-08-2014

I was not able to reproduce the issue in a separate test case. SB should be used to reproduce.
19-06-2014

The issue has a wider scope: all the inspector editors based on a suggested list (SuggestedEditor) are impacted: Layout width/height, fx:id, style/styleClass, ... As soon as a text field string matches to a single item in the list view, and this item is selected, the NPE is raised.
19-06-2014

Seems to be caused by a regression in RT 8u20, no issue with the same SB code on RT 8. On the suggested list ListView, the getSelectedItem() returns null, instead of the selected string. We should try to reproduce in a simple test case.
19-06-2014