如何在 macOS 10.14 上 运行 时修复 TornadoFX 中的 NSInternalInconsistencyException?
How to fix NSInternalInconsistencyException in TornadoFX when running on macOS 10.14?
我正在使用 TornadoFX,并且最近升级到 macOS 10.14。问题是每当我打开一个对话框并关注另一个应用程序时我都会收到此错误 window:
2019-01-23 13:32:31.270 java[9369:78410] *** Assertion failure in -[NSEvent _initWithCGEvent:eventRef:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1671.20.108/AppKit.subproj/NSEvent.m:1969
2019-01-23 13:32:46.218 java[9369:78410] unrecognized type is 4294967295
2019-01-23 13:32:46.218 java[9369:78410] *** Assertion failure in -[NSEvent _initWithCGEvent:eventRef:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1671.20.108/AppKit.subproj/NSEvent.m:1969
2019-01-23 13:32:46.222 java[9369:78410] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: _type > 0 && _type <= kCGSLastEventType'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff2c2abecd __exceptionPreprocess + 256
1 libobjc.A.dylib 0x00007fff58363720 objc_exception_throw + 48
2 CoreFoundation 0x00007fff2c2c6b2a +[NSException raise:format:arguments:] + 98
3 Foundation 0x00007fff2e66ae0d -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 194
4 AppKit 0x00007fff2974f4d5 -[NSEvent _initWithCGEvent:eventRef:] + 3272
5 AppKit 0x00007fff29aa2b50 +[NSEvent eventWithCGEvent:] + 120
6 libglass.dylib 0x000000012ca2295b listenTouchEvents + 59
7 SkyLight 0x00007fff5240dbc2 _ZL19processEventTapDataPvjjjPhj + 148
8 SkyLight 0x00007fff5230bb44 _XPostEventTapData + 278
9 SkyLight 0x00007fff5240dad0 _ZL22eventTapMessageHandlerP12__CFMachPortPvlS1_ + 132
10 CoreFoundation 0x00007fff2c20caef __CFMachPortPerform + 282
11 CoreFoundation 0x00007fff2c20c9c9 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
12 CoreFoundation 0x00007fff2c20c927 __CFRunLoopDoSource1 + 527
13 CoreFoundation 0x00007fff2c1f49a9 __CFRunLoopRun + 2574
14 CoreFoundation 0x00007fff2c1f3d48 CFRunLoopRunSpecific + 463
15 Foundation 0x00007fff2e55a4aa -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 280
16 libglass.dylib 0x000000012ca0f7a8 +[GlassApplication enterNestedEventLoopWithEnv:] + 136
17 libglass.dylib 0x000000012ca1024a Java_com_sun_glass_ui_mac_MacApplication__1enterNestedEventLoopImpl + 74
18 ??? 0x0000000118544db5 0x0 + 4703145397
)
libc++abi.dylib: terminating with uncaught exception of type NSException
在 this question 中有一个详细的解决方案,但我的问题是我使用的是 TornadoFX,我无法真正篡改它的依赖项。我该怎么做才能解决这个问题?
This 打勾表示这已在 u202
中修复,但我试过了,我仍然可以用 u202
.
重现这个问题
这里没有TornadoFX引入的相关依赖项,你只需要一个Java 8的版本,修复到位。由于u202的release notes没有提到这个问题的修复,你应该联系Oracle并要求他们澄清,以及是否有可用的补丁版本修复到位。
我正在使用 TornadoFX,并且最近升级到 macOS 10.14。问题是每当我打开一个对话框并关注另一个应用程序时我都会收到此错误 window:
2019-01-23 13:32:31.270 java[9369:78410] *** Assertion failure in -[NSEvent _initWithCGEvent:eventRef:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1671.20.108/AppKit.subproj/NSEvent.m:1969
2019-01-23 13:32:46.218 java[9369:78410] unrecognized type is 4294967295
2019-01-23 13:32:46.218 java[9369:78410] *** Assertion failure in -[NSEvent _initWithCGEvent:eventRef:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1671.20.108/AppKit.subproj/NSEvent.m:1969
2019-01-23 13:32:46.222 java[9369:78410] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: _type > 0 && _type <= kCGSLastEventType'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff2c2abecd __exceptionPreprocess + 256
1 libobjc.A.dylib 0x00007fff58363720 objc_exception_throw + 48
2 CoreFoundation 0x00007fff2c2c6b2a +[NSException raise:format:arguments:] + 98
3 Foundation 0x00007fff2e66ae0d -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 194
4 AppKit 0x00007fff2974f4d5 -[NSEvent _initWithCGEvent:eventRef:] + 3272
5 AppKit 0x00007fff29aa2b50 +[NSEvent eventWithCGEvent:] + 120
6 libglass.dylib 0x000000012ca2295b listenTouchEvents + 59
7 SkyLight 0x00007fff5240dbc2 _ZL19processEventTapDataPvjjjPhj + 148
8 SkyLight 0x00007fff5230bb44 _XPostEventTapData + 278
9 SkyLight 0x00007fff5240dad0 _ZL22eventTapMessageHandlerP12__CFMachPortPvlS1_ + 132
10 CoreFoundation 0x00007fff2c20caef __CFMachPortPerform + 282
11 CoreFoundation 0x00007fff2c20c9c9 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
12 CoreFoundation 0x00007fff2c20c927 __CFRunLoopDoSource1 + 527
13 CoreFoundation 0x00007fff2c1f49a9 __CFRunLoopRun + 2574
14 CoreFoundation 0x00007fff2c1f3d48 CFRunLoopRunSpecific + 463
15 Foundation 0x00007fff2e55a4aa -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 280
16 libglass.dylib 0x000000012ca0f7a8 +[GlassApplication enterNestedEventLoopWithEnv:] + 136
17 libglass.dylib 0x000000012ca1024a Java_com_sun_glass_ui_mac_MacApplication__1enterNestedEventLoopImpl + 74
18 ??? 0x0000000118544db5 0x0 + 4703145397
)
libc++abi.dylib: terminating with uncaught exception of type NSException
在 this question 中有一个详细的解决方案,但我的问题是我使用的是 TornadoFX,我无法真正篡改它的依赖项。我该怎么做才能解决这个问题?
This 打勾表示这已在 u202
中修复,但我试过了,我仍然可以用 u202
.
这里没有TornadoFX引入的相关依赖项,你只需要一个Java 8的版本,修复到位。由于u202的release notes没有提到这个问题的修复,你应该联系Oracle并要求他们澄清,以及是否有可用的补丁版本修复到位。