当 Swing 应用程序在双显示器机器上运行时切换“镜像显示”,然后立即覆盖具有工具提示的内容时,始终会出现可重现的崩溃。
我只在 OS X 10.8 上看到这个。我无法在 10.7 上重现它。
- 在 OS X 10.8(带双显示器)处于“显示镜像”关闭状态的 Mac 上针对 Java 7 编译和运行示例代码。
- 将鼠标悬停在 JLabel 上以查看工具提示
- 打开显示镜像。
再次将鼠标悬停在 JLabel 上,您应该会崩溃。
public class TestToolTip { public static void main(String[] args) { JFrame frame = new JFrame(); JLabel label = new JLabel("hover"); label.setToolTipText("tooltip text"); frame.add(label); frame.setVisible(true); frame.pack(); } }
在关闭正在运行的应用程序上的笔记本电脑而不是“打开镜像”步骤时,我也看到了这一点。
PlugIn Path: /Library/Java/JavaVirtualMachines/jdk1.7.0_11.jdk/Contents/Home/jre/lib/lwawt/liblwawt.dylib
PlugIn Identifier: liblwawt.dylib
PlugIn Version: ??? (1)
Date/Time: 2013-07-04 12:09:43.467 -0400
OS Version: Mac OS X 10.8.2 (12C60)
Report Version: 10
Interval Since Last Report: 6164497 sec
Crashes Since Last Report: 67
Per-App Interval Since Last Report: 23880 sec
Per-App Crashes Since Last Report: 2
Crashed Thread: 0 AppKit Thread Dispatch queue: com.apple.main-thread
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Application Specific Information:
*** CFRelease() called with NULL ***
Thread 0 Crashed:: AppKit Thread Dispatch queue: com.apple.main-thread
0 com.apple.CoreFoundation 0x00007fff8513e7d8 CFRelease + 40
1 liblwawt.dylib 0x0000000168eae647 __Java_sun_lwawt_macosx_CWrapper_00024NSObject_release_block_invoke_1 + 91
2 JavaNativeFoundation 0x00000001682d55f5 +[JNFRunLoop _performCopiedBlock:] + 20
3 com.apple.Foundation 0x00007fff88d31677 __NSThreadPerformPerform + 225
4 com.apple.CoreFoundation 0x00007fff85148101 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
5 com.apple.CoreFoundation 0x00007fff85147a25 __CFRunLoopDoSources0 + 245
6 com.apple.CoreFoundation 0x00007fff8516adc5 __CFRunLoopRun + 789
7 com.apple.CoreFoundation 0x00007fff8516a6b2 CFRunLoopRunSpecific + 290
8 com.apple.HIToolbox 0x00007fff901410a4 RunCurrentEventLoopInMode + 209
9 com.apple.HIToolbox 0x00007fff90140e42 ReceiveNextEventCommon + 356
10 com.apple.HIToolbox 0x00007fff90140cd3 BlockUntilNextEventMatchingListInMode + 62
11 com.apple.AppKit 0x00007fff8dc19613 _DPSNextEvent + 685
12 com.apple.AppKit 0x00007fff8dc18ed2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
13 libosxapp.dylib 0x0000000168f2fb56 -[NSApplicationAWT nextEventMatchingMask:untilDate:inMode:dequeue:] + 124
14 com.apple.AppKit 0x00007fff8dc10283 -[NSApplication run] + 517
15 libosxapp.dylib 0x0000000168f2f9b9 +[NSApplicationAWT runAWTLoopWithApp:] + 156
16 liblwawt.dylib 0x0000000168e8981a -[AWTStarter starter:] + 1591
17 com.apple.Foundation 0x00007fff88d31677 __NSThreadPerformPerform + 225
18 com.apple.CoreFoundation 0x00007fff85148101 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
19 com.apple.CoreFoundation 0x00007fff85147a25 __CFRunLoopDoSources0 + 245
20 com.apple.CoreFoundation 0x00007fff8516adc5 __CFRunLoopRun + 789
21 com.apple.CoreFoundation 0x00007fff8516a6b2 CFRunLoopRunSpecific + 290
22 java 0x0000000102a8842d CreateExecutionEnvironment + 871
23 java 0x0000000102a82bdc JLI_Launch + 1952
24 java 0x0000000102a8878a main + 101
25 java 0x0000000102a82434 start + 52
Thread 1:
0 libsystem_kernel.dylib 0x00007fff8bf70386 __semwait_signal + 10
1 libsystem_c.dylib 0x00007fff884eacbd pthread_join + 847
2 java 0x0000000102a87a2d ContinueInNewThread0 + 102
3 java 0x0000000102a83847 ContinueInNewThread + 201
4 java 0x0000000102a87790 JVMInit + 251
5 java 0x0000000102a835c5 JLI_Launch + 4489
6 java 0x0000000102a8878a main + 101
7 java 0x0000000102a880bf apple_main + 92
8 libsystem_c.dylib 0x00007fff88460742 _pthread_start + 327
9 libsystem_c.dylib 0x00007fff8844d181 thread_start + 13
Thread 2:
0 libsystem_kernel.dylib 0x00007fff8bf700fa __psynch_cvwait + 10
1 libsystem_c.dylib 0x00007fff88464f89 _pthread_cond_wait + 869
2 libjvm.dylib 0x0000000102f5c547 os::PlatformEvent::park() + 173
3 libjvm.dylib 0x0000000102f3f7bc ParkCommon(ParkEvent*, long long) + 42
4 libjvm.dylib 0x0000000102f3ffae Monitor::IWait(Thread*, long long) + 160
5 libjvm.dylib 0x0000000102f4018a Monitor::wait(bool, long, bool) + 246
6 libjvm.dylib 0x0000000103023168 Threads::destroy_vm() + 80
7 libjvm.dylib 0x0000000102e4e2ba jni_DestroyJavaVM + 223
8 java 0x0000000102a83b86 JavaMain + 805
9 libsystem_c.dylib 0x00007fff88460742 _pthread_start + 327
10 libsystem_c.dylib 0x00007fff8844d181 thread_start + 13
Thread 3:: Dispatch queue: com.apple.libdispatch-manager
0 libsystem_kernel.dylib 0x00007fff8bf70d16 kevent + 10
1 libdispatch.dylib 0x00007fff84e84dea _dispatch_mgr_invoke + 883
2 libdispatch.dylib 0x00007fff84e849ee _dispatch_mgr_thread + 54
Thread 4:
0 libsystem_kernel.dylib 0x00007fff8bf700fa __psynch_cvwait + 10
1 libsystem_c.dylib 0x00007fff88464f89 _pthread_cond_wait + 869
2 libjvm.dylib 0x0000000102f5c547 os::PlatformEvent::park() + 173
3 libjvm.dylib 0x0000000102f3f7bc ParkCommon(ParkEvent*, long long) + 42
4 libjvm.dylib 0x0000000102f3ffae Monitor::IWait(Thread*, long long) + 160
5 libjvm.dylib 0x0000000102f4020b Monitor::wait(bool, long, bool) + 375
6 libjvm.dylib 0x0000000102dcd516 GCTaskManager::get_task(unsigned int) + 56
7 libjvm.dylib 0x0000000102dce34e GCTaskThread::run() + 338
8 libjvm.dylib 0x0000000102f601b5 java_start(Thread*) + 173
9 libsystem_c.dylib 0x00007fff88460742 _pthread_start + 327
10 libsystem_c.dylib 0x00007fff8844d181 thread_start + 13
Thread 5:
0 libsystem_kernel.dylib 0x00007fff8bf700fa __psynch_cvwait + 10
1 libsystem_c.dylib 0x00007fff88464f89 _pthread_cond_wait + 869
2 libjvm.dylib 0x0000000102f5c547 os::PlatformEvent::park() + 173
3 libjvm.dylib 0x0000000102f3f7bc ParkCommon(ParkEvent*, long long) + 42
4 libjvm.dylib 0x0000000102f3ffae Monitor::IWait(Thread*, long long) + 160
5 libjvm.dylib 0x0000000102f4020b Monitor::wait(bool, long, bool) + 375
6 libjvm.dylib 0x0000000102dcd516 GCTaskManager::get_task(unsigned int) + 56
7 libjvm.dylib 0x0000000102dce34e GCTaskThread::run() + 338
8 libjvm.dylib 0x0000000102f601b5 java_start(Thread*) + 173
9 libsystem_c.dylib 0x00007fff88460742 _pthread_start + 327
10 libsystem_c.dylib 0x00007fff8844d181 thread_start + 13
Thread 6:
0 libsystem_kernel.dylib 0x00007fff8bf700fa __psynch_cvwait + 10
1 libsystem_c.dylib 0x00007fff88464f89 _pthread_cond_wait + 869
2 libjvm.dylib 0x0000000102f5d6b3 os::PlatformEvent::park(long long) + 385
3 libjvm.dylib 0x0000000102f3ffae Monitor::IWait(Thread*, long long) + 160
4 libjvm.dylib 0x0000000102f4020b Monitor::wait(bool, long, bool) + 375
5 libjvm.dylib 0x0000000103053f2c VMThread::loop() + 444