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

Crash when moving application to background and bring it back

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.7.0 RC, 6.8.0 FF
    • 6.7.0 RC
    • Other
    • None
    • Android
    • 211e51b81 (dev), ec9eb9d90 (6.7)
    • 2024wk08FOQtforAndroid

    Description

      Bug can be reproduced on current DEV branch, but not on installed 6.7.0-beta3.

      It is enough to run simple empty-window app:

      import QtQuick
      Window {
          width: 640
          height: 480
          visible: true
      }
      

      After application started - just move the app to background and bring it back.

      Application will crash FATAL EXCEPTION:

      E AndroidRuntime: FATAL EXCEPTION: main
      E AndroidRuntime: Process: org.qtproject.example.appDialog, PID: 2991
      E AndroidRuntime: java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
      E AndroidRuntime:     at android.view.ViewGroup.addViewInner(ViewGroup.java:5247)
      E AndroidRuntime:     at android.view.ViewGroup.addView(ViewGroup.java:5076)
      E AndroidRuntime:     at android.view.ViewGroup.addView(ViewGroup.java:5048)
      E AndroidRuntime:     at org.qtproject.qt.android.QtWindow.lambda$createSurface$2$org-qtproject-qt-android-QtWindow(QtWindow.java:114)
      E AndroidRuntime:     at org.qtproject.qt.android.QtWindow$$ExternalSyntheticLambda10.run(Unknown Source:18)
      E AndroidRuntime:     at android.os.Handler.handleCallback(Handler.java:938)
      E AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:99)
      E AndroidRuntime:     at android.os.Looper.loopOnce(Looper.java:201)
      E AndroidRuntime:     at android.os.Looper.loop(Looper.java:288)
      E AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:7842)
      E AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method)
      E AndroidRuntime:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
      E AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003) 

       

      It can be reproduced on a real device and also on emulator.

      Please take a look on attached video: EMU_Pixel_7_API32.mp4

       

      Attachments

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

        Activity

          People

            bartlomiejmoskal Bartlomiej Moskal
            bartlomiejmoskal Bartlomiej Moskal
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes