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

Crash after calling QQmlEngine::clearComponentCache()

    XMLWordPrintable

    Details

      Description

      Sometimes calling QQmlEngine::clearComponentCache() causes a crash deep in the QML engine. This problem seems to be timing-dependant, attached is a testcase that reproduces the problem after some iterations. Sometimes the program aborts with a segfault, sometimes with different asserts.

      Attached is also a GDB backtrace for one of the crashes, and a valgrind log of another crash. Note that the valgrind log is from another project, I did not manage to reproduce this with valgrind and the minimal testcase, probably because the timings under valgrind are very different.

      While the attached testcase might seem silly, the real-world usecase of this is to provide quick reloading of the QML files while a program is running, to reduce the time between changing QML source and testing it in a program to almost nothing.

        Attachments

        1. crash-testcase.tar.gz
          1 kB
        2. gdb-backtrace.txt
          20 kB
        3. qtbug41465.zip
          2 kB
        4. valgrind-log.txt
          4 kB

          Issue Links

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

            Activity

              People

              Assignee:
              shausman Simon Hausmann
              Reporter:
              tmcguire Thomas McGuire
              Votes:
              8 Vote for this issue
              Watchers:
              17 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes