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 194917 - NoClassDefFoundError: Could not initialize class java.awt.dnd.DragSource due to CLIOptions2$EQStuck: GUI is not responsive
Summary: NoClassDefFoundError: Could not initialize class java.awt.dnd.DragSource due ...
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Launchers&CLI (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Jesse Glick
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 179597
  Show dependency tree
 
Reported: 2011-01-31 15:36 UTC by rogerjose81
Modified: 2011-06-10 18:26 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 57419


Attachments
stacktrace (1.82 KB, text/plain)
2011-01-31 15:36 UTC, rogerjose81
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rogerjose81 2011-01-31 15:36:34 UTC
Build: NetBeans IDE 7.0 Beta (Build 201011152355)
VM: Java HotSpot(TM) Client VM, 17.1-b03, Java(TM) SE Runtime Environment, 1.6.0_22-b04
OS: Windows XP

User Comments:
GUEST: Starting NetBean 6 7 Beta




Stacktrace: 
java.lang.NoClassDefFoundError: Could not initialize class java.awt.dnd.DragSource
   at org.netbeans.core.ui.warmup.DnDWarmUpTask.run(DnDWarmUpTask.java:62)
   at org.netbeans.core.WarmUpSupport.run(WarmUpSupport.java:90)
   at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
   at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1960)
Comment 1 rogerjose81 2011-01-31 15:36:38 UTC
Created attachment 105524 [details]
stacktrace
Comment 2 Jaroslav Tulach 2011-04-15 07:54:52 UTC
org.netbeans.core.CLIOptions2$EQStuck: GUI is not responsive
at java.lang.Object.wait(Native Method)
at java.awt.MediaTracker.waitForAll(MediaTracker.java:419)
at java.awt.MediaTracker.waitForAll(MediaTracker.java:375)
at sun.awt.CustomCursor.<init>(CustomCursor.java:34)
at sun.awt.windows.WCustomCursor.<init>(WCustomCursor.java:28)
at sun.awt.windows.WToolkit.createCustomCursor(WToolkit.java:710)
at java.awt.Cursor$1.run(Cursor.java:323)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Cursor.getSystemCustomCursor(Cursor.java:317)
at sun.awt.windows.WToolkit.lazilyLoadDesktopProperty(WToolkit.java:793)
at java.awt.Toolkit.getDesktopProperty(Toolkit.java:1746)
at java.awt.dnd.DragSource.load(DragSource.java:119)
at java.awt.dnd.DragSource.<clinit>(DragSource.java:135)


This causes the DragSource class not be fully initialized and later it causes NCDFE.
Comment 3 Jaroslav Tulach 2011-04-15 07:58:48 UTC
I suspect this has something to do with warmup, but it would be nice, if the EQStuck could print out stacktraces before sending the Thread.stop signal.
Comment 4 Jesse Glick 2011-04-15 18:01:45 UTC
It does:

INFO [org.netbeans.core.CLIOptions2]
org.netbeans.core.CLIOptions2$EQStuck: GUI is not responsive
	at java.lang.Object.wait(Native Method)
	at java.awt.MediaTracker.waitForAll(MediaTracker.java:419)
	at java.awt.MediaTracker.waitForAll(MediaTracker.java:375)
	at sun.awt.CustomCursor.<init>(CustomCursor.java:34)
	at sun.awt.windows.WCustomCursor.<init>(WCustomCursor.java:28)
	at sun.awt.windows.WToolkit.createCustomCursor(WToolkit.java:710)
	at java.awt.Cursor$1.run(Cursor.java:323)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.Cursor.getSystemCustomCursor(Cursor.java:317)
	at sun.awt.windows.WToolkit.lazilyLoadDesktopProperty(WToolkit.java:793)
	at java.awt.Toolkit.getDesktopProperty(Toolkit.java:1746)
	at java.awt.dnd.DragSource.load(DragSource.java:119)
	at java.awt.dnd.DragSource.<clinit>(DragSource.java:135)
	at org.openide.explorer.view.ExplorerDragSupport.getDefaultGestureRecognizer(ExplorerDragSupport.java:251)
	at org.openide.explorer.view.ExplorerDragSupport.activate(ExplorerDragSupport.java:230)
	at org.openide.explorer.view.TreeView.setDragSource(TreeView.java:486)
	at org.netbeans.modules.project.ui.ProjectTab.<init>(ProjectTab.java:180)

Something wrong with AWT, I guess. (No events posted in ten seconds.)

However this points to the issue that the EQ recovery needs to be skipped in case the call stack includes a static initializer. The timeout probably also should be increased.
Comment 5 Jesse Glick 2011-04-15 18:37:04 UTC
core-main #9e226fae13f8
Comment 6 Jaroslav Tulach 2011-04-16 06:18:41 UTC
Check for <cinit> is good idea.
Comment 7 Quality Engineering 2011-04-16 08:39:03 UTC
Integrated into 'main-golden', will be available in build *201104160401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/9e226fae13f8
User: Jesse Glick <jglick@netbeans.org>
Log: #194917: NoClassDefFoundError: Could not initialize class java.awt.dnd.DragSource due to CLIOptions2$EQStuck: GUI is not responsive
Do not stop EQ when inside a statjc initializer, as it can lead to later NCDFE's.
(Try interrupting the thread, which could be enough in some cases.)
Also increasing timeout a bit from ten to fifteen seconds.