javafx - 在 macOS 10.14 上运行时如何修复 TornadoFX 中的 NSInternalInconsistencyException?
问题描述
我正在使用 TornadoFX,最近升级到 macOS 10.14。问题是每当我打开一个对话框并聚焦另一个应用程序窗口时都会出现此错误:
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
这个问题中有一个详细的解决方案,但我的问题是我正在使用 TornadoFX,我不能真正篡改它的依赖关系。我能做些什么来解决这个问题?
打勾表明这是固定的,但u202
我试过了,我仍然可以用u202
.
解决方案
TornadoFX 在这里没有引入相关的依赖项,您只需要一个带有修复程序的 Java 8 版本。由于 u202 的发行说明没有提及此问题的修复,您应该联系 Oracle 并要求他们澄清,以及是否有可用的补丁版本与修复。
推荐阅读
- javascript - 如何在js中修剪html内容?
- r - 从列中提取数据以在 R 中创建另一列
- jquery - jquery 滑块花式框显示悬停箭头。但是我网站上的副本在悬停时缺少箭头
- openshift - glusterfs 和 glusterfs_registry 可以共享相同的节点/设备
- c# - 导出/导入 png 文件 Android Unity
- react-native - 调用函数作为组件 React-Native
- r - ggplot 使用黄土日期 - 将轴标签从数字更改为字符
- python - Python:使用带有 TF-IDF 的列表
- r - 安装 dartR 时出现问题,并且包“稍后”不可用(对于 R 版本 3.5.1)
- mysql - Hibernate 不创建连接表