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 609505 - Segfault on run with cheese 2.29.90
Segfault on run with cheese 2.29.90
Status: RESOLVED OBSOLETE
Product: cheese
Classification: Applications
Component: general
2.29.x
Other Linux
: Normal critical
: ---
Assigned To: Cheese Maintainer(s)
Cheese Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2010-02-10 08:26 UTC by Didier Roche
Modified: 2011-10-26 19:38 UTC
See Also:
GNOME target: ---
GNOME version: 2.27/2.28



Description Didier Roche 2010-02-10 08:26:35 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:

  • #0 free
    from /lib/tls/i686/cmov/libc.so.6
  • #1 IA__g_free
    at /build/buildd/glib2.0-2.23.3/glib/gmem.c line 190
  • #2 cheese_window_init
    at cheese-window.c line 1234
  • #3 IA__g_type_create_instance
    at /build/buildd/glib2.0-2.23.3/gobject/gtype.c line 1871
  • #4 g_object_constructor
    at /build/buildd/glib2.0-2.23.3/gobject/gobject.c line 1396
  • #5 IA__g_object_newv
    at /build/buildd/glib2.0-2.23.3/gobject/gobject.c line 1261
  • #6 IA__g_object_new_valist
    at /build/buildd/glib2.0-2.23.3/gobject/gobject.c line 1377
  • #7 IA__g_object_new
    at /build/buildd/glib2.0-2.23.3/gobject/gobject.c line 1095
  • #8 main
    at cheese.c line 150

Version of glib: 2.23.3

Tell me if you need further information.
Comment 1 Didier Roche 2010-02-13 15:01:29 UTC
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.
Comment 2 Filippo Argiolas 2010-02-13 15:49:24 UTC
(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?
Comment 3 Didier Roche 2010-04-13 12:02:56 UTC
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.
Comment 4 David King 2011-10-26 19:38:28 UTC
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.