GNOME Bugzilla – Bug 777047
Segfault in cheese_camera_setup
Last modified: 2018-03-11 02:40:57 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
+ Trace 237041
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.
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.
Review of attachment 350192 [details] [review]: Pushed to master as commit c8c75796ff3e723d77bd68dec3fe91a072b36fc4. Thanks!
*** Bug 780849 has been marked as a duplicate of this bug. ***
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.