GNOME Bugzilla – Bug 618880
Cheese crashes with SIGSEGV when webcam was already in use
Last modified: 2013-06-26 21:20:45 UTC
Bug first reported in launchpad: https://bugs.launchpad.net/ubuntu/+source/cheese/+bug/543758 User scenario: I have recently (yesterday) upgraded from 9.10 to 10.4 Beta 1. I just installed Cheese and it crashed after about 5 seconds. The problem was that mplayer was open and the same time and "reading" the webcam ie I had run the command "mplayer /dev/v4l/by-id/usb-0402_USB2.0_Camera-video-index0" and that was still running while I tried opening cheese. Shutting down Mplayer fixed the problem and Cheese is working now. Steps to reproduce: 1- From a terminal run: cat /dev/video0 (replace video0 with your camera device) 2- While that is running, Start cheese Cheese now opens and crashes. So the problems seems to be that Cheese throws a segfault when accessing a camera that is already in use. strace: [not much in there though ;) ]
+ Trace 221949
Why I'v set it to major[instead of enhancement or normal] is because this is a valid use-case , where the user could launch cheese when another application is accessing the camera. The reporter was able to identify the problem here. If cheese is automatically closing with no warning or information , users will not be aware of what is going on or realize what/why this is happening. Would be nice if cheese could show a message saying: "Webcam is used by another application. Please close all applications using the Webcam before retrying Cheese Webcam Booth." "Retry Cheese" "Quit Cheese" Would be even better if we could identify the application name and use it in the dialogue ;)
Thanks for taking the time to report this bug. Unfortunately, that stack trace is missing some elements that will help a lot to solve the problem, so it will be hard for the developers to fix that crash. Can you get us a stack trace with debugging symbols? Please see http://live.gnome.org/GettingTraces for more information on how to do so and reopen this bug or report a new one. Thanks in advance!
attaching the gdb. Do note that to make cheese crash that another app must be accessing the webcam. what i have done here is just used $cat /dev/video0 to do that. GNU gdb (GDB) 7.1-ubuntu Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i486-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /usr/bin/cheese...Reading symbols from /usr/lib/debug/usr/bin/cheese...done. done. (gdb) handle SIG33 pass nostop noprint Signal Stop Print Pass to program Description SIG33 No No Yes Real-time event 33 (gdb) set pagination 0 (gdb) run Starting program: /usr/bin/cheese [Thread debugging using libthread_db enabled] [New Thread 0xb5e2eb70 (LWP 13356)] [New Thread 0xb562db70 (LWP 13357)] [New Thread 0xb10b5b70 (LWP 13358)] [New Thread 0xb078bb70 (LWP 13359)] [New Thread 0xaff8ab70 (LWP 13360)] [New Thread 0xaf789b70 (LWP 13361)] [New Thread 0xaef88b70 (LWP 13362)] [Thread 0xb5e2eb70 (LWP 13356) exited] Program received signal SIGSEGV, Segmentation fault.
+ Trace 221976
Thread 1 (Thread 0xb6e61750 (LWP 13353))
A debugging session is active. Inferior 1 [process 13353] will be killed. Quit anyway? (y or n)
I can confirm this behaviour with cheese 2.30.1 on kubuntu lucid
Ok, I change the status to NEW, thank
This has not crashed for a while, and there is now an error message shown to the user if opening the video device fails, or if video could not be read from the webcam (see bug 703123).