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 777047 - Segfault in cheese_camera_setup
Segfault in cheese_camera_setup
Status: RESOLVED FIXED
Product: cheese
Classification: Applications
Component: general
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: Cheese Maintainer(s)
Cheese Maintainer(s)
: 780849 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-01-09 15:30 UTC by Viktor Radnai
Modified: 2018-03-11 02:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Correctly select the device if specified on the command line (2.00 KB, patch)
2017-04-21 10:03 UTC, Benjamin Berg
committed Details | Review

Description Viktor Radnai 2017-01-09 15:30:26 UTC
Cheese crashes on startup when I try to use it with an Omnivision VEHO film scanner, a 5MP webcam-like device that is designed to scan film and negatives.

The same camera works with 3.14.1 on an older system (that also has older kernel and libv4l). The device works with Camorama on both systems.

The USB device ID and name of the device is 05a9:1550 OmniVision Technologies, Inc. VEHO Filmscanner

This is the backtrace of the crash:
(gdb) run -d /dev/video1
Starting program: /usr/bin/cheese -d /dev/video1
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe8f9b700 (LWP 19181)]
[New Thread 0x7fffe3fff700 (LWP 19182)]
[New Thread 0x7fffe37fe700 (LWP 19183)]

(cheese:19176): Gtk-WARNING **: Theme parsing error: cheese.css:7:35: The style property GtkScrollbar:min-slider-length is deprecated and shouldn't be used anymore. It will be removed in a future version
[New Thread 0x7fffdada5700 (LWP 19187)]

Thread 1 "cheese" received signal SIGSEGV, Segmentation fault.
0x00007ffff58da931 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
(gdb) bt
  • #0 ??
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #1 g_object_set_valist
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #2 g_object_set
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #3 cheese_camera_setup
    from /usr/lib/x86_64-linux-gnu/libcheese.so.8
  • #4 cheese_application_setup_camera
  • #5 ??
  • #6 g_closure_invoke
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #7 ??
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #8 g_signal_emit_valist
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #9 g_signal_emit
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #10 ??
  • #11 ffi_call_unix64
    from /usr/lib/x86_64-linux-gnu/libffi.so.6
  • #12 ffi_call
    from /usr/lib/x86_64-linux-gnu/libffi.so.6
  • #13 g_cclosure_marshal_generic_va
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #14 ??
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #15 g_signal_emit_valist
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #16 g_signal_emit
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #17 ??
    from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
  • #18 ??
    from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
  • #19 g_application_run
    from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
  • #20 _vala_main
  • #21 __libc_start_main
    at ../csu/libc-start.c line 291
  • #22 _start

Comment 1 Benjamin Berg 2017-04-21 10:03:24 UTC
Created attachment 350192 [details] [review]
Correctly select the device if specified on the command line

Due to a bug in the VAPI file the code would pass a string to the camera
setup routine instead of a CameraDevice object. As the setup routine
already has code to automatically select an appropriate device based on
the name passing an argument is not even required.

Note that the --device parameter might be somewhat confusing as it
refers to the devices name and not to the /dev/videoX device file.
Comment 2 Benjamin Berg 2017-04-21 10:07:51 UTC
Note that even with the patch the API is somewhat broken. It is mandatory to call cheese_camera_setup exactly once after creating the CheeseCamera object (and e.g. destroying CheeseCamera without it will result in warnings). Also creating a CheeseCameraDevice object is likely to involve duplicating the enumeration of devices that happens in cheese_camera_setup already.
Comment 3 David King 2017-05-30 07:19:57 UTC
Review of attachment 350192 [details] [review]:

Pushed to master as commit c8c75796ff3e723d77bd68dec3fe91a072b36fc4. Thanks!
Comment 4 Felipe Borges 2017-10-18 11:21:45 UTC
*** Bug 780849 has been marked as a duplicate of this bug. ***
Comment 5 pablo.bianchi 2018-03-11 02:40:57 UTC
I have also this bug or should file a new one?

    $ cheese -d /dev/video1                                                                                                                                                                                                                                                                                                
    Segmentation fault (core dumped)

With gdb:

(gdb) run -d /dev/video1
Starting program: /usr/bin/cheese -d /dev/video1
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7f62c7071700 (LWP 16562)]
[New Thread 0x7f62c6870700 (LWP 16563)]
[New Thread 0x7f62c5e62700 (LWP 16573)]
[New Thread 0x7f62b2f2d700 (LWP 16585)]

Thread 1 "cheese" received signal SIGSEGV, Segmentation fault.
0x00007f62d5137a51 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0


Ubuntu 16.04.4 LTS, cheese 3.18.1-2ubuntu3




[0] https://www.ebay.com/itm/401504362730 Aveo Technology Corp.