Uploaded image for project: 'Qt Design Studio'
  1. Qt Design Studio
  2. QDS-5105

Live Preview crashes on close on macOS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P2: Important
    • None
    • QDS 2.2 RC1, QDS 3.3
    • QML Live Preview
    • None
    • macOS

    Description

      Closing live preview on mac 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;
      }
      
      

       

       

       

      Attachments

        Issue Links

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

          Activity

            People

              tjenssen Tim Jenssen
              knud Knud Dollereder
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes