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

invisible app Window crashes Qt-debug on Android

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.9.0
    • 5.8.0
    • QPA
    • built with macOS Sierra
      ran on Alcatel phone, Android 6.0.1
    • Android
    • 09e7a994d14a0582912551ca1342e3b695cf3a86

    Description

      In a Qt Quick app, when the app window is invisible by default (to be made visible shortly thereafter), Qt assertion fails:
      qt/qtbase/src/corelib/global/qglobal.cpp:3070 (void qt_assert(const char*, const char*, int)): ASSERT: "m_windowStack.contains(window)" in file /Users/chris/Projects/Suitable/qt/qtbase/src/plugins/platforms/android/qandroidplatformscreen.cpp, line 162

      It's pretty clear what's happening. In "qandroidplatformscreen.cpp", window objects (QAndroidPlatformWindow) are added/removed from 'm_windowStack'. In "qandroidplatformwindow.cpp" function 'QAndroidPlatformWindow::setVisible' calls either 'addWindow' if visible or 'removeWindow' if invisible. 'QAndroidPlatformScreen::removeWindow' asserts that 'm_windowStack' contains the window prior to removing it, which is not the case if the window is not initially visible.

      So it seems to me that either the caller (setVisible) should check to see that the window can be removed prior to calling 'removeWindow', or else 'removeWindow' should not make such an assertion.

      Attachments

        1. AndroidAssertTest.tar.gz
          1 kB
          Christopher Anderson
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            giantguppy Christopher Anderson
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes