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 66783 - Frozen IDE while reloading document
Summary: Frozen IDE while reloading document
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Daniel Prusa
URL:
Keywords:
: 67795 69455 70494 70614 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-10-14 10:35 UTC by _ rkubacki
Modified: 2007-11-05 13:44 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
thread dump (17.74 KB, text/plain)
2005-10-14 10:37 UTC, _ rkubacki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkubacki 2005-10-14 10:35:56 UTC
dev build from Oct 13, JDK 1.5.0_05, Linux

Open a file in editor, modify it, update the file externally to older version
and go back to the IDE and its UI is frozen.
Comment 1 _ rkubacki 2005-10-14 10:37:01 UTC
Created attachment 25947 [details]
thread dump
Comment 2 _ rkubacki 2005-10-14 10:40:08 UTC
According to Jarda there is a problem w/ NbJavaFoldManager that tries to aquire
document lock from within MDR transaction.

Also note that I had some form opened earlier ans that's probably why window
deactivated triggered the code in property sheet that asked for MDR.
Comment 3 Jaroslav Tulach 2005-10-14 11:31:59 UTC
Well not exactly. According to me, it really caused the deadlock, but as far  
as I know we agreed that it is fobbidden to acquire MDR lock from inside the 
document lock - so in fact there is not much the javafoldmanager could do. 
 
The only thing that is against the rules is the code in AWT has document lock 
and tries to get the MDR lock. I see three problems: 
 
1. there is supposed to be (at least it was a TCR) a check for this kind of 
problem that throws an exception if that happens. Where it is? 
 
2. who is going to write a test to simulate it? 
 
3. how to solve the deadlock? 
 
Comment 4 Martin Matula 2005-10-18 09:44:52 UTC
Mila?
Comment 5 Miloslav Metelka 2005-10-18 10:16:38 UTC
NbJavaFoldManager is not the culprit - it correctly locks the MDR first - you
can verify it - it's on line 287; then on line 296 the doc gets locked.

The culprit is AWT - first GuardedDocument.runAtomic() is run and then the MDR
trans is started in java.ui.nodes.

Not sure why our assertion does not get triggered - we need to find out.
Comment 6 _ rkubacki 2005-10-18 10:31:02 UTC
I do not run with assertions enabled. Maybe that's the reason.
Comment 7 Miloslav Metelka 2005-10-18 13:58:17 UTC
Yes, that's the only conclusion that I see as possible because I have checked
all the assertions and they do seem to work fine.

I reassign to Dan P. to fix the problem in the java.ui.nodes if possible.
Comment 8 Daniel Prusa 2005-11-04 14:34:05 UTC
Similar problem reported in issue 67795.
Comment 9 Jan Pokorsky 2005-11-14 15:00:46 UTC
*** Issue 67795 has been marked as a duplicate of this issue. ***
Comment 10 Daniel Prusa 2005-11-14 16:07:34 UTC
Fixed in java.ui.nodes - mdr transaction is no longer started, cached values are
used to compute the short description (the same mechanism as it was already
implemented for the display name).

/cvs/java/src/org/netbeans/modules/java/ui/nodes/elements/ElementNode.java
new revision: 1.20; previous revision: 1.19
Comment 11 Jan Becicka 2005-11-28 15:28:29 UTC
*** Issue 69455 has been marked as a duplicate of this issue. ***
Comment 12 Jan Becicka 2005-12-19 15:38:50 UTC
*** Issue 70494 has been marked as a duplicate of this issue. ***
Comment 13 Jan Pokorsky 2006-01-05 13:59:21 UTC
*** Issue 70614 has been marked as a duplicate of this issue. ***