FULL PRODUCT VERSION :
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 10.0.15063]
A DESCRIPTION OF THE PROBLEM :
I reported bug JDK-8178299 but the bug was marked resolved even though it has not been. I have posted a minimal code example here:
http://kunstmusik.com/TestJFXDragAndDrop.zip
This zip file contains a barebones Netbeans Rich Client Platform application that contains a JFXDragDropTestTopComponent class. If you load this project in Netbeans 8.2, then run it, the application starts. When you try to drag and drop, the first time there is no exception, but every time afterwards it throws exceptions.
Note: A simple test file does not show the behavior (I tried with a Swing JFrame containing a JFXPanel, with the panel containing a JFX TreeView). It does crash everytime with a deep assertion from Quantum though in the above test project.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Unzip project from http://kunstmusik.com/TestJFXDragAndDrop.zip
2. Load project in Netbeans 8.2 that has Rich Client Platform development enabled.
3. Run project.
4. Try to drag and drop the item in the TreeView. It will crash after the first time with the Quantum toolkit assertion error.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Be able to drag and drop using the TreeView within the JFXPanel.
ACTUAL -
Exception thrown.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.lang.AssertionError
at com.sun.javafx.tk.quantum.EmbeddedSceneDnD.createDragboard(EmbeddedSceneDnD.java:134)
at com.sun.javafx.tk.quantum.EmbeddedScene.createDragboard(EmbeddedScene.java:115)
at javafx.scene.Scene$DnDGesture.createDragboard(Scene.java:3288)
at javafx.scene.Scene$DnDGesture.startDrag(Scene.java:3261)
at javafx.scene.Scene$DnDGesture.access$8500(Scene.java:2909)
at javafx.scene.Scene.startDragAndDrop(Scene.java:5776)
at javafx.scene.Node.startDragAndDrop(Node.java:2214)
at blue.ui.core.score.layers.soundObject.UserSoundObjectLibrary.lambda$null$0(UserSoundObjectLibrary.java:101)
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.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$DnDGesture.fireEvent(Scene.java:2933)
at javafx.scene.Scene$DnDGesture.process(Scene.java:3012)
at javafx.scene.Scene$DnDGesture.access$8200(Scene.java:2909)
at javafx.scene.Scene$MouseHandler.process(Scene.java:3773)
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.EmbeddedScene.lambda$null$294(EmbeddedScene.java:256)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.tk.quantum.EmbeddedScene.lambda$mouseEvent$295(EmbeddedScene.java:244)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
[catch] at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(WinApplication.java)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
at java.lang.Thread.run(Thread.java:745)
I have tried using different TransferModes, as mentioned in http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8088234 , but it always fails for me. (My exception stack is also different from what is mentioned in the other bug.)
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.lang.AssertionError
at com.sun.javafx.tk.quantum.EmbeddedSceneDnD.createDragboard(EmbeddedSceneDnD.java:134)
at com.sun.javafx.tk.quantum.EmbeddedScene.createDragboard(EmbeddedScene.java:115)
at javafx.scene.Scene$DnDGesture.createDragboard(Scene.java:3288)
at javafx.scene.Scene$DnDGesture.startDrag(Scene.java:3261)
at javafx.scene.Scene$DnDGesture.access$8500(Scene.java:2909)
at javafx.scene.Scene.startDragAndDrop(Scene.java:5776)
at javafx.scene.Node.startDragAndDrop(Node.java:2214)
at blue.ui.core.score.layers.soundObject.UserSoundObjectLibrary.lambda$null$0(UserSoundObjectLibrary.java:101)
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.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$DnDGesture.fireEvent(Scene.java:2933)
at javafx.scene.Scene$DnDGesture.process(Scene.java:3012)
at javafx.scene.Scene$DnDGesture.access$8200(Scene.java:2909)
at javafx.scene.Scene$MouseHandler.process(Scene.java:3773)
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.EmbeddedScene.lambda$null$294(EmbeddedScene.java:256)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.tk.quantum.EmbeddedScene.lambda$mouseEvent$295(EmbeddedScene.java:244)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
[catch] at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(WinApplication.java)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
at java.lang.Thread.run(Thread.java:745)
REPRODUCIBILITY :
This bug can be reproduced always.