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 187697 - Deadlock during opening GUI form which uses SwingX (org.jdesktop)
Summary: Deadlock during opening GUI form which uses SwingX (org.jdesktop)
Status: CLOSED WONTFIX
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P1 normal with 10 votes (vote)
Assignee: issues@guibuilder
URL:
Keywords: JDK_SPECIFIC, RELNOTE
: 188050 188696 188784 188789 189257 189460 189659 189849 189856 189926 190039 190489 190649 191115 191121 191413 191514 191768 192070 192211 192272 192323 192369 192424 192577 192615 193173 193634 193730 193829 194054 194078 194158 194278 194649 194828 195343 196058 198578 198906 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-17 06:33 UTC by vladakk
Modified: 2011-07-15 12:41 UTC (History)
41 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
testcase,logs (1006.58 KB, application/octet-stream)
2010-06-17 06:44 UTC, vladakk
Details
Test-case showing problems with changes introduced in JDK6u21b02 (1.75 KB, application/octet-stream)
2010-06-18 10:11 UTC, Jan Stola
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vladakk 2010-06-17 06:33:37 UTC
Product Version = NetBeans IDE 6.9 (Build 201006101454)
Operating System = Linux version 2.6.32-22-generic running on i386
Java; VM; Vendor = 1.6.0_21-ea
Runtime = Java HotSpot(TM) Client VM 17.0-b15
Comment 1 vladakk 2010-06-17 06:35:40 UTC
We are unable to open any java GUI form which uses SwingX !!!
Comment 2 vladakk 2010-06-17 06:44:36 UTC
Created attachment 100149 [details]
testcase,logs
Comment 3 Jan Stola 2010-06-17 12:39:55 UTC
This seems to be caused by fix of JDK's bug 5102804 (see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5102804 ) that was integrated into JDK 6 update 21 build 2 according to http://download.java.net/jdk6/6u21/promoted/b02/changes/JDK6u21.b02.list.html

This fix resuls into new Introspector().getBeanInfo() being called with BEANINFO_CACHE lock held. This is deadlock prone. I will either try to find a reproducible test-case showing that this is unwanted regression or will add some workaround into GUI builder's code.
Comment 4 Jan Stola 2010-06-18 10:11:19 UTC
Created attachment 100196 [details]
Test-case showing problems with changes introduced in JDK6u21b02
Comment 5 Jan Stola 2010-06-18 10:14:34 UTC
I was able to create a simple standalone test-case that shows how easily one can face a deadlock when using JDK 6 update 21 (see the attachments). I will provide this test-case to JDK guys and will see if they are willing to fix the problematic synchronization in Introspector.
Comment 6 vladakk 2010-06-24 06:26:02 UTC
Can we expect some workarround these days?
Comment 7 Jan Stola 2010-06-24 08:55:16 UTC
> Can we expect some workarround these days?

There is one simple and straightforward workaround that you can use immediatelly: do not use bleeding edge (= early access) build of JDK, i.e., do not use JDK 1.6.0_21; use 1.6.0_20 or older.
Comment 8 vladakk 2010-06-24 09:46:56 UTC
JDK Standard Edition 6u21 is almost 6 months old and resolved about 410 bugs !
Comment 9 Jan Stola 2010-06-24 13:14:53 UTC
*** Bug 188050 has been marked as a duplicate of this bug. ***
Comment 10 vladakk 2010-06-24 14:04:04 UTC
Does this mean that we should go back to nb 6.8 which works with JDK 6u21 Build B05?
Comment 11 peterlevart 2010-06-24 14:11:26 UTC
This could easily be fixed by the following change to the Introspector:


    public static BeanInfo getBeanInfo(Class<?> beanClass)
        throws IntrospectionException
    {
        if (!ReflectUtil.isPackageAccessible(beanClass))
        {
            return (new Introspector2(beanClass, null, USE_ALL_BEANINFO)).getBeanInfo();
        }

        Map<Class<?>, BeanInfo> beanInfoCache;
        BeanInfo beanInfo;

        synchronized (BEANINFO_CACHE)
        {
            beanInfoCache = (Map<Class<?>, BeanInfo>) AppContext.getAppContext().get(BEANINFO_CACHE);
            if (beanInfoCache == null)
            {
                beanInfoCache = new WeakHashMap<Class<?>, BeanInfo>();
                AppContext.getAppContext().put(BEANINFO_CACHE, beanInfoCache);
            }
            beanInfo = beanInfoCache.get(beanClass);
        }

        if (beanInfo == null)
        {
            beanInfo = (new Introspector2(beanClass, null, USE_ALL_BEANINFO)).getBeanInfo();
            synchronized (BEANINFO_CACHE)
            {
                BeanInfo oldBeanInfo = beanInfoCache.get(beanClass);
                if (oldBeanInfo == null)
                    beanInfoCache.put(beanClass, beanInfo);
                else
                    beanInfo = oldBeanInfo;
            }
        }

        return beanInfo;
    }
Comment 12 Jan Stola 2010-06-24 14:24:41 UTC
> This could easily be fixed by the following change to the Introspector

Yes, it can be fixed by a minor change in Introspector. Unfortunately, this change cannot be done by us (= NetBeans developers). It must be fixed by JDK team. I have reported this problem in their bug-tracking system and I am waiting for their response.
Comment 13 peterlevart 2010-06-24 14:43:11 UTC
I just noticed that it's already fixed in OpenJDK jdk6 Mercurial forrest. Although very ugly fix (using synchronized map wrapper in addition), it should work. We just have to wait for an EA binary build then...
Comment 14 vladakk 2010-07-12 10:18:16 UTC
And what is next? Java release is u21!
Comment 15 peterlevart 2010-07-16 10:28:52 UTC
Unfortunately the fix (already in OpenJDK forrest) did not get into JDK6u21 release. I'm running NB6.9 on an self-built OpenJDK for now...
Comment 16 vladakk 2010-07-16 11:41:14 UTC
???
Comment 17 Jan Stola 2010-07-16 14:27:28 UTC
*** Bug 188696 has been marked as a duplicate of this bug. ***
Comment 18 Jan Stola 2010-07-21 08:44:41 UTC
*** Bug 188784 has been marked as a duplicate of this bug. ***
Comment 19 Jan Stola 2010-07-21 08:51:55 UTC
*** Bug 188789 has been marked as a duplicate of this bug. ***
Comment 20 Jan Stola 2010-07-22 09:46:03 UTC
The corresponding JDK issue was fixed in JDK 7 development builds:
http://hg.openjdk.java.net/jdk7/jdk7-gate/jdk/rev/3dc686ecb4cd
The fix will be available since build 102.

Let's hope that it will appear soon also in JDK 6 update builds. Currently, the integration of the fix seems to be scheduled for JDK 6u23.
Comment 21 Tomas Pavek 2010-08-17 08:28:20 UTC
*** Bug 189460 has been marked as a duplicate of this bug. ***
Comment 22 Tomas Pavek 2010-08-17 08:32:55 UTC
*** Bug 189257 has been marked as a duplicate of this bug. ***
Comment 23 Jan Stola 2010-08-27 10:04:48 UTC
*** Bug 189849 has been marked as a duplicate of this bug. ***
Comment 24 Jan Stola 2010-08-27 12:38:31 UTC
*** Bug 189926 has been marked as a duplicate of this bug. ***
Comment 25 Jan Stola 2010-08-27 12:54:25 UTC
*** Bug 189856 has been marked as a duplicate of this bug. ***
Comment 26 Jan Stola 2010-08-30 08:19:07 UTC
*** Bug 189659 has been marked as a duplicate of this bug. ***
Comment 27 Jan Stola 2010-09-03 13:06:54 UTC
*** Bug 190039 has been marked as a duplicate of this bug. ***
Comment 28 vanjab 2010-09-03 15:14:53 UTC
Deadlock Zoom:
Found one Java-level deadlock:
=============================
"GUI Builder":
  waiting to lock monitor 103123eb0 (object 1071058e0, a java.lang.Class),
  which is held by "AWT-EventQueue-1"
"AWT-EventQueue-1":
  waiting to lock monitor 103124000 (object 1132776a8, a java.lang.Object),
  which is held by "GUI Builder"

Java stack information for the threads listed above:
===================================================
"GUI Builder":
	at java.beans.Introspector.findExplicitBeanInfo(Introspector.java:426)
	- waiting to lock <1071058e0> (a java.lang.Class for java.beans.Introspector)
	at java.beans.Introspector.<init>(Introspector.java:377)
	at java.beans.Introspector.getBeanInfo(Introspector.java:164)
	- locked <1132776a8> (a java.lang.Object)
	at java.beans.Introspector.getBeanInfo(Introspector.java:227)
	at java.beans.Introspector.<init>(Introspector.java:386)
	at java.beans.Introspector.getBeanInfo(Introspector.java:164)
	- locked <1132776a8> (a java.lang.Object)
	at org.openide.util.Utilities.getBeanInfo(Utilities.java:426)
	at org.netbeans.modules.form.FormUtils.getBeanInfo(FormUtils.java:1771)
	at org.netbeans.modules.form.palette.PaletteItem.getBeanDescriptor(PaletteItem.java:296)
	at org.netbeans.modules.form.palette.PaletteItem.getDisplayName(PaletteItem.java:227)
	at org.netbeans.modules.form.palette.PaletteItemDataObject$ItemNode.getDisplayName(PaletteItemDataObject.java:323)
	at org.openide.nodes.FilterNode.getDisplayName(FilterNode.java:533)
	at org.openide.nodes.FilterNode.getDisplayName(FilterNode.java:533)
	at org.netbeans.modules.form.palette.PaletteUtils$1.run(PaletteUtils.java:242)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1957)
"AWT-EventQueue-1":
	at java.beans.Introspector.getBeanInfo(Introspector.java:157)
	- waiting to lock <1132776a8> (a java.lang.Object)
	at org.openide.util.Utilities.getBeanInfo(Utilities.java:426)
	at org.netbeans.modules.form.FormUtils.canBeContainer(FormUtils.java:1055)
	at org.netbeans.modules.form.FormUtils.isContainer(FormUtils.java:1000)
	at org.netbeans.modules.form.FormModel.setFormBaseClass(FormModel.java:147)
	at org.netbeans.modules.form.GandalfPersistenceManager.loadForm(GandalfPersistenceManager.java:424)
	at org.netbeans.modules.form.GandalfPersistenceManager.loadForm(GandalfPersistenceManager.java:298)
	- locked <137312b80> (a org.netbeans.modules.form.GandalfPersistenceManager)
	at org.netbeans.modules.form.FormEditor$3.run(FormEditor.java:336)
	at org.netbeans.modules.form.FormLAF$2.run(FormLAF.java:293)
	- locked <113f282f0> (a javax.swing.MultiUIDefaults)
	- locked <1071058e0> (a java.lang.Class for java.beans.Introspector)
	at org.openide.util.Mutex.doEventAccess(Mutex.java:1361)
	at org.openide.util.Mutex.readAccess(Mutex.java:320)
	at org.netbeans.modules.form.FormLAF.executeWithLookAndFeel(FormLAF.java:276)
	at org.netbeans.modules.form.FormEditor.loadFormData(FormEditor.java:333)
	at org.netbeans.modules.form.FormEditor.loadFormDesigner(FormEditor.java:231)
	at org.netbeans.modules.form.FormDesigner.finishComponentShowing(FormDesigner.java:1897)
	at org.netbeans.modules.form.FormDesigner.access$1100(FormDesigner.java:107)
	at org.netbeans.modules.form.FormDesigner$PreLoadTask$1.run(FormDesigner.java:1862)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:137)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Found 1 deadlock.
Comment 29 vanjab 2010-09-21 16:56:06 UTC
Can I just somehow disable the palette, as it seems to be related to the deadlock?
How do I tell netbeans to NOT open it when opening a GUI form?
Comment 30 Jan Stola 2010-09-22 09:04:41 UTC
*** Bug 190489 has been marked as a duplicate of this bug. ***
Comment 31 initialzero 2010-09-29 16:31:07 UTC
*** Bug 190649 has been marked as a duplicate of this bug. ***
Comment 32 eugene-71 2010-10-13 18:02:35 UTC
Tested with Netbeans 6.9.1 and just released JDK 1.6.0_20 - bug still here.

From thread dump:

2010-10-13 20:56:11
Full thread dump Java HotSpot(TM) Client VM (17.1-b03 mixed mode, sharing):

...

Found one Java-level deadlock:
=============================
"GUI Builder":
  waiting to lock monitor 0xb34a8308 (object 0x865fef70, a java.lang.Class),
  which is held by "AWT-EventQueue-1"
"AWT-EventQueue-1":
  waiting to lock monitor 0x0918c9f4 (object 0x76aef028, a java.lang.Object),
  which is held by "GUI Builder"

Java stack information for the threads listed above:
===================================================
"GUI Builder":
	at java.beans.Introspector.findExplicitBeanInfo(Introspector.java:426)
	- waiting to lock <0x865fef70> (a java.lang.Class for java.beans.Introspector)
	at java.beans.Introspector.<init>(Introspector.java:377)
	at java.beans.Introspector.getBeanInfo(Introspector.java:164)
	- locked <0x76aef028> (a java.lang.Object)
	at org.openide.util.Utilities.getBeanInfo(Utilities.java:426)
	at org.netbeans.modules.form.FormUtils.getBeanInfo(FormUtils.java:1771)
	at org.netbeans.modules.form.palette.PaletteItem.getBeanDescriptor(PaletteItem.java:296)
	at org.netbeans.modules.form.palette.PaletteItem.getDisplayName(PaletteItem.java:227)
	at org.netbeans.modules.form.palette.PaletteItemDataObject$ItemNode.getDisplayName(PaletteItemDataObject.java:323)
	at org.openide.nodes.FilterNode.getDisplayName(FilterNode.java:533)
	at org.openide.nodes.FilterNode.getDisplayName(FilterNode.java:533)
	at org.netbeans.modules.form.palette.PaletteUtils$1.run(PaletteUtils.java:242)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1957)
"AWT-EventQueue-1":
	at java.beans.Introspector.getBeanInfo(Introspector.java:157)
	- waiting to lock <0x76aef028> (a java.lang.Object)
	at org.openide.util.Utilities.getBeanInfo(Utilities.java:426)
	at org.netbeans.modules.form.FormUtils.getBeanInfo(FormUtils.java:1771)
	at org.netbeans.modules.form.RADComponent.getBeanInfo(RADComponent.java:427)
	at org.netbeans.modules.form.RADComponent.initInstance(RADComponent.java:187)
	at org.netbeans.modules.form.FormModel.setFormBaseClass(FormModel.java:169)
	at org.netbeans.modules.form.GandalfPersistenceManager.loadForm(GandalfPersistenceManager.java:424)
	at org.netbeans.modules.form.GandalfPersistenceManager.loadForm(GandalfPersistenceManager.java:298)
	- locked <0x794f5718> (a org.netbeans.modules.form.GandalfPersistenceManager)
	at org.netbeans.modules.form.FormEditor$3.run(FormEditor.java:336)
	at org.netbeans.modules.form.FormLAF$2.run(FormLAF.java:293)
	- locked <0x7729d4d0> (a javax.swing.MultiUIDefaults)
	- locked <0x865fef70> (a java.lang.Class for java.beans.Introspector)
	at org.openide.util.Mutex.doEventAccess(Mutex.java:1361)
	at org.openide.util.Mutex.readAccess(Mutex.java:320)
	at org.netbeans.modules.form.FormLAF.executeWithLookAndFeel(FormLAF.java:276)
	at org.netbeans.modules.form.FormEditor.loadFormData(FormEditor.java:333)
	at org.netbeans.modules.form.FormEditor.loadFormDesigner(FormEditor.java:231)
	at org.netbeans.modules.form.FormDesigner.finishComponentShowing(FormDesigner.java:1897)
	at org.netbeans.modules.form.FormDesigner.access$1100(FormDesigner.java:107)
	at org.netbeans.modules.form.FormDesigner$PreLoadTask$1.run(FormDesigner.java:1862)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:137)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Found 1 deadlock.
