Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Java application can hang when accessing the screen menu bar in 32-bit Java6
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Java application can hang when accessing the screen menu bar in 32-bit Java6



Michael Ellis wrote:

I've encountered a serious problem with Snow Leopard Java 6, and I
wanted to make you all aware of it.  If you experience a similar
issue, please vote for the resolution of this bug by submitting your
own report at http://bugreport.apple.com.

The top few frames of this trace look familiar:

AWT Thread: "AWT-EventQueue-0" prio=6 tid=0x01953800 nid=0xb2342000 runnable [0xb2341000] java.lang.Thread.State: RUNNABLE
at apple.awt.CGlobalCursorManager.findHeavyweightUnderCursor(Native Method)
at apple .awt.CGlobalCursorManager._updateCursor(CGlobalCursorManager.java:130)
at apple .awt .CGlobalCursorManager .updateCursorImmediately(CGlobalCursorManager.java:75)
at apple.awt.ComponentModel.updateCursorImmediately(ComponentModel.java: 166)
at java.awt.Component.updateCursorImmediately(Component.java:2919)
at java.awt.Component.hide(Component.java:1608)
- locked <0x04a5c970> (a java.awt.Component$AWTTreeLock)
at java.awt.Component.show(Component.java:1565)
at java.awt.Component.setVisible(Component.java:1515)
at javax.swing.JComponent.setVisible(JComponent.java:2612)
at com.merlinone.merlin.client.views.MOMCWorkspaceFooterController $_ProgressBarUpdater$1.run(MOMCWorkspaceFooterController.java:587)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
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)

I have seen "findHeavyweightUnderCursor" implicated in deadlocks back to OS X 10.4 and Java 1.5. I was never able to reproduce the deadlock (it only happened very rarely), and was never sure that that was really the problem. What I discovered from tracing the hung processes is that findHeavyweightUnderCursor calls NSObject performSelectorOnMainThread with waitUntilDone=YES. This blocks the Swing thread against the AppKit thread. If anything unexpected happens on the AppKit thread to prevent it from servicing the selector in a timely manner, it can deadlock. I wish I still had those traces.
_______________________________________________
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


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.