Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt, QGLWidget and Xcode 11 = fail?
Forum Updated to NodeBB v4.3 + New Features

Qt, QGLWidget and Xcode 11 = fail?

Scheduled Pinned Locked Moved Unsolved General and Desktop
12 Posts 8 Posters 1.8k Views 3 Watching
  • 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.
  • W Offline
    W Offline
    wesblake
    wrote on last edited by
    #1

    Hi all. So we have this app. It has a QGLWidget rendering on a separate thread for video. This has been working fine through Mac OS Mojave.
    Here comes Catalina. We take our latest build r2330, it was build in Xcode 10. It still work fine in Catalina. Somewhere along the way Xcode updated to 11 on both my Mojave dev machine and Catalina (bootcamp). I can still compile and run it on Mojave. However, if I compile run it in Catalina, or even export and package it on Mojave, then run in Catalina, I get this GLContext crash (EXC_BAD_INSTRUCTION) when the thread tries to start.
    I realize that OpenGL is now completely removed from Catalina but it's my understanding Qt has taken care of this (app is based on 5.12.0 BTW, I have also tried 5.13.1) and that makes sense since older versions (2330 built on Xcode 10 and even our last major version based on 5.9.6 run just fine on Catalina.
    So, the only factor that has changed here is Xcode (and I assume that means Base SDK!)
    I don't get it. I'm at a loss here. Why?! We even tried opening a technical support ticket with Apple as this still feels like early Catalina problems (we ran through a LOT of them turning out to be Apple) and they seem to want to push this back on Qt, so I'm putting this her pin case anyone has ideas. Still looking for the button to attach my crash report. ;)

    1 Reply Last reply
    1
    • K Offline
      K Offline
      kuroki
      wrote on last edited by
      #2

      I have a similar crash with a Qt3DQuickWindow. Before Catalina this was reported as a warning but now it causes a crash:

      Crashed Thread: 44 Qt3DRender::Render::RenderThread

      Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
      Exception Note: EXC_CORPSE_NOTIFY

      Application Specific Information:
      -[NSOpenGLContext setView:] must be called from the main thread.

      I'm guessing this is the same problem right?

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        I would rather bring this to the internet mailing list. You'll find there Qt's developers/maintainers. This forum is more user oriented.

        As for the crash report, you should check the bug report system.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • C Offline
          C Offline
          CroCo
          wrote on last edited by
          #4

          Do you have to use XCode? Have you tried other OpenGL libraries and a different C++ compiler?

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @CroCo Xcode is the only officially supported compiler on macOS.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            C 1 Reply Last reply
            1
            • SGaistS SGaist

              @CroCo Xcode is the only officially supported compiler on macOS.

              C Offline
              C Offline
              CroCo
              wrote on last edited by
              #6

              @SGaist what do you mean? Other C++ compilers can't guarantee same performance, I'm talking about g++.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                I mean that Qt is built and tested only with Xcode as it is the only officially supported compiler on macOS.

                Other compilers may work, however, they are not supported.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                1
                • W Offline
                  W Offline
                  wesblake
                  wrote on last edited by
                  #8

                  But this is "Qt Development" forum no? I don't know that it's a bug, I think it's Apple and was asking in case there was just a config or some other thing I had to do to get around it.
                  I do have an update. The problem is the new SDK. If I go back to a carbon copy backup I have with Xcode 10 (therefore 10.14 SDK) and build, I can run the built package in Catalina too. If I build on Xcode 11 (so SDK 10.15) it builds and runs on Mojave, but has the crash on Catalina. The problem appears to be a bug in SDK 10.15, or a compatibility issue between Qt and SDK 10.15

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    benjaminwelle
                    wrote on last edited by benjaminwelle
                    #9

                    I am facing the same problem right now. We use Qt 5.9.1 on MacOS and just upgraded from Mojave to Catalina (and therefore Xcode 10.3 to Xcode 11.3.1) and now our software doesn't start anymore, crashing at the following call stack:

                    1 -[NSOpenGLContext setView:]                      (x86_64) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit                  0x7fff35db5acc 
                    2 -[QNSView setQCocoaGLContext:]                   (x86_64) /Users/Shared/Qt5.9.1/5.9.1/clang_64/plugins/platforms/libqcocoa.dylib         0x10fb4ccb7    
                    3 QCocoaGLContext::makeCurrent(QPlatformSurface *) (x86_64) /Users/Shared/Qt5.9.1/5.9.1/clang_64/plugins/platforms/libqcocoa.dylib         0x10fb80fdc    
                    4 QOpenGLContext::makeCurrent(QSurface *)          (x86_64) /Users/Shared/Qt5.9.1/5.9.1/clang_64/lib/QtGui.framework/Versions/5/QtGui      0x106917b5c    
                    5 QSGRenderThread::run()                           (x86_64) /Users/Shared/Qt5.9.1/5.9.1/clang_64/lib/QtQuick.framework/Versions/5/QtQuick  0x1074d006d    
                    6 QThreadPrivate::start(void *)                    (x86_64) /Users/Shared/Qt5.9.1/5.9.1/clang_64/lib/QtCore.framework/Versions/5/QtCore    0x10634ae7f    
                    7 _pthread_start                                   (x86_64) /usr/lib/system/libsystem_pthread.dylib                                        0x7fff700f5e65 
                    8 thread_start                                     (x86_64) /usr/lib/system/libsystem_pthread.dylib                                        0x7fff700f183b 
                    

                    This is the main message of the MacOS crash report:

                    System Integrity Protection: enabledCrashed Thread:        9  QSGRenderThreadException Type:        EXC_BAD_INSTRUCTION (SIGILL)
                    Exception Codes:       0x0000000000000001, 0x0000000000000000
                    Exception Note:        EXC_CORPSE_NOTIFYTermination Signal:    Illegal instruction: 4
                    Termination Reason:    Namespace SIGNAL, Code 0x4
                    Terminating Process:   exc handler [74166]Application Specific Information:
                    -[NSOpenGLContext setView:] must be called from the main thread.
                    

                    Is there any news about this problem?

                    @wesblake @kuroki How did you solve the problem?

                    jsulmJ 1 Reply Last reply
                    0
                    • B benjaminwelle

                      I am facing the same problem right now. We use Qt 5.9.1 on MacOS and just upgraded from Mojave to Catalina (and therefore Xcode 10.3 to Xcode 11.3.1) and now our software doesn't start anymore, crashing at the following call stack:

                      1 -[NSOpenGLContext setView:]                      (x86_64) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit                  0x7fff35db5acc 
                      2 -[QNSView setQCocoaGLContext:]                   (x86_64) /Users/Shared/Qt5.9.1/5.9.1/clang_64/plugins/platforms/libqcocoa.dylib         0x10fb4ccb7    
                      3 QCocoaGLContext::makeCurrent(QPlatformSurface *) (x86_64) /Users/Shared/Qt5.9.1/5.9.1/clang_64/plugins/platforms/libqcocoa.dylib         0x10fb80fdc    
                      4 QOpenGLContext::makeCurrent(QSurface *)          (x86_64) /Users/Shared/Qt5.9.1/5.9.1/clang_64/lib/QtGui.framework/Versions/5/QtGui      0x106917b5c    
                      5 QSGRenderThread::run()                           (x86_64) /Users/Shared/Qt5.9.1/5.9.1/clang_64/lib/QtQuick.framework/Versions/5/QtQuick  0x1074d006d    
                      6 QThreadPrivate::start(void *)                    (x86_64) /Users/Shared/Qt5.9.1/5.9.1/clang_64/lib/QtCore.framework/Versions/5/QtCore    0x10634ae7f    
                      7 _pthread_start                                   (x86_64) /usr/lib/system/libsystem_pthread.dylib                                        0x7fff700f5e65 
                      8 thread_start                                     (x86_64) /usr/lib/system/libsystem_pthread.dylib                                        0x7fff700f183b 
                      

                      This is the main message of the MacOS crash report:

                      System Integrity Protection: enabledCrashed Thread:        9  QSGRenderThreadException Type:        EXC_BAD_INSTRUCTION (SIGILL)
                      Exception Codes:       0x0000000000000001, 0x0000000000000000
                      Exception Note:        EXC_CORPSE_NOTIFYTermination Signal:    Illegal instruction: 4
                      Termination Reason:    Namespace SIGNAL, Code 0x4
                      Terminating Process:   exc handler [74166]Application Specific Information:
                      -[NSOpenGLContext setView:] must be called from the main thread.
                      

                      Is there any news about this problem?

                      @wesblake @kuroki How did you solve the problem?

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      @benjaminwelle Did you try with more recent Qt version?

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • W Offline
                        W Offline
                        withnail99
                        wrote on last edited by
                        #11

                        I also have this problem. App running fine on Windows, just now got it building on Mac, using Qt 5.12.8, and have the same exception from Qt3DRender::Renderer::doRender() -> [NSOpenGLSetContext setView] -> exception.

                        mrjjM 1 Reply Last reply
                        0
                        • W withnail99

                          I also have this problem. App running fine on Windows, just now got it building on Mac, using Qt 5.12.8, and have the same exception from Qt3DRender::Renderer::doRender() -> [NSOpenGLSetContext setView] -> exception.

                          mrjjM Offline
                          mrjjM Offline
                          mrjj
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          @withnail99
                          Hi
                          Are you sure 5.12 is supported?
                          Catalina is 10.15 ?

                          https://doc.qt.io/qt-5.12/supported-platforms.html

                          alt text

                          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