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

[DeclarativeCamera] The app is crashing when capture photo and switch to video

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.5.4, 6.6.1
    • 6.6.0 Beta4
    • Examples and Demos
    • None
    • Android
    • 2023wk40FOQtforAndroid

    Description

      MacOS 13.5.1 

      Qt Creator 11.0.3

      Device: Google Pixel 3a A12

      Steps to reproduce:

      1. Open the declarative camera example. 
      2. Quickly tap on the capture button several times.
      3. Switch to video.
      4. Tap on Record button.

      Expected: The app should switch to video without any issues.

      Actual: The app crashes.

      Reproducibility:  100% ** 

      D CCodecBuffers: [c2.qti.hevc.encoder#514:2D-BB-Input] updating vstride = 1088
      W ImageReader_JNI: Unable to acquire a buffer item, very likely client tried to acquire more than maxImages buffers
      W ImageReader_JNI: Unable to acquire a buffer item, very likely client tried to acquire more than maxImages buffers
      E AndroidRuntime: FATAL EXCEPTION: CameraBackground
      E AndroidRuntime: Process: org.qtproject.example.declarative_camera, PID: 1092
      E AndroidRuntime: java.lang.IllegalStateException: maxImages (10) has already been acquired, call #close before acquiring more.
      E AndroidRuntime:     at android.media.ImageReader.acquireNextImage(ImageReader.java:560)
      E AndroidRuntime:     at android.media.ImageReader.acquireLatestImage(ImageReader.java:441)
      E AndroidRuntime:     at org.qtproject.qt.android.multimedia.QtCamera2$5.onImageAvailable(QtCamera2.java:236)
      E AndroidRuntime:     at android.media.ImageReader$1.run(ImageReader.java:837)
      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.os.HandlerThread.run(HandlerThread.java:67)
      D C2Store : Using ION
      E ion     : ioctl c0044901 failed with code -1: Invalid argument 

      Attachments

        Issue Links

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

          Activity

            People

              lkos Łukasz Kosiorowski
              lkos Łukasz Kosiorowski
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes