After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 618880 - Cheese crashes with SIGSEGV when webcam was already in use
Cheese crashes with SIGSEGV when webcam was already in use
Status: RESOLVED OBSOLETE
Product: cheese
Classification: Applications
Component: general
2.30.x
Other Linux
: Normal critical
: 2.28
Assigned To: Cheese Maintainer(s)
Cheese Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2010-05-17 14:08 UTC by Vish
Modified: 2013-06-26 21:20 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Vish 2010-05-17 14:08:56 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 ;) ]

  • #0 ??
  • #1 ??
    from /usr/lib/gstreamer-0.10/libgstvideo4linux2.so
  • #2 ??
    from /usr/lib/libgstbase-0.10.so.0
  • #3 ??
    from /usr/lib/libgstbase-0.10.so.0
  • #4 ??
    from /usr/lib/libgstbase-0.10.so.0
  • #5 ??
    from /usr/lib/libgstreamer-0.10.so.0
  • #6 ??
    from /usr/lib/libgstreamer-0.10.so.0
  • #7 ??
    from /lib/libglib-2.0.so.0
  • #8 ??
    from /lib/libglib-2.0.so.0
  • #9 start_thread
    from /lib/tls/i686/cmov/libpthread.so.0
  • #10 clone
    from /lib/tls/i686/cmov/libc.so.6

Comment 1 Vish 2010-05-17 14:19:05 UTC
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 ;)
Comment 2 Fabio Durán Verdugo 2010-05-18 19:16:17 UTC
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!
Comment 3 Vish 2010-05-18 20:36:59 UTC
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.

Thread 1 (Thread 0xb6e61750 (LWP 13353))

  • #0 gst_mini_object_free
    at gstminiobject.c line 336
  • #1 gst_mini_object_unref
    at gstminiobject.c line 371
  • #2 gst_message_unref
    at ../gst/gstmessage.h line 320
  • #3 gst_bus_source_dispatch
    at gstbus.c line 763
  • #4 g_main_dispatch
    at /build/buildd/glib2.0-2.24.0/glib/gmain.c line 1960
  • #5 IA__g_main_context_dispatch
    at /build/buildd/glib2.0-2.24.0/glib/gmain.c line 2513
  • #6 g_main_context_iterate
    at /build/buildd/glib2.0-2.24.0/glib/gmain.c line 2591
  • #7 IA__g_main_loop_run
    at /build/buildd/glib2.0-2.24.0/glib/gmain.c line 2799
  • #8 IA__gtk_main
    at /build/buildd/gtk+2.0-2.20.0/gtk/gtkmain.c line 1219
  • #9 main
    at cheese.c line 164
A debugging session is active.

	Inferior 1 [process 13353] will be killed.

Quit anyway? (y or n)
Comment 4 p92 2010-08-27 20:31:06 UTC
I can confirm this behaviour with cheese 2.30.1 on kubuntu lucid
Comment 5 Fabio Durán Verdugo 2010-08-27 20:36:16 UTC
Ok, I change the status to NEW, thank
Comment 6 David King 2013-06-26 21:20:45 UTC
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).