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

QObject changes to undefined when accessed from multiple QML engines

    XMLWordPrintable

Details

    • 4d375f3f2b95bfcb322402df3525db6cc7a723ce

    Description

      When using a QObject in one QML engine, destructing the engine, and using the same object in another QML engine, the second access to the QObject causes a TypeError of undefined object.

      Attached is a simple test program that can be used to reproduce the issue. When running the program with QV4_MM_AGGRESSIVE_GC env variable set, the following error gets printed when accessing the testObject second time from the second QML engine:

      test.qml:8: TypeError: Cannot read property 'objectName' of undefined

      The issue can be reproduced with the current HEAD from 5.5 branch (commit 31ee12e). Haven't tried with 5.5.0 beta but I guess this can be reproduced also there.

      Attachments

        Issue Links

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

          Activity

            People

              erikv Erik Verbruggen
              jfrits Juho Frits
              Votes:
              7 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes