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 47203 - Deadlock in editor when accessing code completion javadoc
Summary: Deadlock in editor when accessing code completion javadoc
Status: CLOSED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 4.x
Hardware: PC Linux
: P1 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-13 13:07 UTC by Jaroslav Tulach
Modified: 2007-11-05 13:44 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread dump (16.72 KB, text/plain)
2004-08-13 13:07 UTC, Jaroslav Tulach
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2004-08-13 13:07:16 UTC
Looks like a deadlock somewhere between editor and
javacore.
Comment 1 Jaroslav Tulach 2004-08-13 13:07:36 UTC
Created attachment 16803 [details]
Thread dump
Comment 2 Jaroslav Tulach 2004-08-13 13:08:38 UTC
Happened in my own build from 040811
Comment 3 Martin Matula 2004-08-13 13:26:28 UTC
So, why didn't you assign it to editor or java/javacore? :)
The issue seems to be in java nodes - the node is touching MDR in the
AWT thread under JComponent$AWTTreeLock.
Honzo, please look at it.
Comment 4 Martin Matula 2004-08-13 13:31:33 UTC
Correction - the problem is that editor changes state of swing objects
in a non-AWT thread, which is illegal. Reassigning to editor.
Comment 5 Jan Becicka 2004-08-13 13:32:09 UTC
editor is doing some AWT related stuff outside AWT thread (completion)
and java.ui.nodes is doing some JMI stuff inside AWT thread. Both
sides should be fixed IMO. NbCompletionJavaDoc.setJavaDocVisible()
should be called inside of AWT, right?
Comment 6 Martin Matula 2004-08-13 13:36:12 UTC
I guess if the editor fixes the code that is performing swing calls in
a non-AWT thread, we can consider this issue fixed.
CCing jpokorsky - Honzo please look at why the transaction is locked
in the AWT thread and try to eliminate it.
Comment 7 Martin Roskanin 2004-08-13 13:44:41 UTC
fixed in [maintrunk]

Reassigning back to java module for further evaluation

/cvs/editor/src/org/netbeans/modules/editor/java/NbCompletionJavaDoc.java,v
 <--  NbCompletionJavaDoc.java
new revision: 1.42; previous revision: 1.41
Comment 8 Martin Matula 2004-08-13 13:50:19 UTC
The deadlock is fixed (Martin, is this bug present also in q-build
branch? if so, it should be fixed also there).
Moving the code transaction from the AWT thread is not critical for
this particular case since it only happens when the property sheet is
redrawn which is unlikely to happen during a long-running transaction
(other than scanning, which is capable of breaking up its long
transaction into many small transactions if it finds out the AWT
thread is waiting for the transaction lock). So I am closing this
issue as fixed.
Comment 9 Martin Roskanin 2004-08-13 13:53:29 UTC
I will fix it also in q-build
Comment 10 psuk 2004-08-13 14:04:47 UTC
It needs to be integrated in QBE200408101800 today
Comment 11 Martin Roskanin 2004-08-13 14:11:53 UTC
I mistakenly changed the component back to java, sorry.
Pavel: Yes, I am going to integrate it soon. I am just checking out
the qbuild branch...
Comment 12 Martin Roskanin 2004-08-13 15:28:30 UTC
integrated into [QBE200408101800]

/cvs/editor/src/org/netbeans/modules/editor/java/NbCompletionJavaDoc.java,v
 <--  NbCompletionJavaDoc.java
new revision: 1.41.4.1; previous revision: 1.41
Comment 13 Roman Strobl 2005-07-15 12:10:21 UTC
Verified.