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

Garbage collection deletes TabView's tab

    XMLWordPrintable

    Details

      Description

      See test-case.

      I get:
      TabView.qml:247: TypeError: Cannot read property '__inserted' of null

      followed by a crash if I press a tab.

      This happens because gc deleted the tab. The code in TabView.qml looks correct, and gives a parent to tab, so this must be a js engine problem.

      I'm only calling gc() explicitly in this test-case, in real life it's being called automatically.

      I tried another test-case where I moved gc() outside of the OnCompleted block, into a MouseArea onClicked handler, and I can't reproduce any longer, so it looks like the problem is when gc() is called and we're inside a OnCompleted handler.

      Works perfectly with 5.2.1

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              shausman Simon Hausmann
              Reporter:
              iamsergio Sergio Martins
              Votes:
              7 Vote for this issue
              Watchers:
              17 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes