GNOME Bugzilla – Bug 662919
dbusservice plugin - Totem crashes when enabled
Last modified: 2012-02-06 17:51:04 UTC
When I enable the "DBus Service" plugin, Totem crashes immediately and I have to disable the plugin using dconf-editor. All Totem prints is "Segmentation fault"; I don't know what to attach other than: """ Program received signal SIGSEGV, Segmentation fault. 0x00007ffff60493df in ?? () from /lib/libc.so.6 (gdb) bt
+ Trace 228929
""" totem 3.2.1-1 (Arch Linux)
What versions of pygobject and pygtk do you have installed? Can you please install debug symbols for Totem, Python, pygobject and pygtk, and reproduce the crash with a more complete stack trace? Thank you. (Please see http://live.gnome.org/GettingTraces for more information on how to do so.)
Program received signal SIGSEGV, Segmentation fault. 0x00007fffda242402 in PyString_FromString (str=0x1 <Address 0x1 out of bounds>) at Objects/stringobject.c:121 121 size = strlen(str); (gdb) bt
+ Trace 228939
python2-gobject 3.0.2-1 python2-gobject2 2.28.6-4 pygtk 2.24.0-2 ...Quite strangely, after I rebuilt packages with debug symbols, totem crashed just *once* (in gdb above) and I cannot reproduce this anymore, even with original packages; the plugin now loads fine. Will test more later today.
Disregard the last comment - I apparently meant "original packages except totem", which I forgot to reinstall. The bug can still be reliably reproduced with original Arch Linux 'totem' package. It turns out that the bug does not appear if I remove all optimization flags from CFLAGS... Anyway, this should be good: Program received signal SIGSEGV, Segmentation fault. 0x00007fffda1f141d in PyString_FromString (str=0x1 <Address 0x1 out of bounds>) at Objects/stringobject.c:121 121 size = strlen(str);
+ Trace 228940
At a guess, this is a pygobject bug.
Sorry, but I can't reproduce it with Totem 3.2.1 on Fedora 16, could you please try to create a small test which triggers this bug?
Created attachment 206767 [details] test plugin that crashes A mimimal Totem plugin that causes a segfault.
I don't know what the proper way of "creating tests" is... I did, however, find out that the plugin crashes at totem.get_supported_uri_schemes() on dbusservice.py:177, and, well, see the attached plugin.
Created attachment 206820 [details] [review] Add NULL to generated lists The issue is that the list by Totem is not NULL-terminated, the attached patch fixes this.
Review of attachment 206820 [details] [review]: Good catch, but the locations in Totem's C code which use *mime_types need updating to ignore the NULL element (since they use G_N_ELEMENTS blindly at the moment). *mime_types is used in totem-uri.c, totem-properties-main.c, totem-object.c and totem-audio-preview.c.
Created attachment 206850 [details] [review] Don't use G_N_ELEMENTS anymore
Review of attachment 206850 [details] [review]: Looks good to me. Please commit to master. Thanks!
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.