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 104190

Summary: Deadlock during editing
Product: obsolete Reporter: Martin Krauskopf <mkrauskopf>
Component: languagesAssignee: Jan Jancura <jjancura>
Status: RESOLVED FIXED    
Severity: blocker Keywords: REGRESSION, THREAD
Priority: P1    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: thread dump
messages.log with prepended abstractdocumentpatch.jar
LDNFE.txt

Description Martin Krauskopf 2007-05-17 16:09:08 UTC
Just built build, 1.6.0_02-ea, Linux

Do not have steps to reproduce. But happens very often and very soon after IDE
starts. Seems to happen after classpath scanning ends. Not sure if this
component is the culprit. Attaching TD.
Comment 1 Martin Krauskopf 2007-05-17 16:09:41 UTC
Created attachment 42506 [details]
thread dump
Comment 2 Martin Krauskopf 2007-05-21 12:41:59 UTC
I've tried to built another fresh build today and still getting similar
exception very soon. Let me know if you want another newer thread dump. I'm not
able to use trunk IDE for cca last five days.
Comment 3 Martin Krauskopf 2007-05-21 13:20:53 UTC
Created attachment 42596 [details]
messages.log with prepended abstractdocumentpatch.jar
Comment 4 Martin Krauskopf 2007-05-21 14:52:01 UTC
Created attachment 42600 [details]
LDNFE.txt
Comment 5 Jan Lahoda 2007-05-21 15:08:11 UTC
Seems to be caused by the languages/engine -
org.netbeans.modules.languages.features.ToolTipAnnotation readlocks the document
on line 72, and then load the language (LanguagesManager.getLanguage) *outside*
the try-finally block. So if the getLanguage throws an exception, the document
is not unlocked (and so any future attempt to write-lock the document will wait
forever). The exception is then quietly ignored(!). The last exception attached
by Martin was produced by a version of ToolTipAnnotation modified to log
exceptions in the catch block on line 109.

Please ensure that the readLock is immediately followed by try {} finally
{readUnlock();}

Many thanks to Martin with help on this issue.
Comment 6 Martin Krauskopf 2007-05-22 07:36:11 UTC
Trying to reassign. Hanzi, probably yours?
Comment 7 Jan Jancura 2007-05-23 13:20:37 UTC
fixed in trunk:
IDE:-------------------------------------------------
IDE: [5/23/07 2:13 PM] Committing "ToolTipAnnotation.java" started
Checking in ToolTipAnnotation.java;
/cvs/languages/engine/src/org/netbeans/modules/languages/features/ToolTipAnnotation.java,v
 <--  ToolTipAnnotation.java
new revision: 1.9; previous revision: 1.8
done
IDE: [5/23/07 2:13 PM] Committing "ToolTipAnnotation.java" finished
Comment 8 Miloslav Metelka 2007-05-28 15:46:57 UTC
*** Issue 104857 has been marked as a duplicate of this issue. ***
Comment 9 Miloslav Metelka 2007-05-30 10:30:37 UTC
*** Issue 103963 has been marked as a duplicate of this issue. ***