Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
5.7.0
-
None
-
Qt 5.7
macOS 10.12.4
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.5.0
Thread model: posix
Description
Hi,
I have stumbled on the issue of QCamera causing a freeze of the Qt application if the camera is not provided with a QCameraViewfinder. When a capture is invoked vie QCameraImageCapture the thread responsible for obtaining the image starts waiting for an update to the viewfinder (avfimagecapturecontrol.mm). If no viewfinder is specified, no update is signaled and the capture thread just hangs. Thus, the camera does not produce any images. Moreover if stop() of QCamera is called the whole application freezes because the stop() method waits for the capture calls to finish. The documentation states that a viewfinder can be provided but it does not say it is a must.
The effect can be reproduced by using the camera example provided with Qt. If the line that sets the viewfinder in camera.cpp is commented out, the application no-longer shows captured images. Instead it does nothing when the capture button is clicked. By inspecting the threads one can see that the capture thread is blocked.
I have stumbled upon the issue in 5.7. It could still persist in the newer versions.
Attachments
Issue Links
- duplicates
-
QTBUG-60329 QCameraImageCapture isn't working without QCameraViewfinder
- Closed