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

IOS: disconnect second screen while app in b/g, it crashes when app goes into foreground

    XMLWordPrintable

Details

    • iOS/tvOS/watchOS
    • d829d54a42393d797c5f6ab3b80e88df35fad1e4 (qt/qtbase/dev) 51838c964f9e6e62a30a6b5875302b9a8a1c4713 (qt/qtbase/6.1) 697c4b8f491ddc91c3275c604cffa26f226c0001 (qt/tqtc-qtbase/5.15) 5bdb2c8863492316e4fb041ba1f123f1e062048c (qt/qtbase/6.2)

    Description

      After an external screen is disconnected and application returns from the  background it crashes. Also happened with QT sample applications. 

      Looks like Qt creates ViewController for the external screen and then tries to access it, but the screen has already been destroyed by OS.

       

      EXC_BAD_ACCESSQtPrivate::QFunctorSlotObject<-[QIOSViewController
      initWithQIOSScreen:]::$_1, 2, QtPrivate::List<Qt::ApplicationState,
      Qt::ApplicationState>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*
      Attempted to dereference garbage pointer 0x500640078
      

       

      Stack trace (from Bugsnag):
       

      QtPrivate::QFunctorSlotObject<-[QIOSViewController initWithQIOSScreen:]::$_1, 2, QtPrivate::List<Qt::ApplicationState, Qt::ApplicationState>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)        QMetaObject::activate(QObject*, int, int, void**)         QIOSApplicationState::handleApplicationStateChanged(UIApplicationState, QString const&)         ___ZL38qRegisterApplicationStateNotificationsv_block_invoke         qt_main_wrapper
       
      

       

      Steps to reproduce:

          1. Connect device to HDMI / Airplay / Or Mac recording

          2. Start application

          3. Go to background

          4. Disconnect second screen

          5. Return to foreground

       

       

       

      Attachments

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

        Activity

          People

            richard Richard Moe Gustavsen
            nethers David Netherwood
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            6 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes