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 144383 - Deadlock when opening editor
Summary: Deadlock when opening editor
Status: VERIFIED FIXED
Alias: None
Product: javame
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: RANDOM, THREAD
: 144335 144395 144412 144471 144492 144517 144519 144599 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-08-19 12:41 UTC by Jiri Prox
Modified: 2008-09-01 15:41 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
thead dump (13.00 KB, text/plain)
2008-08-19 12:43 UTC, Jiri Prox
Details
thread dump (17.23 KB, text/plain)
2008-08-19 14:48 UTC, josin
Details
thread dump (16.18 KB, text/plain)
2008-08-20 08:41 UTC, josin
Details
Thread dump using Yarda's latest fix (11.44 KB, text/plain)
2008-08-20 15:53 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2008-08-19 12:41:27 UTC
Product Version: NetBeans IDE Dev (Build 20080819023551)
Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b13
System: Linux version 2.6.22-15-generic running on i386; UTF-8; en_US (nb)

Deadlock occurs when opening properties file.

AWT is blocked in openide module, so reporting it here at first, feel free to reassign
Comment 1 Jiri Prox 2008-08-19 12:43:27 UTC
Created attachment 67797 [details]
thead dump
Comment 2 Jiri Skrivanek 2008-08-19 12:53:10 UTC
It might be connected with typo fixed in changeset below (blickActionMap replaced by blinkActionMap). Try build 3455
where  this changeset is integrated.

http://hg.netbeans.org/main?cmd=changeset;node=bd367e1938dc
Comment 3 josin 2008-08-19 14:44:37 UTC
I got the same deadlock on same build but on Mac. I'll attach my thread dump.
Comment 4 josin 2008-08-19 14:48:46 UTC
Created attachment 67810 [details]
thread dump
Comment 5 Jiri Prox 2008-08-19 15:21:14 UTC
I've installed the newer build and it works fine now.
Comment 6 Marian Petras 2008-08-19 16:52:13 UTC
The first deadlock is a duplicate of bug #144412.

The second deadlock has the same cause and, again, no code from the .properties module is involved. I think it is a bug
in CloneableEditor. The fact that it did not happen on the second attempt does not mean the bug is fixed - so I reopen
it and reassigned to "openide/editor" for further evaluation.
Comment 7 Marian Petras 2008-08-19 16:53:28 UTC
I believe this threading issue is also causing bug #144412.
Comment 8 mslama 2008-08-19 17:03:22 UTC
No. It is bug in mobility: They touch swing component from non AWT thread. See thread "Document Processing".
Comment 9 mslama 2008-08-19 17:04:36 UTC
I am not able to find out what subcomponent is it. org.netbeans.modules.mobility.editor.J2MEKit.createMenu is included.
Comment 10 mslama 2008-08-19 17:28:34 UTC
More issue like this. It might be caused by recent Jarda changes in GlobalActionContextImpl.
Comment 11 mslama 2008-08-19 17:29:51 UTC
*** Issue 144395 has been marked as a duplicate of this issue. ***
Comment 12 josin 2008-08-20 08:41:33 UTC
Freeze again in todays build.NetBeans IDE Dev (Build 200808200201). Thread dump attached.

My steps: Create new JForm > Finish > Dialog was closed but ide without any response. This steps are not steps to reproduce!
Comment 13 josin 2008-08-20 08:41:58 UTC
Created attachment 67925 [details]
thread dump
Comment 14 Jaroslav Tulach 2008-08-20 12:16:55 UTC
changeset:   96951:a1e1e01f8c51
tag:         tip
user:        Jaroslav Tulach <jtulach@netbeans.org>
date:        Wed Aug 20 13:14:04 2008 +0200
summary:     #144383: blinkActionMap can be performed only in AWT thread

Comment 15 Jaroslav Tulach 2008-08-20 12:56:11 UTC
*** Issue 144335 has been marked as a duplicate of this issue. ***
Comment 16 Petr Suchomel 2008-08-20 13:18:00 UTC
*** Issue 144471 has been marked as a duplicate of this issue. ***
Comment 17 Jiri Skrivanek 2008-08-20 13:28:18 UTC
Is it blick or blink? The latest version of file contains blick.
Comment 18 mslama 2008-08-20 13:45:13 UTC
*** Issue 144412 has been marked as a duplicate of this issue. ***
Comment 19 Jan Stola 2008-08-20 15:49:20 UTC
*** Issue 144599 has been marked as a duplicate of this issue. ***
Comment 20 Jesse Glick 2008-08-20 15:52:05 UTC
Now opening a document (using CLI --open) deadlocks the IDE. I will attach the new thread dump. GlobalActionContextImpl
is waiting on itself but does not get notified.

Ironically, the document I was trying to open was GlobalActionContextImpl.java! In #bd367e1938dc, I fixed the typo in
the method name ("blick" -> "blink"). jtulach in merge #483599022fd6 reverted my fix, I guess by "resolving" the merge
conflict by throwing out my change.
Comment 21 Jesse Glick 2008-08-20 15:53:00 UTC
Created attachment 67958 [details]
Thread dump using Yarda's latest fix
Comment 22 Jesse Glick 2008-08-20 15:58:16 UTC
Deadlock seems to be reproducible.
Comment 23 Jesse Glick 2008-08-20 16:06:24 UTC
BTW it can be "cured" without data loss by

1. download http://blogs.sun.com/roller/resources/jglick/jrunscriptin.jar

2. java -jar jrunscriptin.jar netbeans

3. Enter

ts = java.lang.reflect.Array.newInstance(java.lang.Thread, 100)
java.lang.Thread.enumerate(ts)
// find Thread[AWT-EventQueue-1,...,IDE Main], say it is in position #16
ts[16].stop()
Comment 24 Jaroslav Tulach 2008-08-20 16:30:37 UTC
changeset:   97071:d108ae6d6b27
tag:         tip
user:        Jaroslav Tulach <jtulach@netbeans.org>
date:        Wed Aug 20 17:29:44 2008 +0200
summary:     #144383: Basically reverting to 4883eaeda744, plus ensuring that the change is always notified from AWT 
thread.
Comment 25 Quality Engineering 2008-08-21 06:05:04 UTC
Integrated into 'main-golden', available in build *200808210201* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/a1e1e01f8c51
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #144383: blinkActionMap can be performed only in AWT thread
Comment 26 josin 2008-08-21 08:39:02 UTC
It really seems to be fixed. I didn't get any freeze anymore. If I don't get it again I'll verify it in the evening.
Comment 27 josin 2008-08-21 08:39:04 UTC
It really seems to be fixed. I didn't get any freeze anymore. If I don't get it again I'll verify it in the evening.
Comment 28 Jan Lahoda 2008-08-21 12:32:00 UTC
*** Issue 144519 has been marked as a duplicate of this issue. ***
Comment 29 Jan Lahoda 2008-08-21 12:32:40 UTC
*** Issue 144517 has been marked as a duplicate of this issue. ***
Comment 30 josin 2008-08-22 08:07:54 UTC
Works fine. Verified.

Product Version: NetBeans IDE Dev (Build 200808220201)
Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-121
System: Mac OS X version 10.4.11 running on i386; MacRoman; en_US (nb)
Comment 31 Jaroslav Tulach 2008-09-01 15:41:54 UTC
*** Issue 144492 has been marked as a duplicate of this issue. ***