(已解决)MAC JAVA错误:Cocoa AWT: Not running on AppKit thread 0 when expected
解决办法:
参考:https://quantum6.blog.csdn.net/article/details/123204929
代码功能:在MAC上,JAVA调用本地函数,产生一个SDL_Window,就崩溃。具体错误:
2022-02-25 09:16:25.302 java[547:10409] Cocoa AWT: Not running on AppKit thread 0 when expected. (0 libawt_lwawt.dylib 0x000000010eaacb88 -[AWTWindow windowDidResignKey:] + 431 CoreFoundation 0x00007fff582541ac __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 122 CoreFoundation 0x00007fff5825409a _CFXRegistrationPost + 4423 CoreFoundation 0x00007fff58253de2 ___CFXNotificationPost_block_invoke + 504 CoreFoundation 0x00007fff58212972 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 18265 CoreFoundation 0x00007fff58211a0c _CFXNotificationPost + 6526 Foundation 0x00007fff5a2ea477 -[NSNotificationCenter postNotificationName:object:userInfo:] + 667 AppKit 0x00007fff55a2cc89 -[NSWindow resignKeyWindow] + 8678 AppKit 0x00007fff55973888 -[NSWindow _changeKeyAndMainLimitedOK:] + 8479 AppKit 0x00007fff55a20e9a -[NSWindow _makeKeyRegardlessOfVisibility] + 10810 AppKit 0x00007fff559768f4 NSPerformVisuallyAtomicChange + 14611 AppKit 0x00007fff55a20dd1 -[NSWindow makeKeyAndOrderFront:] + 9012 libSDL2-2.0.0.dylib 0x000000019893b1b9 Cocoa_ShowWindow + 8913 libSDL2-2.0.0.dylib 0x000000019890d3ba SDL_ShowWindow_REAL + 9014 libtsplayercore.dylib 0x0000000199133172 initPlayerCore + 99415 libtsplayercore.dylib 0x000000019913bdf2 PlayerCore_CreateWithSize + 29016 libtsplayercore.dylib 0x000000019913c9c2 Java_com_ts_apps_system_TPlayerCore_createWithSize + 13017 ??? 0x00000001117f2087 0x0 + 4588511367
)
2022-02-25 09:16:25.302 java[547:10409] Please file a bug report at http://java.net/jira/browse/MACOSX_PORT with this message and a reproducible test case.
2022-02-25 09:16:25.303 java[547:10409] Cocoa AWT: Not running on AppKit thread 0 when expected. (0 libawt_lwawt.dylib 0x000000010eaabdcb -[AWTWindow orderChildWindows:] + 521 CoreFoundation 0x00007fff582541ac __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 122 CoreFoundation 0x00007fff5825409a _CFXRegistrationPost + 4423 CoreFoundation 0x00007fff58253de2 ___CFXNotificationPost_block_invoke + 504 CoreFoundation 0x00007fff58212972 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 18265 CoreFoundation 0x00007fff58211a0c _CFXNotificationPost + 6526 Foundation 0x00007fff5a2ea477 -[NSNotificationCenter postNotificationName:object:userInfo:] + 667 AppKit 0x00007fff55a2cc89 -[NSWindow resignKeyWindow] + 8678 AppKit 0x00007fff55973888 -[NSWindow _changeKeyAndMainLimitedOK:] + 8479 AppKit 0x00007fff55a20e9a -[NSWindow _makeKeyRegardlessOfVisibility] + 10810 AppKit 0x00007fff559768f4 NSPerformVisuallyAtomicChange + 14611 AppKit 0x00007fff55a20dd1 -[NSWindow makeKeyAndOrderFront:] + 9012 libSDL2-2.0.0.dylib 0x000000019893b1b9 Cocoa_ShowWindow + 8913 libSDL2-2.0.0.dylib 0x000000019890d3ba SDL_ShowWindow_REAL + 9014 libtsplayercore.dylib 0x0000000199133172 initPlayerCore + 99415 libtsplayercore.dylib 0x000000019913bdf2 PlayerCore_CreateWithSize + 29016 libtsplayercore.dylib 0x000000019913c9c2 Java_com_ts_apps_system_TPlayerCore_createWithSize + 13017 ??? 0x00000001117f2087 0x0 + 4588511367
)
2022-02-25 09:16:25.303 java[547:10409] Please file a bug report at http://java.net/jira/browse/MACOSX_PORT with this message and a reproducible test case.
2022-02-25 09:16:25.303 java[547:10409] Cocoa AWT: Not running on AppKit thread 0 when expected. (0 libosxapp.dylib 0x000000010eb82144 +[ThreadUtilities getJNIEnv] + 371 libawt_lwawt.dylib 0x000000010eaabbcc -[AWTWindow isBlocked] + 372 libawt_lwawt.dylib 0x000000010eaabe1c -[AWTWindow orderChildWindows:] + 1333 CoreFoundation 0x00007fff582541ac __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 124 CoreFoundation 0x00007fff5825409a _CFXRegistrationPost + 4425 CoreFoundation 0x00007fff58253de2 ___CFXNotificationPost_block_invoke + 506 CoreFoundation 0x00007fff58212972 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 18267 CoreFoundation 0x00007fff58211a0c _CFXNotificationPost + 6528 Foundation 0x00007fff5a2ea477 -[NSNotificationCenter postNotificationName:object:userInfo:] + 669 AppKit 0x00007fff55a2cc89 -[NSWindow resignKeyWindow] + 86710 AppKit 0x00007fff55973888 -[NSWindow _changeKeyAndMainLimitedOK:] + 84711 AppKit 0x00007fff55a20e9a -[NSWindow _makeKeyRegardlessOfVisibility] + 10812 AppKit 0x00007fff559768f4 NSPerformVisuallyAtomicChange + 14613 AppKit 0x00007fff55a20dd1 -[NSWindow makeKeyAndOrderFront:] + 9014 libSDL2-2.0.0.dylib 0x000000019893b1b9 Cocoa_ShowWindow + 8915 libSDL2-2.0.0.dylib 0x000000019890d3ba SDL_ShowWindow_REAL + 9016 libtsplayercore.dylib 0x0000000199133172 initPlayerCore + 99417 libtsplayercore.dylib 0x000000019913bdf2 PlayerCore_CreateWithSize + 29018 libtsplayercore.dylib 0x000000019913c9c2 Java_com_ts_apps_system_TPlayerCore_createWithSize + 13019 ??? 0x00000001117f2087 0x0 + 4588511367
)
2022-02-25 09:16:25.303 java[547:10409] Please file a bug report at http://java.net/jira/browse/MACOSX_PORT with this message and a reproducible test case.
2022-02-25 09:16:25.306 java[547:10409] Apple AWT Internal Exception: java.lang.StackOverflowErrorat com.ts.apps.system.TPlayerCore.createWithSize(Native Method)at com.ts.apps.system.TPlayerCoreFrame$1.run(TPlayerCoreFrame.java:614)at java.lang.Thread.run(Thread.java:748)
2022-02-25 09:16:25.306 java[547:10409] *** Terminating app due to uncaught exception 'JavaNativeException', reason: 'Internal JNF Error: failed calling Throwable.toString()'
*** First throw call stack:
(0 CoreFoundation 0x00007fff582c332b __exceptionPreprocess + 1711 libobjc.A.dylib 0x00007fff7ec51942 objc_exception_throw + 482 CoreFoundation 0x00007fff582c3279 -[NSException raise] + 93 JavaNativeFoundation 0x00007fff5bdb08a0 JNFCallBooleanMethod + 2184 libawt_lwawt.dylib 0x000000010eaabc08 -[AWTWindow isBlocked] + 975 libawt_lwawt.dylib 0x000000010eaabe1c -[AWTWindow orderChildWindows:] + 1336 CoreFoundation 0x00007fff582541ac __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 127 CoreFoundation 0x00007fff5825409a _CFXRegistrationPost + 4428 CoreFoundation 0x00007fff58253de2 ___CFXNotificationPost_block_invoke + 509 CoreFoundation 0x00007fff58212972 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 182610 CoreFoundation 0x00007fff58211a0c _CFXNotificationPost + 65211 Foundation 0x00007fff5a2ea477 -[NSNotificationCenter postNotificationName:object:userInfo:] + 6612 AppKit 0x00007fff55a2cc89 -[NSWindow resignKeyWindow] + 86713 AppKit 0x00007fff55973888 -[NSWindow _changeKeyAndMainLimitedOK:] + 84714 AppKit 0x00007fff55a20e9a -[NSWindow _makeKeyRegardlessOfVisibility] + 10815 AppKit 0x00007fff559768f4 NSPerformVisuallyAtomicChange + 14616 AppKit 0x00007fff55a20dd1 -[NSWindow makeKeyAndOrderFront:] + 9017 libSDL2-2.0.0.dylib 0x000000019893b1b9 Cocoa_ShowWindow + 8918 libSDL2-2.0.0.dylib 0x000000019890d3ba SDL_ShowWindow_REAL + 9019 libtsplayercore.dylib 0x0000000199133172 initPlayerCore + 99420 libtsplayercore.dylib 0x000000019913bdf2 PlayerCore_CreateWithSize + 29021 libtsplayercore.dylib 0x000000019913c9c2 Java_com_ts_apps_system_TPlayerCore_createWithSize + 13022 ??? 0x00000001117f2087 0x0 + 4588511367
)
libc++abi.dylib: terminating with uncaught exception of type JNFException
- 尝试解决一:使用Thread.join(),失败
- 尝试解决二:使用invokeLater(),失败
(已解决)MAC JAVA错误:Cocoa AWT: Not running on AppKit thread 0 when expected相关推荐
- 【已解决】Java “错误:编码GBK 的不可映射字符”
[已解决]Java "错误:编码GBK 的不可映射字符" 正文 import java.awt.*; import java.awt.datatransfer.Clipboard; ...
- 已解决UnicodeDecodeError: ‘ascii‘ codec can‘t decode byte 0x8e in position 0: ordinal not in range(128)
已解决(Python编码问题)UnicodeDecodeError: 'ascii' codec can't decode byte 0x8e in position 0: ordinal not i ...
- Exynos4412 移植Linux-6.1(七)挂载Ramdisk文件系统,【已解决】Couldn‘t find valid RAM disk image starting at 0
系列文章目录 Exynos4412 移植针对Samsung的Linux-6.1(一)下载.配置.编译Linux-6.1 Exynos4412 移植针对Samsung的Linux-6.1(二)SD卡驱动 ...
- 已解决Cause: java.sql.SQLException: Incorrect string value: ‘\\xF0\\x9F\\x8C\\xB8 \\xE5...‘报错
保存订单存入数据库时,报错: "\n### Error updating database. Cause: java.sql.SQLException: Incorrect string v ...
- 解决Error java 错误 不支持发行版本
有时候新建一个Java项目后,运行起来就会提示这样的错误.主要原因是因为项目使用的Java版本和安装的Java版本不符合 ,在这里总结一下解决方法 首先点击file的project 进入后 在pro ...
- 【已解决 Flink Java API问题】The return type of function ‘xxx‘ could not be determined automatically
Flink Java API不像Scala API可以随便写lambda表达式,写完以后需要使用returns方法显式指定返回值类型,否则会报下面错误,大概意思就是说Java的lambda表达式不能提 ...
- 【已解决】Java保存数据超时失败 ClickHouse exception, code 1002, 8123 failed to respon,keep_alive_timeout参数
问题 使用clickhouse作为数据库,存储前端设备采集到的海量数据 使用Java语言开发,连接数据库保存数据,实时分批写入,使用的maven依赖如下: <!-- clickhouse 相关依 ...
- 【已解决】HTTP错误403.14-Forbidden解决办法(WEB开发)
错误提示如图: 403错误系列: 403.1错误是由于"执行"访问被禁止而造成的,若试图从目录中执行CGI.ISAPI或其他可执行程序,但该目录不允许执行程序时便会出现此种错误. ...
- 【已解决】java.lang.NullPointerException at line 15, Solution.r
报错: java.lang.NullPointerException at line 15, Solution.reversePrint at line 57, __DriverSolution__. ...
- 已解决:java.sql.SQLException: Value ‘0000-00-00 00:00:00‘ can not be represented as java.sql.Timestamp
一.问题 一大早到公司 Mysql 中的一个 datetime 字段时碰到了一个 Cause: java.sql.SQLException: Value '0000-00-00 00:00:00' c ...
最新文章
- CENTOS 7安装步骤apache-tomcat-8.5.34-windows-x86
- Mac 使用SSH远程登录
- Vue中使用vue-croper插件实现图片上传裁剪并传到SpringBoot后台接口
- spring data redis 使用之 spring boot 2.x
- python正弦波和等腰三角波_正弦波脉宽调制(SPWM)原理
- 云端一体化差分+安全升级,AliOS Things物联网升级“利器”
- word 转 html cms,Java 将Word文件转换为HTML格式文件
- linux 文件系统 dfs,分布式文件系统fastDFS 机器硬件要求
- XJTUOJ wmq的队伍(树状数组求 K 元逆序对)
- Windows安装apache+php的nts版本
- at android.widget.Toast$TN.handleShow(Toast.java:501)自定义布局异常
- 计算机硬盘小影响,系统C盘容量太小有哪些危害?又要如何扩容呢?今天再说一遍!...
- 浏览器播放RTSP、RTMP等几种编码格式视频流
- Explainability in Graph Neural Networks:A Taxonomic Survey 图可解释
- Responses 部分 | Http Header
- 中国多媒体与网络教学学报杂志中国多媒体与网络教学学报杂志社中国多媒体与网络教学学报编辑部2022年第6期目录
- 以index.wxml为例解析WXML
- 相似度算法--莱文斯坦距离加入同义词逻辑
- AM335x SPL
- windows 定时重启
热门文章
- python 正则表达式 \b 大坑
- 【数据结构】图文详解Treap平衡树
- 山山的数学(困难版)
- autosize px转dp_干货集中营
- python需要学数据结构吗_我也要学python-内置数据结构(一)
- php多个表查询的方法_php+mysql+ajax实现单表多字段多关键词查询的方法
- python eval exec_Python基础教程 使用 exec和eval 执行字符串及计算其结果
- linux gdb 导出到文件怎么打开,GDB基本命令从打开文件到调试结束的教程
- 90后告别第一份工作后,更青睐新一线城市开启职场第二步
- Phoenix报错(5) org.apache.hadoop.hive.ql.metadata.HiveException