QCamera stop working on Android after 4~5 pictures



  • Hi all,

    I want to create a little Android App which uses the camera sensor to take some pictures and send them back to remote server.
    For this, I have used QCamera, based on QML example given in documentation (http://doc.qt.io/qt-5/qml-qtmultimedia-camera.html).

    I have made some basic tests, and all seems to work well. But, if I take about 5 pictures, the app stops working (deadlock).
    And after that, the Camera sensor is locked, event the standard Android Camera App cannot start and display an error message "Unfortunately, Camera has stopped.".
    The only way to get out of this situation is to restart the device.
    I've got the same issue on emulator (API level 21) and on "real" device (API Level 19).

    => I am using Qt 5.7

    Thanks for any help
    Regards

    Fabrice


  • Lifetime Qt Champion

    Hi,

    Can you reproduce that with the example unmodified ? If so you should go to the bug report system to see if it's something known. If not please consider opening a new report providing as much information as possible about your setup and how to trigger the behavior.



  • Sorry for the late reply,
    I was busy on another project!

    The issue I have, seems to be easier to reproduce on Android simulators.
    I have only used to imageCapture function. On my smartphone, I take a picture with imageCapture.capture(), sometime the App is locked. Then the Android Camera module is dead.
    When I reboot the smartphone, the lock seems to be release because I can hear the typical sound emitted when taking a picture.

    I will take a look at bug report system to see if this is a known issue

    Regards


  • Qt Champions 2016

    I am not sure is it related. But I have similar problem in Mac platform. The camera module may freeze after taken 2 photos. But it is not always be reproducible. (Qt 5.6)



  • Hi all,

    I have open a ticket on Qt bug report system => QTBUG-54709
    It seems to be an issue with the image preview callback function.

    Hope this can be fixed for next Qt release :)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.