Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-137375

Qt 6.9: regular crashes with OpenGL on macOS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.9
    • Qt RHI
    • None
    • macOS

    Description

      Hello,

      since I updated my app to 6.9, my users report regular crashes with the OpenGL RHI back-end on macOS. 
      Same code worked fine on Qt 6.6. The crash always happen during swapBuffers. Same code works fine on all other possible situations (e.g. with the Metal backend, on Linux and Windows with OpenGL, Vulkan and D3D11 / 12).

      Here is for instance such a trace: segfault on an address such as 0x00000000000000b8 hints to something maybe trying to pass a handle instead of a pointer ? but the crash does not occur immediately, things can render for some time and then suddenly crash.

       

      Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
      Exception Codes:       KERN_INVALID_ADDRESS at 0x00000000000000b8
      Exception Codes:       0x0000000000000001, 0x00000000000000b8
      
      Termination Reason:    Namespace SIGNAL, Code 11 Segmentation fault: 11
      Terminating Process:   exc handler [94284]
      
      VM Region Info: 0xb8 is not in any region.  Bytes before following region: 4374544200
            REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
            UNUSED SPACE AT START
      --->  
      
      Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
      0 AppleMetalOpenGLRenderer 0x133bce998 gldUpdateReadFramebuffer + 48
      1 AppleMetalOpenGLRenderer 0x133bd181c gldPresentFramebufferData + 788
      2 GLEngine 0x1f0ba1858 glSwap_Exec + 132
      3 OpenGL 0x1f09a7378 CGLFlushDrawable + 64
      4 AppKit 0x1979c12b8 -[NSOpenGLContext flushBuffer] + 28
      5 ossia score 0x10616852c QCocoaGLContext::swapBuffers(QPlatformSurface*) + 1496
      6 ossia score 0x10d3a205c QOpenGLContext::swapBuffers(QSurface*) + 236
      7 ossia score 0x10d3b5da0 QRhiGles2::endFrame(QRhiSwapChain*, QFlags<QRhi::EndFrameFlag>) + 316
      8 ossia score 0x10d2a2614 QRhi::endFrame(QRhiSwapChain*, QFlags<QRhi::EndFrameFlag>) + 88
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            lagocs Laszlo Agocs
            jcelerier Jean-Michaël Celerier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes