From 8694b9002f011d0c93b6e25fae381508c4ce54b0 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Fri, 21 Apr 2017 12:29:22 +0200 Subject: Add an autotest for GC crashes on some platforms Related to QTBUG-59977, where crashes were seen on some platforms. Try to prevent this from creeping out and inconveniencing other modules again. Task-number: QTBUG-59977 Change-Id: I89730c7882e4d87e6049f087724988a7aa52d5a5 Reviewed-by: Lars Knoll --- .../auto/qml/qqmlengine/data/testGCCorruption.qml | 29 ++++++++++++++++++++++ tests/auto/qml/qqmlengine/tst_qqmlengine.cpp | 11 +++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 tests/auto/qml/qqmlengine/data/testGCCorruption.qml diff --git a/tests/auto/qml/qqmlengine/data/testGCCorruption.qml b/tests/auto/qml/qqmlengine/data/testGCCorruption.qml new file mode 100644 index 0000000000..8728b9b915 --- /dev/null +++ b/tests/auto/qml/qqmlengine/data/testGCCorruption.qml @@ -0,0 +1,29 @@ +import QtQml 2.0 + +QtObject { + id: root + property int count: 10000; + property var items: []; + + property Component component: Component { + id: component; + QtObject { + } + } + + property int iterations: 0 + Component.onCompleted: { + for (var iterations = 0; iterations < 5; ++iterations) { + for (var i=0; i