求助各位大佬前辈,qt6.8.1 项目跑在 ios 18中使用opengl api,出现死机问题
-
qt版本:6.8.1
macos版本:mac mini m1 15.2 (24C101)
xcode版本:16.2 (16C5032a)
真机版本:IOS 18.2我运行了qt中的opengl示例工程,编译成功后,到xcode中真机调试,出现这样的log
Modifying properties of a view's layer off the main thread is not allowed: view <QUIView: 0x12fe0b670> with no associated or ancestor view controller; backtrace:
(
0 UIKitCore 0x000000019cc52a2c 7AA438B3-9711-382F-AC72-F18E3E6E31C6 + 4803116
1 UIKitCore 0x000000019c7e3d34 7AA438B3-9711-382F-AC72-F18E3E6E31C6 + 154932
2 QuartzCore 0x000000019bba5968 11118903-4DEA-370F-8565-FBA1257BCEA5 + 96616
3 QuartzCore 0x000000019bba57e0 11118903-4DEA-370F-8565-FBA1257BCEA5 + 96224
4 QuartzCore 0x000000019bc1a2a8 11118903-4DEA-370F-8565-FBA1257BCEA5 + 574120
5 QuartzCore 0x000000019bdac9a0 11118903-4DEA-370F-8565-FBA1257BCEA5 + 2222496
6 OpenGLES 0x00000001faa588e4 0EFC2074-1A56-3D85-A44F-9DCEA4DE0EE4 + 26852
7 openglunderqmlapp 0x0000000106b54f18 _ZN11QIOSContext11makeCurrentEP16QPlatformSurface + 1136
8 openglunderqmlapp 0x00000001059579d8 _ZN14QOpenGLContext11makeCurrentEP8QSurface + 496
9 openglunderqmlapp 0x0000000105978a90 _ZNK9QRhiGles213ensureContextEP8QSurface + 296
10 openglunderqmlapp 0x0000000105978ff0 _ZN9QRhiGles26createE6QFlagsIN4QRhi4FlagEE + 940
11 openglunderqmlapp 0x000000010574a66c _ZN4QRhi6createENS_14ImplementationEP14QRhiInitParams6QFlagsINS_4FlagEEP17QRhiNativeHandles + 584
12 openglunderqmlapp 0x00000001066f7914 _ZN13QSGRhiSupport9createRhiEP12QQuickWindowP8QSurfaceb + 1536
13 openglunderqmlapp 0x00000001069b7050 _ZN15QSGRenderThread9ensureRhiEv + 252
14 openglunderqmlapp 0x00000001069b77a4 _ZN15QSGRenderThread3runEv + 356
15 openglunderqmlapp 0x000000010522ee1c _ZZN14QThreadPrivate5startEPvENK3$_1clEv + 732
16 openglunderqmlapp 0x000000010522d4c0 _ZN12_GLOBAL__N_122terminate_on_exceptionIZN14QThreadPrivate5startEPvE3$1EEvOT + 24
17 openglunderqmlapp 0x000000010522d444 _ZN14QThreadPrivate5startEPv + 224
18 libsystem_pthread.dylib 0x00000001f808268c _pthread_start + 104
19 libsystem_pthread.dylib 0x00000001f8082498 thread_start + 8
)运行一段时间后就死机了
Execution of the command buffer was aborted due to an error during execution. Caused GPU Timeout Error (00000002:kIOGPUCommandBufferCallbackErrorTimeout)
Execution of the command buffer was aborted due to an error during execution. Caused GPU Timeout Error (00000002:kIOGPUCommandBufferCallbackErrorTimeout)
Execution of the command buffer was aborted due to an error during execution. Caused GPU Timeout Error (00000002:kIOGPUCommandBufferCallbackErrorTimeout)
Execution of the command buffer was aborted due to an error during execution. Caused GPU Timeout Error (00000002:kIOGPUCommandBufferCallbackErrorTimeout)
Execution of the command buffer was aborted due to an error during execution. Caused GPU Timeout Error (00000002:kIOGPUCommandBufferCallbackErrorTimeout)
Execution of the command buffer was aborted due to an error during execution. Ignored (for causing prior/excessive GPU errors) (00000004:kIOGPUCommandBufferCallbackErrorSubmissionsIgnored)
Terminating due to blacklisting by kernel driver在main.cpp中,指定使用了opengl api
QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL);将其注释之后,无法使用opengl,但是随之以上的警告log和死机问题就不再出现
在我的个人项目中,也是如此
跪求各位大佬指点迷津!!!万分感谢!!!