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

Declarative Camera Example orientation errors on Android 13 / Android 14

    XMLWordPrintable

Details

    • Android
    • 6209079c7 (dev), 7aeffcebb (6.7), 66d178921 (tqtc/lts-6.5)
    • 2023wk48FOQtforAndroid, 2023wk50FOQtforAndroid, 2023wk52FOQtforAndroid, 2024wk02FOQtforAndroid, 2024wk04FOQtforAndroid, 2024wk06FOQtforAndroid, 2024wk10FOQtforAndroid, 2024wk12FOQtforAndroid, 2024wk14FOQtforAndroid

    Description

      I've encountered an issue with qml camera usage during testing the new release candidate on my new Pixel 8 dev phone. Starting up the qml camera in portrait mode displays the camera stream in VideoOutput also in portrait mode. When changing orientation of the phone, the camera stream does not change orientation. I verified this behaviour from my application with the declarative camera, and there it was the same. I further tested on different devices:

       

      {}Pixel 4 Android 13 Qt 6.5.3:

      Declarative camera is working as expected

      Pixel 6 Android 14 Qt 6.5.3:

      Declarative camera starts normal, landscape switch is working turning back does not rotate the video stream

      Pixel 8 Android 14 Qt 6.5.3:

      Declarative camera starts normal, then camera stream goes completely weird.

       

      I've attached screenshots from all devices.

      Also when starting camera on Android 14 there are some Jave exceptions in logcat here on Pixel 8:

      I libc    : SetHeapTaggingLevel: tag level set to 0
      I larative_camera: Late-enabling -Xcheck:jni
      I larative_camera: Using CollectorTypeCC GC.
      D CompatibilityChangeReporter: Compat change id reported: 171979766; UID 10294; state: ENABLED
      D CompatibilityChangeReporter: Compat change id reported: 242716250; UID 10294; state: DISABLED
      W ziparchive: Unable to open '/data/app/~~8GnnA7-jxVo-n_jJH4dR9Q==/org.qtproject.example.declarative_camera-0JkIv9z7GN8kEpSAqg5hBg==/base.dm': No such file or directory
      W ziparchive: Unable to open '/data/app/~~8GnnA7-jxVo-n_jJH4dR9Q==/org.qtproject.example.declarative_camera-0JkIv9z7GN8kEpSAqg5hBg==/base.dm': No such file or directory
      D nativeloader: Configuring clns-6 for other apk /data/app/~~8GnnA7-jxVo-n_jJH4dR9Q==/org.qtproject.example.declarative_camera-0JkIv9z7GN8kEpSAqg5hBg==/base.apk. target_sdk_version=31, uses_libraries=, library_path=/data/app/~~8GnnA7-jxVo-n_jJH4dR9Q==/org.qtproject.example.declarative_camera-0JkIv9z7GN8kEpSAqg5hBg==/lib/arm64:/data/app/~~8GnnA7-jxVo-n_jJH4dR9Q==/org.qtproject.example.declarative_camera-0JkIv9z7GN8kEpSAqg5hBg==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/org.qtproject.example.declarative_camera
      V GraphicsEnvironment: Currently set values for:
      V GraphicsEnvironment:   angle_gl_driver_selection_pkgs=[]
      V GraphicsEnvironment:   angle_gl_driver_selection_values=[]
      V GraphicsEnvironment: ANGLE GameManagerService for org.qtproject.example.declarative_camera: false
      V GraphicsEnvironment: org.qtproject.example.declarative_camera is not listed in per-application setting
      V GraphicsEnvironment: Neither updatable production driver nor prerelease driver is supported.
      D vulkan  : searching for layers in '/data/app/~~8GnnA7-jxVo-n_jJH4dR9Q==/org.qtproject.example.declarative_camera-0JkIv9z7GN8kEpSAqg5hBg==/lib/arm64'
      D vulkan  : searching for layers in '/data/app/~~8GnnA7-jxVo-n_jJH4dR9Q==/org.qtproject.example.declarative_camera-0JkIv9z7GN8kEpSAqg5hBg==/base.apk!/lib/arm64-v8a'
      W System  : ClassLoader referenced unknown path:
      D Qt JAVA : Class org.qtproject.qt.android.multimedia.QtAudioDeviceManager does not implement setActivity method
      I QtCore  : Start
      I Qt      : qt started
      D CompatibilityChangeReporter: Compat change id reported: 210923482; UID 10294; state: DISABLED
      D CompatibilityChangeReporter: Compat change id reported: 37756858; UID 10294; state: ENABLED
      D CompatibilityChangeReporter: Compat change id reported: 247079863; UID 10294; state: DISABLED
      D CompatibilityChangeReporter: Compat change id reported: 237531167; UID 10294; state: DISABLED
      D libEGL  : loaded /vendor/lib64/egl/libGLES_mali.so
      I CameraManagerGlobal: Connecting to camera service
      D CompatibilityChangeReporter: Compat change id reported: 236825255; UID 10294; state: DISABLED
      D qml     : : State: MobilePortrait
      D qml     : : State: MobilePortrait
      E CameraCaptureSession: Session 0: Exception while stopping repeating:
      E CameraCaptureSession: android.hardware.camera2.CameraAccessException: CAMERA_DISCONNECTED (2): checkPidStatus:2157: The camera device has been disconnected
      E CameraCaptureSession:     at android.hardware.camera2.CameraManager.throwAsPublicException(CameraManager.java:1633)
      E CameraCaptureSession:     at android.hardware.camera2.impl.ICameraDeviceUserWrapper.cancelRequest(ICameraDeviceUserWrapper.java:99)
      E CameraCaptureSession:     at android.hardware.camera2.impl.CameraDeviceImpl.stopRepeating(CameraDeviceImpl.java:1357)
      E CameraCaptureSession:     at android.hardware.camera2.impl.CameraCaptureSessionImpl.close(CameraCaptureSessionImpl.java:579)
      E CameraCaptureSession:     at android.hardware.camera2.impl.CameraCaptureSessionImpl$2.onDisconnected(CameraCaptureSessionImpl.java:805)
      E CameraCaptureSession:     at android.hardware.camera2.impl.CameraDeviceImpl$7.run(CameraDeviceImpl.java:268)
      E CameraCaptureSession:     at android.os.Handler.handleCallback(Handler.java:958)
      E CameraCaptureSession:     at android.os.Handler.dispatchMessage(Handler.java:99)
      E CameraCaptureSession:     at android.os.Looper.loopOnce(Looper.java:205)
      E CameraCaptureSession:     at android.os.Looper.loop(Looper.java:294)
      E CameraCaptureSession:     at android.os.HandlerThread.run(HandlerThread.java:67)
      E CameraCaptureSession: Caused by: android.os.ServiceSpecificException: checkPidStatus:2157: The camera device has been disconnected (code 4)
      E CameraCaptureSession:     at android.os.Parcel.createExceptionOrNull(Parcel.java:3071)
      E CameraCaptureSession:     at android.os.Parcel.createException(Parcel.java:3041)
      E CameraCaptureSession:     at android.os.Parcel.readException(Parcel.java:3024)
      E CameraCaptureSession:     at android.os.Parcel.readException(Parcel.java:2966)
      E CameraCaptureSession:     at android.hardware.camera2.ICameraDeviceUser$Stub$Proxy.cancelRequest(ICameraDeviceUser.java:648)
      E CameraCaptureSession:     at android.hardware.camera2.impl.ICameraDeviceUserWrapper.cancelRequest(ICameraDeviceUserWrapper.java:97)
      E CameraCaptureSession:     ... 9 more
      I ImeTracker: org.qtproject.example.declarative_camera:bce17953: onRequestHide at ORIGIN_CLIENT_HIDE_SOFT_INPUT reason HIDE_SOFT_INPUT
      I ImeTracker: org.qtproject.example.declarative_camera:bce17953: onFailed at PHASE_CLIENT_VIEW_SERVED
      D qml     : : State: MobileLandscape
      E Surface : freeAllBuffers: 1 buffers were freed while being dequeued!
      E Surface : freeAllBuffers: 2 buffers were freed while being dequeued!
      D qml     : : State: MobilePortrait
      E Surface : freeAllBuffers: 1 buffers were freed while being dequeued!
      E Surface : freeAllBuffers: 1 buffers were freed while being dequeued! 

       

      Attachments

        1. Pixel4_landscape_2.png
          Pixel4_landscape_2.png
          1.64 MB
        2. Pixel4_portrait_1.png
          Pixel4_portrait_1.png
          1.69 MB
        3. Pixel4_portrait_3.png
          Pixel4_portrait_3.png
          2.06 MB
        4. Pixel6_landscape_2.png
          Pixel6_landscape_2.png
          1.61 MB
        5. Pixel6_portrait_1.png
          Pixel6_portrait_1.png
          1.79 MB
        6. Pixel6_portrait_3-1.png
          Pixel6_portrait_3-1.png
          794 kB
        7. Pixel8_landscape_2.png
          Pixel8_landscape_2.png
          675 kB
        8. Pixel8_portrait_1.png
          Pixel8_portrait_1.png
          1.51 MB
        9. Pixel8_portrait_3.png
          Pixel8_portrait_3.png
          812 kB

        Issue Links

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

          Activity

            People

              lapohjan Lauri Pohjanheimo
              mikewhite Michael Heiser
              Votes:
              9 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes