Details
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