← Back to team overview

desktop-packages team mailing list archive

[Bug 1518726] Re: Webcam cannot start after interrupted access with "VIDIOC_STREAMON: Invalid argument"

 

** Package changed: xawtv (Ubuntu) => v4l-utils (Ubuntu)

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to v4l-utils in Ubuntu.
https://bugs.launchpad.net/bugs/1518726

Title:
  Webcam cannot start after interrupted access with "VIDIOC_STREAMON:
  Invalid argument"

Status in v4l-utils package in Ubuntu:
  New

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://answers.opencv.org/question/28929/acquiring-video-from-webcam-problems/
  http://askubuntu.com/questions/683327/libv4l2-error-turning-on-stream-invalid-argument-vidioc-streamon-invalid-argu
  https://lawlorcode.wordpress.com/2014/04/08/opencv-fix-for-v4l-vidioc_s_crop-error/
  http://ubuntuforums.org/showthread.php?t=2298140

  Please don't hesitate to ask for more information about the issue and
  correct me if my report isn't useful or sufficient.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/v4l-utils/+bug/1518726/+subscriptions