GNOME Bugzilla – Bug 609505
Segfault on run with cheese 2.29.90
Last modified: 2011-10-26 19:38:28 UTC
I only get the core dump when a webcam is present on the system. I can reproduce it on at least 2 different boxes:
+ Trace 220517
Version of glib: 2.23.3 Tell me if you need further information.
More info, apparently, it seems you have redundant functions (and so, symbols) in both cheese and libcheese-gtk which puzzles the library calling them when building with -Wl,-Bsymbolic-functions LDFLAGS. Here is a nm of both binaries which shows that the following symbols are present in both sides: cheese_camera_device_get_type cheese_camera_device_monitor_coldplug cheese_camera_device_monitor_get_type cheese_camera_device_monitor_new cheese_camera_get_type cheese_gconf_get_type Here are the full nm output: [18:38 ~/Desktop/cheese/usr]% nm -D bin/cheese | grep ' T ' 08066ca0 T _cheese_marshal_VOID__STRING_STRING_STRING_INT 08066e1c T _fini 0804ffa8 T _init 08063150 T cheese_camera_device_get_type 08064ba0 T cheese_camera_device_monitor_coldplug 08064ac0 T cheese_camera_device_monitor_get_type 08064b70 T cheese_camera_device_monitor_new 080604b0 T cheese_camera_get_type 0805eaf0 T cheese_gconf_get_type 08063070 T cheese_video_format_get_type [18:38 ~/Desktop/cheese/usr]% nm -D lib/libcheese-gtk.so.17 | grep ' T ' 000068d0 T cheese_avatar_chooser_get_picture 00006820 T cheese_avatar_chooser_get_type 00006980 T cheese_avatar_chooser_new 0000e5a0 T cheese_camera_device_get_type 0000fff0 T cheese_camera_device_monitor_coldplug 0000ff10 T cheese_camera_device_monitor_get_type 0000ffc0 T cheese_camera_device_monitor_new 0000b900 T cheese_camera_get_type 00009f50 T cheese_gconf_get_type 0000e4c0 T cheese_video_format_get_type 000094c0 T cheese_widget_get_camera 00009550 T cheese_widget_get_gconf 00009390 T cheese_widget_get_type 00009440 T cheese_widget_get_video_area 000095e0 T cheese_widget_new 00007850 T um_crop_area_get_type Hope this can help.
(In reply to comment #1) > More info, > > apparently, it seems you have redundant functions (and so, symbols) in both > cheese and libcheese-gtk which puzzles the library calling them when building > with -Wl,-Bsymbolic-functions LDFLAGS. Are you sure this is related with the segfault you are getting? I could be wrong but it seems we're freeing a possibly unitialized pointer there, could you try to remove "g_free (gconf_effects);" from src/cheese-window.c line 1274 and see if you can still reproduce the crash? I'm not so experienced with library linking but reading autotools documentation about convenience libraries it seems we're doing it properly, do you have any idea about how could we improve it?
Sorry, I didn't forget that, just being sidetrack. So, I rebuilt first the last version with -Bsymbolic-functions and removing the g_free of gconf object (moved in 2.30.0) in cheese_window_init(). Well, there is no more segmentation fault, but the UI is hanging (I read that there is a assert which isn't reach (initialization value != 0 failed)" in g_once_init_leave. Seems related as it doesn't find a freed object. Well, my guess is (as once removing -Bsymbolic-functions we don't have the bug again) that there is one buggy cheese_gconf_get_type() function (they are both present in your lib and in cheese itself). IIRC, -Bsymbolic-functions will enforce the call to be in the same file, right whereas without it it will try to get it in cheese, not the lib. Hope that can help you.
Cheese was ported to GSettings for 3.0, so any problems with GConf should be obsolete. Please reopen if you can still reproduce this bug after testing with the latest version.