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

GC crash in dev branch

    XMLWordPrintable

Details

    Description

      The following code crashes in qmlscene on macOS (reliably, after two iterations):

      import QtQuick 2.6
      
      Item {
          id: root
          property int count: 10000;
          property var items: [];
      
          Component {
              id: component;
              QtObject {
              }
          }
      
          Timer {
              interval: 1
              repeat: true
              running: true
              onTriggered: allocate()
          }
      
          property int iterations: 0
          function allocate() {
              console.log(++iterations)
              for (var i=0; i<items.length; ++i) {
                  items[i].destroy();
              }
      
              for (var i=0; i<root.count; ++i) {
                  var object = component.createObject();
                  items[i] = object
              }
          }
      }
      

      Does not appear to crash on Linux.

      Attachments

        Issue Links

          Activity

            People

              laknoll Lars Knoll
              w00t Robin Burchell
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: