Webcam cannot start after interrupted access with "VIDIOC_STREAMON: Invalid argument"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
v4l-utils (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Hi,
I am trying to make my first application in C++ with OpenCV, where I am trying to capture images from the built-in webcam on my Lenovo T450s. I use Eclipse CDT as my IDE to write code and debug. During several trials, sometimes I need to STOP running applications via Eclipse (probably through some interrupt signal). Whenever the application is interrupted, during the next run it cannot access the webcam and is returning
"VIDIOC_STREAMON: Invalid argument"
Apparently this is because resources are not released due to the interrupt. Also VLC cannot access webcam after I start seeing this error.
Apparently there are 1-2 reports about this issue related to OpenCV and kernel, and there is also a workaround by handling SIGINT properly and correctly exiting. I could not work that solution in Eclipse, because probably Eclipse STOP button does not send SIGINT but some other signal. Nevertheless, I was expecting kernel to handle this in another way, so that resources would be released automatically to allow other applications to access webcam.
However, webcam cannot be accessed after a program is interrupted.
lsb_release -rd
Description: Ubuntu 14.04.3 LTS
Release: 14.04
uname -r
3.13.0-68-generic
References:
http://
http://
https:/
http://
Please don't hesitate to ask for more information about the issue and correct me if my report isn't useful or sufficient.
Update: After further testing, I realized Eclipse is sending SIGTERM signal, which if handled does not cause above mentioned issue. However, a program may still crash or terminated without handling it properly. This should not cause any issue for other applications.
affects: | xawtv (Ubuntu) → v4l-utils (Ubuntu) |
description: | updated |