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

Crash during QML item creation

    XMLWordPrintable

Details

    • Windows
    • 66893cd71 (dev) 3f8a4345c3907d64509793e0fbcc9c2fda0d59b3 2d7fe23b41aa3fd719b7bc8aa585ab799e4a0c39

    Description

      Starting our QML app in Qt 6.4.1 sometimes crashes in MSVC Windows debug build in the place shown in the attached screenshot.

      The QML file set in setMainQmlFile() is unfortunately too complex and has too many dependencies that we could share it.

      Screenshot however reveals that in QQmlObjectCreator::setupFunctions(),

      "name" is empty

      "QQmlPropertyData *property" retrieved from cache is then nullptr and code crashes when referencing a null pointer.

      Maybe there should be a null check?

      This does not happen every time the app is launched but maybe 10% of times, so it's timing dependant.

       

      Edit: Exactly the same crash happens also about as often when creating a semi-complex QML item once the app is running,

      by a call to Qt.createQmlObject().

       

      It seems that in compilationUnit->runtimeFunctions there are lots of these empty functions with codeOffset and codeSize being zero and name being empty

      and the crash happens when it for some reason tries to set up one of those in QQmlObjectCreator::setupFunctions().

       

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-109314
          # Subject Branch Project Status CR V

          Activity

            People

              ulherman Ulf Hermann
              -mtuokko- Mikko Tuokko
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes