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 167401 - NetBeans freezes while opening a menu on Mac OS X
Summary: NetBeans freezes while opening a menu on Mac OS X
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 6.x
Hardware: Macintosh (x86) All
: P1 blocker (vote)
Assignee: issues@platform
: 170196 175894 (view as bug list)
Depends on:
Reported: 2009-06-20 08:10 UTC by fabriziogiudici
Modified: 2011-06-09 09:57 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

Thread Dump (15.66 KB, text/plain)
2009-06-20 08:10 UTC, fabriziogiudici
Screen shot (79.58 KB, image/png)
2009-06-20 08:11 UTC, fabriziogiudici
simple swing application to reproduce the jdk bug (14.49 KB, application/x-compressed)
2009-06-23 16:46 UTC, Stanislav Aubrecht

Note You need to log in before you can comment on or make changes to this bug.
Description fabriziogiudici 2009-06-20 08:10:04 UTC
I'm using 6.7RC3 on Mac OS X, with the latest Java update (1.6.0_13). I've just opened a Maven set of projects and -
probably while it's still scanning - I was navigating through the menus. At a certain point, a menu froze and the whole
NetBeans is unusable. Connecting with the JConsole I got a thread dump and it seems that AWT-AppKit is deadlocked. I
believe that AWT-AppKit is an Apple specific thing, so I'm naming this issue relating to Mac OS X.

I'm going to attach the thread dump.
Comment 1 fabriziogiudici 2009-06-20 08:10:44 UTC
Created attachment 83838 [details]
Thread Dump
Comment 2 fabriziogiudici 2009-06-20 08:11:41 UTC
Created attachment 83839 [details]
Screen shot
Comment 3 fabriziogiudici 2009-06-20 08:12:36 UTC
BTW, I suspect it could be related to the latest update from Apple, as in the Apple mailing list people are describing
issues related to menus.
Comment 4 fabriziogiudici 2009-06-20 08:17:41 UTC
Since it's an intermittent deadlock, not happening all the times, I'm decreasing the priority to P2.
Comment 5 Marian Mirilovic 2009-06-21 13:36:35 UTC
We need to know the reason before FCS goes out. Please Platform guys look at this issue ... thanks in advance.
Comment 6 fabriziogiudici 2009-06-22 09:02:46 UTC
I'm in holidays for a few days, but I could have the connection. If there any specific thing that I can do, please let
me know. 
Comment 7 Antonin Nebuzelsky 2009-06-22 09:38:01 UTC
Stando, Milane, try reproducing that on your Macs today.
Comment 8 Stanislav Aubrecht 2009-06-22 10:29:57 UTC
i have reproduced the deadlock with steps provided by the reporter
Comment 9 Stanislav Aubrecht 2009-06-22 10:33:01 UTC
my guess is that we're showing (or trying to) a global wait cursor for the whole main window and apple's jdk trips over
when it updates the cursor while browsing in the main menu
Comment 10 Stanislav Aubrecht 2009-06-22 11:01:10 UTC
the workaround might -Dapple.laf.useScreenMenuBar=false
Comment 11 Milan Kubec 2009-06-22 11:07:36 UTC
I managed to reproduce the problem once so far (out of 7 invocations of IDE).
Comment 12 Stanislav Aubrecht 2009-06-22 11:52:10 UTC
i can reproduce this bug with a simple swing application which repeatedly opens and closes modal dialog from a frame
window with apple menu.
Comment 13 Stanislav Aubrecht 2009-06-22 12:06:23 UTC
the same swing application runs fine when using jdk 1.5 or when apple screen menu is turned off
Comment 14 Stanislav Aubrecht 2009-06-22 12:27:27 UTC
i reported it as apple bug 6993269
Comment 15 Antonin Nebuzelsky 2009-06-22 12:47:51 UTC
My understanding is that this bug cannot be workarounded in NetBeans code, other than specifying

The Mac users will complain if we move the main menu bar from the top of the screen to the main window frame, but this
is currently the only quick fix for the problem. So, I suggest we do it, and also include this problem description in
the release notes. Adding RELNOTE keyword.

I will see if I can escalate this issue to be fixed ASAP on the Apple JDK side.
Comment 16 fabriziogiudici 2009-06-22 13:10:10 UTC
I bet that if you manage to run under Mac OS X, 1.6.0_07 it runs fine. It must definitely be a gift by Apple JDK 1.6.0_13.
Comment 17 fabriziogiudici 2009-06-22 13:26:27 UTC
So, let's cross fingers :-( But it should impact a good number of Java applications, so we might hope for a quick patch.
Comment 18 Stanislav Aubrecht 2009-06-23 16:46:01 UTC
Created attachment 83947 [details]
simple swing application to reproduce the jdk bug
Comment 19 Stanislav Aubrecht 2009-06-23 17:04:51 UTC
after offline discussion with QE we decided not to workaround this bug on our side and wait for proper fix from apple.

to be added to release notes for 6.7:

# Random freezes on Mac OS X JDK 1.6.0 update 13

    Description: There's a known Apple JDK bug (6993269) which may randomly freeze IDE when browsing through the main
menu bar of the IDE.

    Workaround: Either switch to a different JDK version or modify default startup options in <netbeans
dir>/etc/netbeans.conf to -J-Dapple.laf.useScreenMenuBar=false
Comment 20 Jaroslav Tulach 2009-08-12 17:14:46 UTC
*** Issue 170196 has been marked as a duplicate of this issue. ***
Comment 21 Tomas Hurka 2009-09-03 19:51:26 UTC
Fixed in Java for Mac OS X 10.5 Update 5. It is available via Software Update, and via manual download at 
Comment 22 Antonin Nebuzelsky 2009-09-04 10:20:51 UTC
Thanks for the confirmation.
Comment 23 Stanislav Aubrecht 2009-11-02 08:40:49 UTC
*** Issue 175894 has been marked as a duplicate of this issue. ***
Comment 24 Stanislav Aubrecht 2010-03-25 10:42:25 UTC
*** Bug 182695 has been marked as a duplicate of this bug. ***
Comment 25 _ tboudreau 2010-03-25 19:34:44 UTC
Reproducible in JDK 1.6.0_15, Mac OS 10.6.2
Comment 26 Marian Mirilovic 2011-06-09 09:57:23 UTC