GNOME Bugzilla – Bug 570087
python plugins crash at startup without a tty
Last modified: 2009-02-03 20:10:35 UTC
Steps to reproduce: 1. enable pythonconsole, bbc-plugin or youtube-plugin 2. start a media file from nautilus leads to crash 3. start a media file from command line runs ok Stack trace: /var/log/kern.log: totem[12160]: segfault at b0 ip 0808e3aa sp bfb09a70 error 4 in totem-gstreamer[8048000+59000] Other information: Ubuntu 8.10 (uptodate, all ubuntu repositories enabled, no media-related ppa-sources) totem 2.24.3-0ubuntu1 GStreamer 0.10.21
Thanks for taking the time to report this bug. Without a stack trace from the crash it's very hard to determine what caused it. Can you get us a stack trace? Please see http://live.gnome.org/GettingTraces for more information on how to do so. Thanks in advance!
Ah, sorry - I forgot to add the information I already noted in Ubuntu bug 570087... Starting totem from command line (with or without a file) shows: ** (totem:12240): DEBUG: Init of Python module ** (totem:12240): DEBUG: Registering Python plugin instance: YouTube+TotemPythonPlugin ** (totem:12240): DEBUG: Creating object of type YouTube+TotemPythonPlugin ** (totem:12240): DEBUG: Creating Python plugin instance ** (totem:12240): DEBUG: Init of Python module ** (totem:12240): DEBUG: Registering Python plugin instance: PythonConsolePlugin+TotemPythonPlugin ** (totem:12240): DEBUG: Creating object of type PythonConsolePlugin+TotemPythonPlugin ** (totem:12240): DEBUG: Creating Python plugin instance ** (totem:12240): DEBUG: Init of Python module ** (totem:12240): DEBUG: Registering Python plugin instance: BBCViewer+TotemPythonPlugin ** (totem:12240): DEBUG: Creating object of type BBCViewer+TotemPythonPlugin ** (totem:12240): DEBUG: Creating Python plugin instance AND runs successfully. I disabled then the above mentioned plugins in the preferences and afterwards totem does also start by opening a media file directly. My interpretation is: during init of python plugins this DEBUG output is made, but when starting by clicking a file there is no tty (or a silenced one), which leads to the crash. As I don't know how to trigger the crash from command line, I don't know how to proceed with gdb. Switching the plugins off is at least a workaround.
grr, in ubuntu it's https://bugs.launchpad.net/ubuntu/+source/totem/+bug/323235
Does the same thing happen when running, for example, Rhythmbox with the Jamendo or Coherence plugins activated? Rhythmbox and Totem have pretty much the same code for loading plugins, and those two plugins are Python-based.
Created attachment 127778 [details] rhythmbox debug output
Hi, thanks for the answer. I noticed that the problem has to do with embedded python in general: - rhythmbox segfaults while loading the python-console plugin - gedit shows critical warnings while init of python gobject - totem crashes when started from nautilus and initialising python I'll attach the rhythbox crasher here, as I still don't know how to reproduce the totem crash.
Created attachment 127779 [details] rhythmbox backtrace
Created attachment 127780 [details] gedit_start.log
Looks like you've got a problem with your Python or PyGObject installation somehow. Gedit's failing to import pygobject, and all the programs are crashing because Python's failing to initialise. Try reinstalling all your Python-related packages. Even though it does seem to be a problem that isn't Totem's, there are things we could do better…such as not crashing. I'll try and put together a patch during the week.
Looks like a bug in your setup indeed.
My fault! Sorry :( This seems to be an actual instance of https://bugzilla.redhat.com/show_bug.cgi?id=481572 and https://bugzilla.redhat.com/show_bug.cgi?id=482814 I'm a hobby python programmer and downloaded some recipes from ASPN and saved them in my $HOME - one of them was a custom optparse.py! Now most python libs will ask for optparse sooner or later and as $HOME seems to be the CWD for the whole Xorg session all my GUI apps crashed with a SIGSEV when opened from nautilus. Thanks for your efforts.
2009-02-03 Philip Withnall <philip@tecnocode.co.uk> * src/plugins/totem-python-module.c (totem_python_module_load): Ensure Python's initialised before loading any Python modules. Makes Totem more robust in the case of bug #570087.