Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Chinese
  4. 求助各位大佬前辈,qt6.8.1 项目跑在 ios 18中使用opengl api,出现死机问题
Forum Updated to NodeBB v4.3 + New Features

求助各位大佬前辈,qt6.8.1 项目跑在 ios 18中使用opengl api,出现死机问题

Scheduled Pinned Locked Moved Unsolved Chinese
2 Posts 1 Posters 364 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    imwusong
    wrote on last edited by
    #1

    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和死机问题就不再出现

    在我的个人项目中,也是如此
    跪求各位大佬指点迷津!!!万分感谢!!!

    1 Reply Last reply
    0
    • I Offline
      I Offline
      imwusong
      wrote on last edited by
      #2

      示例工程项目为:Scene Graph - OpenGL Under QML

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved