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

Live Preview crashes on close on macOS

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.2.0 RC
    • QML: Tooling
    • None
    • macOS

      Closing live preview on macOS from within Design Studio crashes the qml process.

      The Application Output window shows:

      15:15:53: The program has unexpectedly finished.
      15:15:53: /Users/knud/src/qt/qt6.2/install_debug/bin/qml crashed.
      15:15:53: The process was ended forcefully.
      15:15:53: /Users/knud/src/qt/qt6.2/install_debug/bin/qml crashed.

      and shortly thereafter a system dialog pops up, mentioning that "qml quit unexpectedly" that I have to close by pressing a button.

      The reason seems to be in QQmlMetaType::unregisterInternalCompositeType. In the last call

      of this function QQmlMetaTypeDataPtr is invalid "default constructed". Wrapping the following calls in an if statement, checking for validity of data (like below) seems to solve the issue for me.

      qqmlmetatype.cpp:600

      if (auto data = QQmlMetaTypeDataPtr(); data.isValid()) {
              if (QQmlValueType *vt = data->metaTypeToValueType.take(metaType.id()))
                  delete vt;
              if (QQmlValueType *vt = data->metaTypeToValueType.take(listMetaType.id()))
                  delete vt;
      }
      
      

       

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

            qtqmlteam Qt Qml Team User
            knud Knud Dollereder
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes