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 46175

Summary: Deadlock occurred
Product: editor Reporter: Jan Lahoda <jlahoda>
Component: Code foldingAssignee: issues@java <issues>
Status: CLOSED FIXED    
Severity: blocker CC: issues
Priority: P2    
Version: 4.x   
Hardware: Sun   
OS: SunOS   
Issue Type: DEFECT Exception Reporter:
Attachments: Full Thread Dump.

Description Jan Lahoda 2004-07-15 09:44:35 UTC
Yesterday's sources+patches for issue #45801,
JDK1.5.0-beta3-b57.

The attached deadlock occurred.
Comment 1 Jan Lahoda 2004-07-15 09:44:59 UTC
Created attachment 16262 [details]
Full Thread Dump.
Comment 2 Martin Matula 2004-07-17 01:09:44 UTC
Seems to be caused by code folding. In addition, the code folding is
performing JMI calls in the AWT thread which should be avoided if
possible.
Comment 3 Miloslav Metelka 2004-07-20 13:33:40 UTC
The use of AWT is intentional as there are likely non-default fold
settings so the async creation could cause flickering.

However the rule of first locking the MDR then documents will require
to post the fold creation to RP even in such case. I'll make the
change and test the behavior.
Comment 4 Miloslav Metelka 2004-07-21 11:32:01 UTC
Fixed in main trunk:
Checking in src/org/netbeans/modules/editor/java/NbJavaFoldManager.java;
/cvs/editor/src/org/netbeans/modules/editor/java/NbJavaFoldManager.java,v
 <--  NbJavaFoldManager.java
new revision: 1.5; previous revision: 1.4
Comment 5 Miloslav Metelka 2004-07-21 16:06:35 UTC
One more fix is necessary.
Comment 6 Miloslav Metelka 2004-07-22 10:31:43 UTC
Additional fix in main trunk:
Checking in src/org/netbeans/modules/editor/java/NbJavaFoldManager.java;
/cvs/editor/src/org/netbeans/modules/editor/java/NbJavaFoldManager.java,v
 <--  NbJavaFoldManager.java
new revision: 1.6; previous revision: 1.5
Comment 7 Martin Roskanin 2004-07-26 10:32:28 UTC
*** Issue 46528 has been marked as a duplicate of this issue. ***
Comment 8 Jan Lahoda 2004-08-13 13:08:07 UTC
.