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 16946 - IDE freezes when AWT thread is waiting for Task running in RequestProcessor
Summary: IDE freezes when AWT thread is waiting for Task running in RequestProcessor
Status: CLOSED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P4 blocker (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-25 13:11 UTC by phamernik
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Dump stack when IDE was frozen (19.44 KB, text/plain)
2001-10-25 13:12 UTC, phamernik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description phamernik 2001-10-25 13:11:21 UTC
IDE freezes for half minute, when I was opening revision explorer for some Java 
source and exploring this source at the same moment.
Comment 1 phamernik 2001-10-25 13:12:43 UTC
Created attachment 3140 [details]
Dump stack when IDE was frozen
Comment 2 Svata Dedic 2001-10-25 16:47:38 UTC
It's probably inevitable (unless there's some bug I haven't found
yet): there's a time window between the source model gets garbage
collected, but before the reference queue is polled and the parsing
support notices that its data is gone [this is a periodical task in
OpenIDE-Request-Processor]. If you hit such a window, then the AWT was
fooled by OK status of the model, but blocked because the reference
was already cleared. 
However this race should happen quite rarely, possibly when other
tasks keep the RequestProcessor busy for a long time. If the issue
appears regularly, please reopen the bug.
Comment 3 peterbr 2002-12-12 14:10:16 UTC
This type of error has been occurring often in our 
NetBeans 3.3.2-based product OptimalJ 2.2.
In our case the interesting portion of the stack trace was:

"OpenIDE Request Processor-0" daemon prio=2 tid=0x0098D9B8 
nid=0x6e4 waiting on
monitor [2160f000..2160fdb4]
        at java.lang.Object.wait(Native Method)
        - waiting on <03B2F7E0> (a java.awt.EventQueue$1
$AWTInvocationLock)
        at java.lang.Object.wait(Object.java:426)
        at java.awt.EventQueue.invokeAndWait
(EventQueue.java:794)
        - locked <03B2F7E0> (a java.awt.EventQueue$1
$AWTInvocationLock)
        at org.openide.util.Mutex.doEventAccess
(Mutex.java:928)
        at org.openide.util.Mutex.readAccess
(Mutex.java:162)
        at org.netbeans.core.NbTopManager.createDialog
(NbTopManager.java:350)
        at 
org.netbeans.modules.web.context.WebContextObject.showNotif
yDialog(We
bContextObject.java:825)
        at 
org.netbeans.modules.web.context.WebContextObject.mkProject
View(WebCo
ntextObject.java:244)
        at 
org.netbeans.modules.web.context.WebContextObject.access$00
0(WebConte
xtObject.java:78)
        at 
org.netbeans.modules.web.context.WebContextObject$1.run
(WebContextObj
ect.java:135)
        at org.openide.util.Task.run(Task.java:152)
        at 
org.openide.util.RequestProcessor$ProcessorThread.run
(RequestProcesso
r.java:622)

"AWT-EventQueue-0" prio=7 tid=0x1EE06360 nid=0x6e8 waiting 
on monitor [20a6e000.
.20a6fdb4]
        at java.lang.Object.wait(Native Method)
        - waiting on <03A26748> (a 
org.openide.util.RequestProcessor$Task)
        at java.lang.Object.wait(Object.java:426)
        at org.openide.util.Task.waitFinished(Task.java:86)
        - locked <03A26748> (a 
org.openide.util.RequestProcessor$Task)
        at 
org.openide.util.RequestProcessor$Task.waitFinished
(RequestProcessor.
java:432)
...

I'm fixing this now (I think) by moving 2 lines of code 
into an already existing "invokeLater":
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                d[0] = TopManager.getDefault 
().createDialog (descriptor); // moved
                d[0].setSize (580, 180); // moved
                d[0].show ();
            }});
in WebContextObject.showNotifyDialog (package 
org.netbeans.modules.web.context).
Comment 4 Quality Engineering 2003-07-01 13:11:15 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.
Comment 5 Quality Engineering 2003-07-01 13:19:15 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.