Details
-
Bug
-
Resolution: Duplicate
-
P1: Critical
-
6.4.1
-
None
-
AOSP Android 11, Poco X3, arm64
-
-
2023wk06FOQtforAndroid
Description
(Qt 6.4.1, Android 11 ARM64, QtMultimedia)
When removing a MediaPlayer item (or MediaPlayer based item like Video) at QML runtime, the UI freezes and does not react anymore on Android.
Please check the attached video. screenrecord-2023-02-14_13.23.23.webm
The Android debug feature to show device taps is enabled, so my display taps are marked with a circle.
As it's visible, the whole UI not reacts anymore to clicks as soon setting the Loader to inactive, thus making MediaPlayer item disappear.
The same also happens when there are QML Pages on a Stack and popping the page where a video is played. So the UI stays frozen on the page with the Video.
Another interesting point is, the rotating Rectangle keep rotating while staying in the app. However when switching away to another app and going back to the example, also the Rectangle is frozen. As well lots of spam in the debug log form seemingly an endless loop.
Deadlock in some QtMultimedia code / Android Java Multimedia code?
Example code, also attached: Qt6AndroidMediaPlayerFreeze.zip
import QtQuick import QtQuick.Controls import QtMultimedia Window { width: 640 height: 480 visible: true readonly property string bigbuckbunnyurl: "https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/360/Big_Buck_Bunny_360_10s_1MB.mp4" Page { anchors.fill: parent anchors.margins: 10 Column { Text { text: "Qt6AndroidMediaPlayerFreezeExample" } Rectangle { id: rotatingBox width: 50 height: 50 color: "red" RotationAnimator { target: rotatingBox to: 360 duration: 1000 loops: 999999 running: true } } Button { text: "Loader MediaPlayer+" onClicked: { mediaPlayerLoader.active = true mediaPlayerLoader.item.stop() mediaPlayerLoader.item.play() } } Button { text: "Loader MediaPlayer-" onClicked: mediaPlayerLoader.active = false } Loader { id: mediaPlayerLoader active: false sourceComponent: Video { width: 200 height: 200 source: bigbuckbunnyurl } } } } }
Attachments
Issue Links
- duplicates
-
QTBUG-109168 Unloading Camera (QML) item on Android hangs app.
- Closed
-
QTBUG-110968 Qml Video crash when unloaded on android
- Closed
-
QTBUG-110141 QML app freeze when close an item with Multimedia Control inside
- Closed
-
QTBUG-110797 On android devices, when a 'Video' object is destroyed, the screen does not detect mouse events any more
- Closed