Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8123895

Using drop-down menus with child menus can cause NPE

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Cannot Reproduce
    • Affects Version/s: 8
    • Fix Version/s: 8
    • Component/s: javafx

      Description

      Steps to reproduce:

      - Execute helloworld.HelloSanity
      - Select "Tabs and Menus"
      - Play with the menus, particularly debug menu which has child/submenus

      Soon enough you will see an NPE:

      Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
      at com.sun.javafx.tk.quantum.PopupScene.sceneChanged(PopupScene.java:43)
      at com.sun.javafx.tk.quantum.GlassScene.setStage(GlassScene.java:265)
      at com.sun.javafx.tk.quantum.ViewScene.setStage(ViewScene.java:69)
      at com.sun.javafx.tk.quantum.GlassStage.setScene(GlassStage.java:88)
      at com.sun.javafx.tk.quantum.WindowStage.setScene(WindowStage.java:191)
      at javafx.stage.Window$9.invalidated(Window.java:732)
      at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:109)
      at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:143)
      at javafx.stage.Window.setShowing(Window.java:799)
      at javafx.stage.Window.show(Window.java:814)
      at javafx.stage.PopupWindow.showImpl(PopupWindow.java:403)
      at javafx.stage.PopupWindow.show(PopupWindow.java:348)
      at javafx.scene.control.ContextMenu.doShow(ContextMenu.java:281)
      at javafx.scene.control.ContextMenu.show(ContextMenu.java:255)
      at com.sun.javafx.scene.control.skin.ContextMenuContent.showSubmenu(ContextMenuContent.java:854)
      at com.sun.javafx.scene.control.skin.ContextMenuContent.access$1900(ContextMenuContent.java:94)
      at com.sun.javafx.scene.control.skin.ContextMenuContent$8.changed(ContextMenuContent.java:807)
      at com.sun.javafx.scene.control.skin.ContextMenuContent$8.changed(ContextMenuContent.java:799)
      at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:347)
      at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
      at javafx.beans.property.ReadOnlyBooleanWrapper$ReadOnlyPropertyImpl.fireValueChangedEvent(ReadOnlyBooleanWrapper.java:178)
      at javafx.beans.property.ReadOnlyBooleanWrapper$ReadOnlyPropertyImpl.access$100(ReadOnlyBooleanWrapper.java:148)
      at javafx.beans.property.ReadOnlyBooleanWrapper.fireValueChangedEvent(ReadOnlyBooleanWrapper.java:144)
      at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:110)
      at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:143)
      at javafx.scene.control.Menu.setShowing(Menu.java:180)
      at javafx.scene.control.Menu.show(Menu.java:376)
      at com.sun.javafx.scene.control.skin.ContextMenuContent$MenuItemContainer$4.handle(ContextMenuContent.java:1226)
      at com.sun.javafx.scene.control.skin.ContextMenuContent$MenuItemContainer$4.handle(ContextMenuContent.java:1216)
      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.EventUtil.fireEventImpl(EventUtil.java:74)
      at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
      at javafx.event.Event.fireEvent(Event.java:203)
      at com.sun.javafx.event.EventQueue.fire(EventQueue.java:48)
      at javafx.scene.Scene$MouseHandler.handleEnterExit(Scene.java:3459)
      at javafx.scene.Scene$MouseHandler.process(Scene.java:3581)
      at javafx.scene.Scene$MouseHandler.process(Scene.java:3374)
      at javafx.scene.Scene$MouseHandler.access$1900(Scene.java:3326)
      at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1617)
      at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2394)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:312)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:237)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:354)
      at com.sun.glass.ui.View.handleMouseEvent(View.java:514)
      at com.sun.glass.ui.View.notifyMouse(View.java:877)
      at com.sun.glass.ui.lens.LensView._notifyMouse(LensView.java:164)
      at com.sun.glass.ui.lens.LensApplication$LensMouseEvent.dispatch(LensApplication.java:374)
      at com.sun.glass.ui.lens.LensApplication._runLoop(LensApplication.java:756)
      at com.sun.glass.ui.lens.LensApplication.access$700(LensApplication.java:55)
      at com.sun.glass.ui.lens.LensApplication$4.run(LensApplication.java:815)
      at java.lang.Thread.run(Thread.java:724)
      java.lang.NullPointerException
      at com.sun.javafx.tk.quantum.PopupScene.sceneChanged(PopupScene.java:43)
      at com.sun.javafx.tk.quantum.GlassScene.markDirty(GlassScene.java:210)
      at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2317)
      at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:325)
      at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:533)
      at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:513)
      at com.sun.javafx.tk.quantum.QuantumToolkit$16.run(QuantumToolkit.java:380)
      at com.sun.glass.ui.lens.LensApplication$RunnableEvent.dispatch(LensApplication.java:169)
      at com.sun.glass.ui.lens.LensApplication._runLoop(LensApplication.java:756)
      at com.sun.glass.ui.lens.LensApplication.access$700(LensApplication.java:55)
      at com.sun.glass.ui.lens.LensApplication$4.run(LensApplication.java:815)
      at java.lang.Thread.run(Thread.java:724)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                psomashe Parvathi Somashekar (Inactive)
                Reporter:
                kselle Lisa Selle (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved:
                  Imported: