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 75500 - Blocking dialog after UNDO/REDO operations
Summary: Blocking dialog after UNDO/REDO operations
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@java
URL: http://qa.netbeans.org/modules/refact...
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-25 14:54 UTC by martin_hasaj
Modified: 2007-11-06 12:24 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread dump (23.24 KB, text/plain)
2006-04-25 14:55 UTC, martin_hasaj
Details
IAE (3.29 KB, text/plain)
2006-05-02 15:32 UTC, Jiri Prox
Details
messages.log (30.57 KB, text/plain)
2006-05-02 15:33 UTC, Jiri Prox
Details
Thread dump 23.05.06 (24.68 KB, text/plain)
2006-05-23 10:52 UTC, martin_hasaj
Details

Note You need to log in before you can comment on or make changes to this bug.
Description martin_hasaj 2006-04-25 14:54:57 UTC
I was evaluating the
http://qa.netbeans.org/modules/refactoring/promo-f/html/refactoring-testspec.html
scenerio the JDK 1.5 Refactoring/Refactoring 1.5 - Move Class I test case.

I tried to Move Class to another package, then build it and UNDO refactoring
asap. Then I tried to REDO refactoring and deadlock occured. I tried it next
time and it  was same.

I enclosed the Thread dump.
Comment 1 martin_hasaj 2006-04-25 14:55:25 UTC
Created attachment 30040 [details]
Thread dump
Comment 2 Jan Becicka 2006-04-26 07:13:25 UTC
I don't see anything wrong on refactoring side. Reassigning to core/windows for
evaluation...
Comment 3 David Simonek 2006-04-27 16:33:38 UTC
I see anything wrong on core/windows side neither :-(

I even don't see any deadlock in stack dumps. Dialog is opened it seems
(AWT-EventQueue-1 thread) and waiting for user events to come. But I can't see
main EventQueue thread (which would be called AWT-EventQueue-0 I think). Maybe
it died somehow and that's the problem.
No relation to core/windows though, so returning back and ccing stack dump
expert pnejedly.

Comment 4 Petr Nejedly 2006-05-02 14:59:33 UTC
There's no visible deadlock.
There should be a modal dialog visible and interacting OK. Maybe the dialog got
obscured somehow but still blocked the IDE input (was IDE painting OK?)

I vaguely recall a random JDK issue that you might have run into, where
displayed and quickly dismissed dialog breaks some internal state - I don't
recall details.

Dafe: When there is modal dialog, everything stays in single thread, no AEQ-0 in
separate thread ever exists. See bottom of the AEQ stack trace.

Comment 5 Jiri Prox 2006-05-02 15:31:56 UTC
Linux Fedora Core 2
NB 5.5 200605020200
JDK 1.6.0 b81

I can it reproduce it as well. The painting is OK, but modal dialog blocks IDE
by keeping visible.
In 5.5 there is also IAE exception. Attaching also messages.log, since there are
several information exceptions
I can remind there were similar problems on Linux (issue 65645)


java.lang.IllegalArgumentException: Child tree not found (type: 54 firstToken: 3
lastToken: 9 resource: abc/B.java) class org.netbeans.jmi.javamodel.Import$Impl
abc.def.A valid:true | class org.netbeans.jmi.javamodel.Resource$Impl abc/B.java
valid:true | 
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.MetadataElement.getASTree(MetadataElement.java:1272)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.MetadataElement.getASTree(MetadataElement.java:515)
	at org.netbeans.modules.javacore.parser.ElementInfo.getTypeAST(ElementInfo.java:86)
Comment 6 Jiri Prox 2006-05-02 15:32:35 UTC
Created attachment 30169 [details]
IAE
Comment 7 Jiri Prox 2006-05-02 15:33:40 UTC
Created attachment 30170 [details]
messages.log
Comment 8 Petr Nejedly 2006-05-02 15:51:58 UTC
Not a deadlock.
Comment 9 Petr Nejedly 2006-05-02 15:59:38 UTC
Now the problem is obvious.
The UndoManager in undo() displays the progress panel and supposedly correctly
tears it down in finally{} block, but the actual failure (IAE) occurc inside the
finally block, but just a statement before the dialog teardown:
  172: transactionEnded(fail);  // this throws exception
  173: fireProgressListenerStop(); // would hide the dialog, but not reached
 
Clearly a javacore problem
Comment 10 Jan Becicka 2006-05-03 10:02:17 UTC
Fixed in trunk and NB 5.5
Checking in UndoManager.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/internalapi/UndoManager.java,v
 <--  UndoManager.java
new revision: 1.20; previous revision: 1.19
done

Checking in UndoManager.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/internalapi/UndoManager.java,v
 <--  UndoManager.java
new revision: 1.13.8.4.2.1; previous revision: 1.13.8.4
done
Comment 11 martin_hasaj 2006-05-22 09:38:05 UTC
I can still find it in 
netbeans-6_0-daily-bin-200605211800-21_May_2006_1800
Comment 12 Jan Becicka 2006-05-23 10:01:32 UTC
Please attach fresh thread dump. Thanks
Comment 13 martin_hasaj 2006-05-23 10:52:19 UTC
Created attachment 30553 [details]
Thread dump 23.05.06
Comment 14 Jan Becicka 2006-06-26 16:19:54 UTC
Fixed in trunk
Checking in UndoManager.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/internalapi/UndoManager.java,v
 <--  UndoManager.java
new revision: 1.21; previous revision: 1.20
done
Comment 15 Jan Becicka 2006-06-26 16:21:52 UTC
Fixed in release55
Checking in UndoManager.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/internalapi/UndoManager.java,v
 <--  UndoManager.java
new revision: 1.13.8.4.2.2; previous revision: 1.13.8.4.2.1
done
Comment 16 Quality Engineering 2007-09-20 12:05:44 UTC
Reorganization of java component
Comment 17 Jiri Prox 2007-11-06 12:24:49 UTC
I've never seen it in 6.0 -> verified