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 193128 - InterruptedException at java.lang.Object.wait
Summary: InterruptedException at java.lang.Object.wait
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 7.0
Hardware: All All
: P2 normal (vote)
Assignee: Andrew Krasny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-09 12:06 UTC by Exceptions Reporter
Modified: 2010-12-20 16:37 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 173426


Attachments
stacktrace (6.92 KB, text/plain)
2010-12-09 12:06 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2010-12-09 12:06:20 UTC
This issue was reported manually by vv159170.
It already has 1 duplicates 


Build: NetBeans IDE 7.0 M2 (Build 201010151251)
VM: Java HotSpot(TM) 64-Bit Server VM, 17.0-b17, Java(TM) SE Runtime Environment, 1.6.0_21-b07
OS: Windows 7

Stacktrace: 
java.lang.InterruptedException
   at java.lang.Object.wait(Object.java:0)
   at java.lang.Object.wait(Object.java:485)
   at java.awt.EventQueue.invokeAndWait(EventQueue.java:993)
   at org.openide.util.Mutex.doEventAccess(Mutex.java:1391)
   at org.openide.util.Mutex.readAccess(Mutex.java:271)
   at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:1013)
Comment 1 Exceptions Reporter 2010-12-09 12:06:23 UTC
Created attachment 103832 [details]
stacktrace
Comment 2 Vladimir Voskresensky 2010-12-15 21:54:38 UTC
let's evaluate exceptions as P2 issues
Comment 3 Quality Engineering 2010-12-17 06:20:54 UTC
Integrated into 'main-golden', will be available in build *201012170001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/75396df19965
User: Alexander Simon <alexvsimon@netbeans.org>
Log: refactoring for Bug #193128 InterruptedException at java.lang.Object.wait
Comment 4 Andrew Krasny 2010-12-20 15:33:33 UTC
The root cause of this exception is that interrupted thread was waiting for a modal dialog... 

With http://hg.netbeans.org/cnd-main/rev/09f00d0fe453
all places where Dialog's setVisible(true) is invoked for a modal dialog were modified to follow this pattern:

DialogDescriptor dd = ... 
Dialog d = DialogDisplayer.getDefault().createDialog(dd);

try {
   dialog.setVisible(true);
} catch (Throwable th) {
   if (!(th.getCause() instanceof InterruptedException)) {
      throw new RuntimeException(th);
   }
   dd.setValue(DialogDescriptor.CANCEL_OPTION);
} finally {
   dialog.dispose();
}