This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I am getting the following assertion error and our local NetBeans expert told me to ask the NetBeans palette engineer look at it. This occurs when a dynamically created Item and Category is dragged. (CR 6468962) Any ideas? java.lang.AssertionError at org.netbeans.modules.palette.ItemNode.getTransferableProvider(ItemNode.java:144) at org.netbeans.modules.palette.ItemNode.customizeTransferable(ItemNode.java:126) at org.netbeans.modules.palette.ItemNode.drag(ItemNode.java:110) at org.netbeans.modules.palette.DefaultItem.drag(DefaultItem.java:90) at org.netbeans.modules.palette.ui.DnDSupport.dragGestureRecognized(DnDSupport.java:136) at java.awt.dnd.DragGestureRecognizer.fireDragGestureRecognized(DragGestureRecognizer.java:339) at sun.awt.windows.WMouseDragGestureRecognizer.mouseDragged(WMouseDragGestureRecognizer.java:202) at java.awt.AWTEventMulticaster.mouseDragged(AWTEventMulticaster.java:262) at java.awt.AWTEventMulticaster.mouseDragged(AWTEventMulticaster.java:261) at java.awt.Component.processMouseMotionEvent(Component.java:5536) at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3144) at java.awt.Component.processEvent(Component.java:5257) at java.awt.Container.processEvent(Container.java:1966) at java.awt.Component.dispatchEventImpl(Component.java:3955) at java.awt.Container.dispatchEventImpl(Container.java:2024) at java.awt.Component.dispatchEvent(Component.java:3803) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3909) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822) at java.awt.Container.dispatchEventImpl(Container.java:2010) at java.awt.Window.dispatchEventImpl(Window.java:1774) at java.awt.Component.dispatchEvent(Component.java:3803) at java.awt.EventQueue.dispatchEvent(EventQueue.java:463) [catch] at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
the assertion at that line says that your category node has no parent as if it didn't belong into palette's root node. the palette module looks for DragAndDropHandler in palette's root node when a drag operation is initiated.
So why does the AssertionError occur the first time, but if I repeat the drag again, it works fine? Also, I looked at my code and the category is created in the system filesystem with the right palette root node. Do you want to reproduce the problem? Peter says you have access to bugster, see bug id.
Forgot to reopen issue. Is that the proceedure?
i can't reproduce the bug because i don't have the visual web pack and the component library. i can change the assertions in the common palette module into "if null" checks. but there clearly is some issue in your component library code as there's the npe being thrown as the first part of the bugster description says.
please let me know if you want the assertions removed from release55 branch
I fixed another bug and this assertion failure went away. That other bug was a race condition associated with creating palette items via FileObjects and having the another thread get empty files sometimes. Sorry, I forgot to update this issue, but it can be closed.
It happened again so I'm investigating it some more. Will keep you updated.
The palette was being refreshed during a drag operation so new Category-s were created in the middle so the old Category had a null parent.