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

Segfault when creating QQmlApplicationEngine

    XMLWordPrintable

Details

    • macOS
    • 6746417e719cee389a37513f830d5cff1b4b9c25 (qt/qtdeclarative/5.12.0)
    • Bug Fixing Week Q2/2020

    Description

      I haven't been able to reproduce this with a minimal example yet, but when I run Slate (which has been built with a dev build of Qt, with force-asserts), I get a segfault:

      Crashed Thread:        0  Dispatch queue: com.apple.main-thread
      
      Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
      Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000
      Exception Note:        EXC_CORPSE_NOTIFY
      
      Termination Signal:    Segmentation fault: 11
      Termination Reason:    Namespace SIGNAL, Code 0xb
      Terminating Process:   exc handler [1680]
      
      VM Regions Near 0:
      --> 
          __TEXT                 000000010845c000-00000001084ce000 [  456K] r-x/rwx SM=COW  /Users/USER/*/slate.app/Contents/MacOS/slate
      
      Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
      0   org.qt-project.QtQml          	0x000000010954d279 QV4::ExecutionEngine::ExecutionEngine(QJSEngine*)::$_61::operator()() const + 73
      1   org.qt-project.QtQml          	0x0000000109549ed3 QV4::ExecutionEngine::ExecutionEngine(QJSEngine*) + 9411
      2   org.qt-project.QtQml          	0x00000001094414e7 QJSEngine::QJSEngine(QJSEnginePrivate&, QObject*) + 55
      3   org.qt-project.QtQml          	0x000000010958b76e QQmlEngine::QQmlEngine(QQmlEnginePrivate&, QObject*) + 14
      4   org.qt-project.QtQml          	0x000000010961e870 QQmlApplicationEngine::QQmlApplicationEngine(QObject*) + 96
      5   org.example.slate             	0x000000010845cf1d Application::Application(int&, char**, QString const&) + 253 (application.cpp:78)
      6   org.example.slate             	0x000000010846852d Application::Application(int&, char**, QString const&) + 45 (application.cpp:147)
      7   org.example.slate             	0x000000010847b4b9 main + 89 (main.cpp:5)
      8   org.example.slate             	0x000000010845cd74 start + 52
      
      Thread 1:
      0   libsystem_pthread.dylib       	0x00007fff66e32408 start_wqthread + 0
      1   ???                           	0x0000000054485244 0 + 1414025796
      
      Thread 2:
      0   libsystem_pthread.dylib       	0x00007fff66e32408 start_wqthread + 0
      1   ???                           	0x0000000054485244 0 + 1414025796
      
      Thread 3:
      0   libsystem_pthread.dylib       	0x00007fff66e32408 start_wqthread + 0
      1   ???                           	0x0000000054485244 0 + 1414025796
      
      Thread 4:
      0   libsystem_pthread.dylib       	0x00007fff66e32408 start_wqthread + 0
      1   ???                           	0x0000000054485244 0 + 1414025796
      
      Thread 5:
      0   libsystem_pthread.dylib       	0x00007fff66e32408 start_wqthread + 0
      1   ???                           	0x0000000054485244 0 + 1414025796
      
      Thread 6:
      0   libsystem_pthread.dylib       	0x00007fff66e32408 start_wqthread + 0
      
      Thread 7:
      0   libsystem_pthread.dylib       	0x00007fff66e32408 start_wqthread + 0
      1   ???                           	0x0000000000001303 0 + 4867
      
      Thread 8:: QQmlThread
      0   libsystem_kernel.dylib        	0x00007fff66d81b8e poll + 10
      1   org.qt-project.QtCore         	0x000000010879eb70 qt_safe_poll(pollfd*, unsigned int, timespec const*) + 608
      2   org.qt-project.QtCore         	0x00000001087a0546 QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 982
      3   org.qt-project.QtCore         	0x000000010873aa8e QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 366
      4   org.qt-project.QtCore         	0x000000010855544c QThread::exec() + 156
      5   org.qt-project.QtQml          	0x0000000109648159 QQmlThreadPrivate::run() + 57
      6   org.qt-project.QtCore         	0x0000000108556302 QThreadPrivate::start(void*) + 338
      7   libsystem_pthread.dylib       	0x00007fff66e3333d _pthread_body + 126
      8   libsystem_pthread.dylib       	0x00007fff66e362a7 _pthread_start + 70
      9   libsystem_pthread.dylib       	0x00007fff66e32425 thread_start + 13
      

      I tried setting DYLD_IMAGE_SUFFIX=_debug so that I could get a better stack trace, but then I no longer get the crash.

      Attachments

        1. qtbug70937.zip
          3 kB
        2. slate.zip
          2 kB
        For Gerrit Dashboard: QTBUG-70937
        # Subject Branch Project Status CR V

        Activity

          People

            laknoll Lars Knoll
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes