JDK-7197298 : [macosx] Stuck in sun.lwawt.macosx.CCursorManager.nativeGetCursorPosition
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7u8
  • Priority: P1
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: os_x
  • CPU: x86
  • Submitted: 2012-09-10
  • Updated: 2013-09-13
  • Resolved: 2013-09-13
Related Reports
Relates :  
Description
Operating System = Mac OS X version 10.7.4 running on x86_64
Java; VM; Vendor = 1.7.0_08-ea; Java HotSpot(TM) 64-Bit Server VM 23.4-b01; Oracle Corporation
Runtime = Java(TM) SE Runtime Environment 1.7.0_08-ea-b05

Reported by a NetBeans user - At some point the IDE displays the beachball of death and needs to be killed from the console or the activity monitor. Thread dump after this happens is attached; it is stuck in sun.lwawt.macosx.CCursorManager.nativeGetCursorPosition(Native Method).

When this happened the console contained the following log messages:

Sep  4 14:58:29 dhcp-prague08-second-floor-10-163-21-238.cz.oracle.com
java[89995] <Error>: kCGErrorRangeCheck: CGSSetSurfaceShape
Sep  4 14:58:29 dhcp-prague08-second-floor-10-163-21-238.cz.oracle.com
java[89995] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to
catch errors as they are logged.
2012-09-04 14:58:29.073 java[89995:707] CGSSetSurfaceShape failed - error 1007
(window:34399, surface:375770944, bounds:{{0, 0}, {2147483647, 2608}}
2012-09-04 14:58:29.084 java[89995:707] *** -[NSMutableArray
initWithCapacity:]: Request for large capacity 25165824
WA

Related NetBeans bug:
http://netbeans.org/bugzilla/show_bug.cgi?id=217817

Comments
EVALUATION So far several users confirmed the hang stopped manifesting with 7u10 preview builds.
18-09-2012

EVALUATION The three threads involved are: "AWT-EventQueue-1" prio=5 tid=0x00007f8e7bd71000 nid=0xae0b runnable [0x000000010eff0000] java.lang.Thread.State: RUNNABLE at sun.lwawt.macosx.CCursorManager.nativeGetCursorPosition(Native Method) ... "Thread-3" daemon prio=5 tid=0x00007f8e7dc73000 nid=0xb303 runnable [0x0000000115fad000] java.lang.Thread.State: RUNNABLE at com.sun.jna.Native.invokeVoid(Native Method) at com.sun.jna.Function.invoke(Function.java:328) at com.sun.jna.Function.invoke(Function.java:276) at com.sun.jna.Library$Handler.invoke(Library.java:216) at $Proxy3.CFRunLoopRun(Unknown Source) at org.netbeans.modules.masterfs.watcher.macosx.OSXNotifier$1.run(OSXNotifier.java:126) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) "AppKit Thread" daemon prio=5 tid=0x00007f8e7b20b800 nid=0x707 runnable [0x00007fff6093b000] java.lang.Thread.State: RUNNABLE at sun.lwawt.macosx.LWCToolkit.doAWTRunLoop(Native Method) at sun.lwawt.macosx.LWCToolkit.invokeAndWait(LWCToolkit.java:562) at sun.lwawt.macosx.LWCToolkit.invokeAndWait(LWCToolkit.java:514) at com.apple.laf.ScreenMenu.invokeOpenLater(ScreenMenu.java:135) The AWT-EventQueue-1 is trying to execute a code block on the AppKit thread. The AppKit thread seems to be locked by a method invoked on the Thread-3 (which belongs to the IDE). I suggest to proceed with NetBeans team to investigate what Thread-3 is actually doing.
11-09-2012

EVALUATION Please try running with 7u8b06+ and see if the error messages disappear from the console. Note that this may or may not resolve the hang.
11-09-2012