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.

Bug 84744 - Assertion error in palette code
Summary: Assertion error in palette code
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Palette (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-12 22:48 UTC by _ edwingo
Modified: 2008-12-23 00:41 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ edwingo 2006-09-12 22:48:20 UTC
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)
Comment 1 Stanislav Aubrecht 2006-09-13 10:08:27 UTC
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.
Comment 2 _ edwingo 2006-09-13 17:29:37 UTC
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.
Comment 3 _ edwingo 2006-09-13 17:31:08 UTC
Forgot to reopen issue. Is that the proceedure?
Comment 4 Stanislav Aubrecht 2006-09-14 16:53:13 UTC
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.
Comment 5 Stanislav Aubrecht 2006-09-18 12:11:17 UTC
please let me know if you want the assertions removed from release55 branch
Comment 6 _ edwingo 2006-09-18 16:58:06 UTC
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.
Comment 7 _ edwingo 2006-09-19 19:54:51 UTC
It happened again so I'm investigating it some more. Will keep you updated.
Comment 8 _ edwingo 2006-09-20 23:07:53 UTC
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.