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

Inline component causes stack overflow with QQuickTest (endless recursion)

    XMLWordPrintable

Details

    • All

    Description

      The following code causes endless recursion stack overflow crash. This only happens testing QML in QtQuickTest. Attached is a example project of the crash.

      import QtQuick 2.15
      import QtTest 1.0
      
      Item {
          width: 300
          height: 300
      
          component MyItem : Rectangle {
              width: 100
              height: 100
              color: "red"
          }
      
          MyItem {
      
          }
      
          TestCase {
              name: "my_test_3000"
      
              function test_case1() {
                  compare(1 + 1, 2, "sanity check");
                  verify(true);
              }
          }
      }
      
      

      Attachments

        1. quickTest2.zip
          4 kB
          Philip Schuchardt

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              vpicaver Philip Schuchardt
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes