JDK/JAVA Exception NSWindow drag regions should only be invalidated on the Main Thread

102 篇文章 1 订阅
  • 在MAC 11上运行jogmap,报错:
2022-01-24 10:56:37.395 java[94984:1325231] Apple AWT Internal Exception: NSWindow drag regions should only be invalidated on the Main Thread!
2022-01-24 10:56:37.395 java[94984:1325231] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow drag regions should only be invalidated on the Main Thread!'
*** First throw call stack:
(
  0   CoreFoundation                      0x00007fff2062a1db __exceptionPreprocess + 242
  1   libobjc.A.dylib                     0x00007fff20363d92 objc_exception_throw + 48
  2   CoreFoundation                      0x00007fff206528e6 -[NSException raise] + 9
  3   AppKit                              0x00007fff22de1eb2 -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 321
  4   AppKit                              0x00007fff22dccaa2 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1296
  5   AppKit                              0x00007fff22dcc58b -[NSWindow initWithContentRect:styleMask:backing:defer:] + 42
  6   libnativewindow_macosx.jnilib       0x00000001b2269502 Java_jogamp_nativewindow_macosx_OSXUtil_CreateNSWindow0 + 354
  7   ???                                 0x000000011937caa8 0x0 + 4718054056
)
libc++abi: terminating with uncaught exception of type NSException
  • 参考网页

  搜索了一下,说JDK242正常,252出现的问题。

java - Apple AWT Internal Exception: NSWindow drag regions should only be invalidated on the Main Thread - Stack Overflow

  吾试了一下,使用官方发布的JDK202确实是可以的。由错误变成了警告。下载链接:

Java Archive | Oracle

  •  原因分析

  对比老新版本的JDK输出,由Warning变成了Error。说明JDK本身没有变化,变化的是Xcode版本(新版本要求必须在主线程进行某些操作)。而其他软件没有及时跟进,于是出错了。

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

柳鲲鹏

能给阁下一点帮助,非常荣幸

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值