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

[QtQuickTest] Calling grabImage() will crash the application when window is not shown

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • 5.3.2
    • 5.3.0 RC1
    • Testing: QuickTest
    • None
    • Mac (Qt5.2.1)
      Linux (Qt5.3 RC)
    • 1bc6afe8e0eb21e83f0acda8fdb263670e3172e8 (5.3 branch, 21.7.2014, 5.3.2)

    Description

      Hi,

      I would like to report two problems about QtQuickTest. I think it should be more easy to explain by source code:

      tst_grabImage.qml :

      import QtQuick 2.0
      import QtTest 1.0
      
      Rectangle {
          id : win
          width: 480
          height: 640
          color : "black";
      
          TestCase {
              function test_basic(){
                  wait(10000);
                  var image = grabImage(win);
              }
      
          }
      
      }
      

      The code is executed by quick_test_main() function.

      Expectation:

      1) A window should be launched with a black rectangle

      2) After 10s, it will grab the image

      The result:
      1) No window is shown.

      2) The application crash after 10s called grabImage()

      Attachments

        1. qtbug38945.zip
          1.0 kB
        2. qtbug38945_stack.txt
          34 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kleint Friedemann Kleint
            benlau Ben Lau
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes