Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Menu enable/disable bug in 1.5.0_16-b06-284
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Menu enable/disable bug in 1.5.0_16-b06-284



On Jun 18, 2009, at 6:06 AM, Roby Sherman wrote:

Nick Howes wrote:

Has anyone noticed their menu bar items not dynamically enabling/
disabling correctly under their Java applications running the new
1.5.0_19-b02-304 32-bit release for Leopard? 1.5.0_16-b06-284 still
seems to work fine...?

Yeah, my app does this too - and then it crashes with a SIGSEGV in the AWT-AppKit daemon. For me, it seems to be related to apple.laf.useScreenMenuBar and dynamically modifying menus (I both enable/disable items and for some use a MenuListener to update the menu in the menuSelected method). I've filed bug #6975997 and I have a DTS incident #76450571 open. Let's hope it gets fixed soon - my customers are not happy.


A workaround (that I can't really use for production) is to set apple.laf.useScreenMenuBar = false. FWIW.

Thanks for the bug#'s.   I'm not seeing the crash, but at this point all bets are off. :) :) Basically the only other alternative I've found so far is recreate the entire JMenuBar and set the main menu bar to it again which causes the dreaded java/menu "flicker from hell" which our clients are already complaining about. :)

My personal history with Apple / Java VM issues is that they don't get fixed too quickly, so unless the version someone gets retracted I don't know if I can hold out for a fix...

If anyone has a suggestion of how I can get around the enable/disable bug without have to reset the application Menu Bar or a way to cut down on the flicker when I DO reset it, I'd love to hear about it. Meanwhile, I'll keep trying various things and let you know if I find anything...

FYI, the issue with not restoring them menu has to do with the menu bar being swapped out when the underlying NSWindow receives a -windowDidBecomeMain: instead of -windowDidBecomeKey:. Unfortunately, this is code deep in the native parts of the AWT, so a Java user-space workaround does not seem possible, besides passing a non-null, visible parent to the dialog constructor.

The crash is a subtle correctness issue regarding autoreleased objects, which is still under investigation.

Sorry,
Mike Swingler
Java Runtime Engineer
Apple Inc.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Menu enable/disable bug in 1.5.0_16-b06-284 (From: Roby Sherman <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.