Comment 33 eugene-71 2010-10-13 18:04:12 UTC
"Tested with Netbeans 6.9.1 and just released JDK 1.6.0_20" - sorry, I mean 1.6.0_22.
Comment 34 Tomas Pavek 2010-10-14 09:17:33 UTC
As said in comment #20, the fix is expected in JDK 6u23. It's already reported as integrated, should appear in b02.
Comment 35 bcandrea 2010-10-26 08:15:46 UTC
Tested with NetBeans 6.9 and an early access JDK 6u23 (build 1.6.0_23-ea-b03);  the bug seems to be solved.
Comment 36 peterlevart 2010-10-26 10:00:30 UTC
(In reply to comment #35)
> Tested with NetBeans 6.9 and an early access JDK 6u23 (build 1.6.0_23-ea-b03); 
> the bug seems to be solved.

It works here too.
Comment 37 Jan Stola 2010-10-26 13:54:48 UTC
Closing as fixed beacause the corresponding JDK bugs were fixed:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6963811
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=2194979
and the fix is available in JDK6u23 build 03.
You can download the latest early access build of JDK 6 at http://download.java.net/jdk6/
Comment 38 Jan Stola 2010-10-26 14:03:52 UTC
*** Bug 191115 has been marked as a duplicate of this bug. ***
Comment 39 jmborer 2010-10-26 15:18:15 UTC
Anyone an idea when JDK 6u23 is supposed to be released?
Comment 40 Michel Graciano 2010-10-26 15:30:49 UTC
(In reply to comment #39)
> Anyone an idea when JDK 6u23 is supposed to be released?

It is not defined yet https://jdk6.dev.java.net/
Comment 41 rcasha 2010-10-27 05:57:27 UTC
*** Bug 191121 has been marked as a duplicate of this bug. ***
Comment 42 jmborer 2010-10-27 11:55:27 UTC
Currently only build 1.6.0_23-ea-b01 is publicly available. Where is b03? Hope we get a release date soon...
Comment 43 Michel Graciano 2010-10-27 12:00:35 UTC
(In reply to comment #42)
> Currently only build 1.6.0_23-ea-b01 is publicly available. Where is b03? Hope
> we get a release date soon...

You can get b03 at http://download.java.net/jdk6/

Regards
Comment 44 jmborer 2010-10-27 12:13:31 UTC
Thank you. Fun that the official site points to https://jdk6.dev.java.net/6uNea.html and therefore b01 only...
Comment 45 Jan Stola 2010-10-27 18:00:54 UTC
*** Bug 191413 has been marked as a duplicate of this bug. ***
Comment 46 Jan Stola 2010-11-01 14:28:14 UTC
*** Bug 191514 has been marked as a duplicate of this bug. ***
Comment 47 mwildam 2010-11-08 16:18:14 UTC
I can also confirm fix running on Ubuntu 10.04.1 with NetBeans 6.9.1 with
java version "1.6.0_23-ea"
Java(TM) SE Runtime Environment (build 1.6.0_23-ea-b03)
Java HotSpot(TM) Server VM (build 19.0-b09, mixed mode)
Comment 48 Jan Stola 2010-11-10 10:16:45 UTC
*** Bug 191768 has been marked as a duplicate of this bug. ***
Comment 49 Marian Mirilovic 2010-11-10 10:21:46 UTC
The correct resolution is WONTFIX, the fix was done on JDKs side not in our code base.
Comment 50 guyer 2010-11-17 09:59:25 UTC
What about us poor Mac OSX users?
Latest java for Mac is 6u22...
And no openjdk yet :-(
Comment 51 jmborer 2010-11-17 10:04:11 UTC
Don't upgrade yet or use a pre u20 Java release. Java 1.6u23 is not released yet. Currently, it is available in early access. I guess as soon as it will be released, we will get an update from Apple.
Comment 52 Jan Stola 2010-11-17 20:43:28 UTC
*** Bug 192070 has been marked as a duplicate of this bug. ***
Comment 53 guyer 2010-11-18 08:10:27 UTC
:-) Unfortunately I've already upgraded.
So no netbeans for now...
Comment 54 jmborer 2010-11-18 22:08:40 UTC
@guyer
I had the same issue. I just took my timemachine backup and restored the /System/Library/Frameworks/JavaVM.framework like it was before the update. I made sure to keep the original file (upgraded one) to restore it when update 23 will be available. Hope Oracle is going to release it soon and Apple will follow...
Comment 55 vanjab 2010-11-18 22:59:10 UTC
Did you try resetting the palette (thus removing offensive components)?
The bug should not affect people with default palettes.
Comment 56 adrienclerc 2010-11-19 08:56:30 UTC
I can't reproduce it since I've downgraded, but I remember that resetting the palette didn't change anything, and the deadlock still occurred.
Comment 57 Jan Stola 2010-11-19 09:10:56 UTC
> I can't reproduce it since I've downgraded, but I remember that resetting
> the palette didn't change anything, and the deadlock still occurred. 

Yes, you are right. The deadlock happens even with the default content of the palette. I am not aware about any workaround for this deadlock and I doubt there is one (besides not using the problematic builds of JDK).
Comment 58 bcandrea 2010-11-19 09:19:28 UTC
(In reply to comment #57)
> > I can't reproduce it since I've downgraded, but I remember that resetting
> > the palette didn't change anything, and the deadlock still occurred. 
> 
> Yes, you are right. The deadlock happens even with the default content of the
> palette. I am not aware about any workaround for this deadlock and I doubt
> there is one (besides not using the problematic builds of JDK).

I actually observed the problem with a default or disabled palette (and, by looking at the thread dump, I would say it's a problem of the form editor itself interacting with the Introspector).
Comment 59 vanjab 2010-11-19 15:58:45 UTC
Well, I am not sure why it is working for us here on 3 different apple machines. It deadlocsk 100% of the time if we have our components in the palette.
Resetting the palette would make Netbeans operate normally again.
I have no issues with Netbeans anymore, and here is the java version we are using:
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)
Java HotSpot(TM) Client VM (build 17.1-b03-307, mixed mode)

It is a mystery then. Glad it works for us though.
Comment 60 Jan Stola 2010-11-20 20:02:05 UTC
*** Bug 192211 has been marked as a duplicate of this bug. ***
Comment 61 Jan Stola 2010-11-23 12:20:11 UTC
*** Bug 192323 has been marked as a duplicate of this bug. ***
Comment 62 Jan Stola 2010-11-23 12:40:49 UTC
*** Bug 192272 has been marked as a duplicate of this bug. ***
Comment 63 jimthev 2010-11-24 19:09:13 UTC
*** Bug 192424 has been marked as a duplicate of this bug. ***
Comment 64 Tomas Pavek 2010-11-25 09:49:34 UTC
*** Bug 192369 has been marked as a duplicate of this bug. ***
Comment 65 Jan Stola 2010-11-27 22:25:24 UTC
*** Bug 192577 has been marked as a duplicate of this bug. ***
Comment 66 Jan Stola 2010-11-29 09:52:47 UTC
*** Bug 192615 has been marked as a duplicate of this bug. ***
Comment 67 willishf 2010-12-05 15:01:19 UTC
Netbeans workaround

I ran into this problem last week and stumbled around and managed to get the forms to load. I do have a custom palette. It appears the deadlock is caused by loading a form that does not contain a bean from the custom palette. I load the source for a form/panel that contains a bean from the custom palette in source code mode. I then did a clean and build(not sure if this is needed). Then switch to the design view and the form and palette loads.
Comment 68 willishf 2010-12-05 15:03:00 UTC
Probably other ways to achieve the same result but the key appears to be loading the form in source code view first. I am on OSX with the latest Java updates.
Comment 69 adamgmetzler 2010-12-05 16:24:11 UTC
This is a JDK bug and the only work around is to use JDK <= 1.6.0_20 or JDK >= 1.6.0_23 b03 early access. The problem is with the Introspector().getBeanInfo() with the BEANINFO_CACHE lock held (see comment #3). I have been using NBs 6.9.1 on the early access JDK for a couple of weeks and have not experienced this problem since. NBs seems to be a little faster too!
Comment 70 willishf 2010-12-05 19:48:15 UTC
(In reply to comment #69)
> This is a JDK bug and the only work around is to use JDK <= 1.6.0_20 or JDK >=
> 1.6.0_23 b03 early access. The problem is with the Introspector().getBeanInfo()
> with the BEANINFO_CACHE lock held (see comment #3). I have been using NBs 6.9.1
> on the early access JDK for a couple of weeks and have not experienced this
> problem since. NBs seems to be a little faster too!

I understand but for those of us on OSX we are stuck until Apple does a release with the fix. The path I mentioned appears to get around the initialization problem that causes the GUI to hang by loading source view first and then switching to design view. 

Typically I leave netbeans running so once it gets through the init problem everything works. Today I exited out of netbeans to get back memory for another application. When I started up netbeans to work on a swing panel in the gui designer I ran into the problem again. I went looking for a fix only to find out via this bug report I am stuck with it until Apple does an update.

It may be possible to change some ordering/initialization in the netbeans code to avoid the deadlock based on the way I am able to get it working.
Comment 71 ijay 2010-12-06 02:17:33 UTC
(In reply to comment #70)
> (In reply to comment #69)
> > This is a JDK bug and the only work around is to use JDK <= 1.6.0_20 or JDK >=
> > 1.6.0_23 b03 early access. The problem is with the Introspector().getBeanInfo()
> > with the BEANINFO_CACHE lock held (see comment #3). I have been using NBs 6.9.1
> > on the early access JDK for a couple of weeks and have not experienced this
> > problem since. NBs seems to be a little faster too!
> 
> I understand but for those of us on OSX we are stuck until Apple does a release
> with the fix. The path I mentioned appears to get around the initialization
> problem that causes the GUI to hang by loading source view first and then
> switching to design view. 
> 
> Typically I leave netbeans running so once it gets through the init problem
> everything works. Today I exited out of netbeans to get back memory for another
> application. When I started up netbeans to work on a swing panel in the gui
> designer I ran into the problem again. I went looking for a fix only to find
> out via this bug report I am stuck with it until Apple does an update.
> 
> It may be possible to change some ordering/initialization in the netbeans code
> to avoid the deadlock based on the way I am able to get it working.

(In reply to comment #70)
> (In reply to comment #69)
> > This is a JDK bug and the only work around is to use JDK <= 1.6.0_20 or JDK >=
> > 1.6.0_23 b03 early access. The problem is with the Introspector().getBeanInfo()
> > with the BEANINFO_CACHE lock held (see comment #3). I have been using NBs 6.9.1
> > on the early access JDK for a couple of weeks and have not experienced this
> > problem since. NBs seems to be a little faster too!
> 
> I understand but for those of us on OSX we are stuck until Apple does a release
> with the fix. The path I mentioned appears to get around the initialization
> problem that causes the GUI to hang by loading source view first and then
> switching to design view. 
> 
> Typically I leave netbeans running so once it gets through the init problem
> everything works. Today I exited out of netbeans to get back memory for another
> application. When I started up netbeans to work on a swing panel in the gui
> designer I ran into the problem again. I went looking for a fix only to find
> out via this bug report I am stuck with it until Apple does an update.
> 
> It may be possible to change some ordering/initialization in the netbeans code
> to avoid the deadlock based on the way I am able to get it working.

I'm also a mac user, agree with willishf.  It should be much easier to update NB than mac JDK
Comment 72 ijay 2010-12-06 07:10:52 UTC
Can NB team make a simple work-around?  This awful bug wastes me at least 1/5 working time developing GUIs on mac!
Comment 73 vanjab 2010-12-06 16:23:11 UTC
Being an all-apple shop, I vote +1 to try have Netbeans address this somehow by possibly forcing sequential load of the palette, GUI builder, and source view.
We have no idea when a new and corrected JDK will be released by Apple (especially now when they are so busy converting to OpenJDK process)
Comment 74 jmborer 2010-12-08 13:16:00 UTC
Great news: JDK u23 is available and the bug is fixed! Now I am eagerly waiting for Apple to release it too.
Comment 75 jmborer 2010-12-08 13:17:04 UTC
Of course available at: http://www.oracle.com/technetwork/java/javase/downloads/index.html
Comment 76 Jan Stola 2010-12-09 17:08:41 UTC
*** Bug 193173 has been marked as a duplicate of this bug. ***
Comment 77 joerobbins 2010-12-21 10:38:39 UTC
*** Bug 193634 has been marked as a duplicate of this bug. ***
Comment 78 Jan Stola 2010-12-27 12:10:34 UTC
*** Bug 193829 has been marked as a duplicate of this bug. ***
Comment 79 sworisbreathing 2011-01-10 16:19:51 UTC
It cannot be stressed enough how much Apple developers are left out in the cold on this issue.  With all the hullaballoo going on with respect to the future of Java support for Mac OS, there's no telling if or when we'll ever get Java 6 update 23.  So far, there is no expected or even tentative release date for the OpenJDK version that was announced by Oracle and Apple in November, 2010.

So, it seems Java developers on OS X have one of only a few less-than-ideal options:

1) Ensure you are only using the "stock" palette in NetBeans 6.9.  This makes things tough for people who are using custom component libraries (such as SwingX) or are developing applications on the NetBeans platform.
2) Downgrade to a previous version of NetBeans (such as 6.8).  
3) Switch to a different development platform.  This isn't practical for a lot of people, I would think.

I agree that it is ultimately the responsibility of the JVM developers/maintainers to fix the underlying problem.  However, I have cast my vote for this issue because of the situation that Apple users now find themselves in, because we find ourselves stuck between a rock and a hard place.
Comment 80 jmborer 2011-01-10 22:55:56 UTC
Dear fellow Java developers on Mac OS X, don't worry any more. I had the same concern, but I got a response from Apple: yes, there is a new Java update in preparation which will update Java 1.6 to u23. You can get an early preview at https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20748
Our long wait is almost over. Thank you Apple's Java dev team!
Comment 81 Tomas Pavek 2011-01-17 17:34:32 UTC
*** Bug 194278 has been marked as a duplicate of this bug. ***
Comment 82 Tomas Pavek 2011-01-18 18:25:39 UTC
*** Bug 193730 has been marked as a duplicate of this bug. ***
Comment 83 dvorkin1987 2011-02-02 08:48:46 UTC
Please consider re-opening... still happens on IDE ver. 6.9.1 with JDK u23.
After I first installed the new JDK the bug seemed to be gone, but now it's back, and worse.I can't open any form at all.

I would be glad to attach a log, but I have no Idea where I find log files for netbeans...
Comment 84 Tomas Pavek 2011-02-03 17:42:43 UTC
If you see a deadlock on JDK6u23, please make a thread dump and attach it here.
http://wiki.netbeans.org/GenerateThreadDump
Comment 85 Tomas Pavek 2011-02-03 17:43:56 UTC
*** Bug 194828 has been marked as a duplicate of this bug. ***
Comment 86 Tomas Pavek 2011-02-03 17:46:02 UTC
*** Bug 194649 has been marked as a duplicate of this bug. ***
Comment 87 Tomas Pavek 2011-02-03 17:50:12 UTC
*** Bug 194158 has been marked as a duplicate of this bug. ***
Comment 88 Tomas Pavek 2011-02-03 17:56:09 UTC
*** Bug 194054 has been marked as a duplicate of this bug. ***
Comment 89 Tomas Pavek 2011-02-11 17:35:46 UTC
*** Bug 195343 has been marked as a duplicate of this bug. ***
Comment 90 Tomas Pavek 2011-02-11 18:55:01 UTC
*** Bug 194078 has been marked as a duplicate of this bug. ***
Comment 91 Tomas Pavek 2011-03-07 16:57:51 UTC
*** Bug 196058 has been marked as a duplicate of this bug. ***
Comment 92 Jan Stola 2011-05-26 11:59:08 UTC
*** Bug 198906 has been marked as a duplicate of this bug. ***
Comment 93 Marian Mirilovic 2011-06-09 18:07:05 UTC
Fixed in 7(b102), 6u23(b02)
Comment 94 Jan Stola 2011-07-15 12:41:51 UTC
*** Bug 198578 has been marked as a duplicate of this bug. ***