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.
Summary: | Deadlock when starting IDE with previously opened java file | ||
---|---|---|---|
Product: | debugger | Reporter: | Miloslav Metelka <mmetelka> |
Component: | Code | Assignee: | Martin Entlicher <mentlicher> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jglick, mmirilovic, phejl, thurka |
Priority: | P1 | Keywords: | REGRESSION, THREAD |
Version: | 7.1 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 186117 | ||
Attachments: | Thread dump of deadlock |
IMHO you should not call java.lang.Object.wait() in AWT thread, since it can not be guaranteed how long it will take till it's notified... *** Bug 201813 has been marked as a duplicate of this bug. *** *** Bug 201810 has been marked as a duplicate of this bug. *** Happened again on next startup. Could recover IDE by trying to open it again from the shell, thus triggering recovery via CLI: org.netbeans.core.CLIOptions2$EQStuck: GUI is not responsive at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:485) at org.openide.text.CloneableEditor$DoInitialize.initDocument(CloneableEditor.java:708) at org.openide.text.CloneableEditor$DoInitialize.initVisual(CloneableEditor.java:746) at org.openide.text.CloneableEditor.getEditorPane(CloneableEditor.java:1279) at org.netbeans.core.multiview.MultiViewCloneableTopComponent.getEditorPane(MultiViewCloneableTopComponent.java:241) at org.openide.text.CloneableEditorSupport.getRecentPane(CloneableEditorSupport.java:1202) at org.openide.text.NbDocument.findRecentEditorPane(NbDocument.java:398) at org.netbeans.spi.debugger.ui.EditorContextDispatcher$EditorLookupListener.updateCurrentOpenedPane(EditorContextDispatcher.java:660) at org.netbeans.spi.debugger.ui.EditorContextDispatcher$EditorLookupListener.access$300(EditorContextDispatcher.java:533) at org.netbeans.spi.debugger.ui.EditorContextDispatcher$EditorLookupListener$1.run(EditorContextDispatcher.java:605) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) and resulting in: http://statistics.netbeans.org/exceptions/exception.do?id=526819 Looks like this will need a hotfix, so please consider committing with the parent set to the cause of the regression (i.e. update to the changeset of the cause) - this will make it easier for people to pull the hotfix directly into team repos without pulling unrelated and untested baggage. I'm not aware of what has caused the regression, therefore I can not commit the fix to the correct parent. The code in debugger did not change for a long time. Milo, I call NbDocument.findRecentEditorPane(ec) only on EditorCookies that have already a document (I test for ec.getDocument() == null). The condition is: if (ec.getDocument() == null && (ec instanceof EditorCookie.Observable)) { // nothing } else { NbDocument.findRecentEditorPane(ec) } Therefore I'm surprised that it tries to initialize the document. Isn't there some regression? Also issue #186117 suggests that it's really not a good idea to call Object.wait() in AWT. Fixed on debugger side by changeset: 201304:033e6742d23f http://hg.netbeans.org/main/rev/033e6742d23f There were no changes in openide.text and editor either. I guess what might be related are some changes in core.multiview. Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/033e6742d23f User: mentlicher@netbeans.org Log: #201775 Prevent from deadlock, do not call NbDocument.findRecentEditorPane() in a synchronized block. BTW what is the point of do { // ... } while (false); ? If you just want an arbitrary block scope, { // ... } suffices. > BTW what is the point of
> do {
> // ...
> } while (false);
I'm using continue inside.
*** Bug 201898 has been marked as a duplicate of this bug. *** |
Created attachment 110500 [details] Thread dump of deadlock NetBeans IDE Dev (Build 20110907-6421954e36ec) (#6421954e36ec) Linux version 2.6.38-11-generic running on amd64 1.6.0_25; Java HotSpot(TM) 64-Bit Server VM 20.0-b11; Sun Microsystems Inc. on Ubuntu 11.04 When restarting IDE which was shutdown with a java file opened I've got deadlock of document opening <-> EditorContextDispatcher.