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 164562 - Deadlock during warmup
Summary: Deadlock during warmup
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-06 08:55 UTC by Jaroslav Tulach
Modified: 2009-05-07 07:58 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Deadlock (12.62 KB, text/plain)
2009-05-06 08:56 UTC, Jaroslav Tulach
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2009-05-06 08:55:30 UTC
I seem to need to run warm up when modules are installed to fix issue 164188. However if I invoke the 
JavaEditorWarmUp.run() when the IDE is already running I risk a deadlock. Probably there is something wrong between 
AWT Tree Lock and editor's priviledged lock or NbEditorUI synchronization. Maybe the problem is that paint is called 
outside of AWT thread?
Comment 1 Jaroslav Tulach 2009-05-06 08:56:12 UTC
Created attachment 81618 [details]
Deadlock
Comment 2 Jaroslav Tulach 2009-05-06 09:12:27 UTC
I guess the JavaEditorWarmUp is not really ready for multiple execution. This is my proposed fix:

diff -r 01d32f84114f java.editor/src/org/netbeans/modules/java/editor/JavaEditorWarmUpTask.java
--- a/java.editor/src/org/netbeans/modules/java/editor/JavaEditorWarmUpTask.java        Wed May 06 01:07:21 2009 +0400
+++ b/java.editor/src/org/netbeans/modules/java/editor/JavaEditorWarmUpTask.java        Wed May 06 10:12:08 2009 +0200
@@ -329,6 +329,7 @@
                         + (System.currentTimeMillis()-startTime));
                     startTime = System.currentTimeMillis();
                 }
+                status = STATUS_INIT;
                 break;

             default:
Comment 3 Jaroslav Tulach 2009-05-06 09:19:27 UTC
ergonomics#a1473056add4
Comment 4 Quality Engineering 2009-05-07 07:58:29 UTC
Integrated into 'main-golden', will be available in build *200905070201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/a1473056add4
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #164562: Getting the Java Editor Warm Up ready for multiple subsequent executions