Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
6.1.2
-
-
d082d8ff76080c8e5aa74414c253014bcf7e79c9
Description
This example crashes after clicking the button a few times, because the GC crashes while marking the generator property "gen". I reduced the crash from a larger async code base to this minimal example.
import QtQuick 2.15 import QtQuick.Window 2.15 import QtQuick.Controls 2.2 Window { width: 100 height: 100 visible: true Component { id: textComp Item { property var gen: (function*(){ yield 42; })() Component.onCompleted: { gc() // tries to cleanup old object, but crashes with 'gen' } } } Column { anchors.fill: parent StackView { id: stack width: 100 height: 100 initialItem: Item { } } Button { height: 50 width: 100 text: "Click" onClicked: { if(stack.depth > 1) stack.pop() stack.push(textComp) } } } }
Crashing:
#3 0x00007ffff7c67971 in QV4::Heap::GeneratorObject::markObjects (b=0x7fffe87144e0, stack=0x7fffffff8120) at src/qml/jsruntime/qv4generatorobject_p.h:97