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 185042 - [69cat] Deadlock when opening some Matisse files
Summary: [69cat] Deadlock when opening some Matisse files
Status: VERIFIED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P1 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
: 185043 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-04-26 20:05 UTC by Michel Graciano
Modified: 2010-04-28 12:43 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread dump (23.45 KB, application/octet-stream)
2010-04-26 20:07 UTC, Michel Graciano
Details
stack trace (22.81 KB, text/plain)
2010-04-26 20:12 UTC, misterm
Details
SwingX binaries (1.39 MB, application/octet-stream)
2010-04-26 20:25 UTC, Michel Graciano
Details
Test case: Ugly.java (56 bytes, application/octet-stream)
2010-04-27 09:27 UTC, Jan Stola
Details
Test case: UglyBeanInfo.java (466 bytes, application/octet-stream)
2010-04-27 09:29 UTC, Jan Stola
Details
Test case: Ugly2.java (205 bytes, application/octet-stream)
2010-04-27 09:30 UTC, Jan Stola
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Graciano 2010-04-26 20:05:47 UTC
[ BUILD # : 4576818452de ]
[ JDK VERSION : 1.6.* ]

Deadlock when opening some Matisse files.
Comment 1 Michel Graciano 2010-04-26 20:07:00 UTC
*** Bug 185043 has been marked as a duplicate of this bug. ***
Comment 2 Michel Graciano 2010-04-26 20:07:22 UTC
Created attachment 98077 [details]
Thread dump
Comment 3 Michel Graciano 2010-04-26 20:10:42 UTC
This is the second bug which forces me to work with 6.8 in this NetCAT :(
I just can't found any workaround for it.
Comment 4 misterm 2010-04-26 20:11:12 UTC
I can reproduce this with Windows 7 64 bit.
Comment 5 misterm 2010-04-26 20:12:07 UTC
Created attachment 98079 [details]
stack trace
Comment 6 Michel Graciano 2010-04-26 20:22:51 UTC
We have SwingX components at our palette as well our own components and some of them are used at UI which we can reproduce the problem.
Comment 7 Michel Graciano 2010-04-26 20:25:52 UTC
Created attachment 98080 [details]
SwingX binaries

I attached the binaries for SwingX which we use.
Comment 8 Jan Stola 2010-04-27 06:30:27 UTC
This issue is few days old. It was introduced by fix of issue 184551 that attempts to load GUI Builder's Palette outside event-dispatch thread. Unfortunately, SwingX components attempt to modify UIDefaults in their static initializer, i.e., in a thread that loads their class.

Details:
Request Processor thread (loading the class)
- locks Introspector to find BeanInfo
- locks UIDefaults to modify them

AWT thread (loading form)
- locks UIDefaults when entering form-laf block
- locks Introspector when trying to determine component properties

I will try to keep the issue 184551 fixed and find a workaround for this unfortunate case. We can revert the fix of issue 184551 if no workaround is available.
Comment 9 Jan Stola 2010-04-27 09:27:51 UTC
Created attachment 98101 [details]
Test case: Ugly.java
Comment 10 Jan Stola 2010-04-27 09:29:23 UTC
Created attachment 98102 [details]
Test case: UglyBeanInfo.java
Comment 11 Jan Stola 2010-04-27 09:30:08 UTC
Created attachment 98103 [details]
Test case: Ugly2.java
Comment 12 Jan Stola 2010-04-27 09:35:37 UTC
While it is clear what is wrong in this issue, I wasn't able to reproduce it using a regular components from some GUI library (like SwingX). It seems to be hard to meet the right race conditions on my machine.

Hence, I created an artificial test-case that can be used to reproduce this problem (see the attachments). It is sufficient to add Ugly2 component into the form and Ugly component into the Palette (UglyBeanInfo must be placed such that it can be found by Introspector).
Comment 13 Jan Stola 2010-04-27 12:07:16 UTC
Fixed - FormLAF now takes also Introspector.class lock.

Modified file: http://hg.netbeans.org/cdev/rev/d6076d241513
Comment 14 Quality Engineering 2010-04-28 05:00:27 UTC
Integrated into 'main-golden', will be available in build *201004280200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/
User: 
Log:
Comment 15 Michel Graciano 2010-04-28 12:43:27 UTC
v. 100428-1268a0167db6