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 570087 - python plugins crash at startup without a tty
python plugins crash at startup without a tty
Status: RESOLVED NOTGNOME
Product: totem
Classification: Core
Component: Plugins
2.24.x
Other All
: High critical
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2009-02-01 14:08 UTC by Nikolaus Filus
Modified: 2009-02-03 20:10 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
rhythmbox debug output (29.15 KB, text/plain)
2009-02-02 19:21 UTC, Nikolaus Filus
Details
rhythmbox backtrace (5.24 KB, text/plain)
2009-02-02 19:22 UTC, Nikolaus Filus
Details
gedit_start.log (2.32 KB, text/plain)
2009-02-02 19:23 UTC, Nikolaus Filus
Details

Description Nikolaus Filus 2009-02-01 14:08:08 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
Comment 1 Philip Withnall 2009-02-01 14:59:00 UTC
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!
Comment 2 Nikolaus Filus 2009-02-01 18:39:45 UTC
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.
Comment 3 Nikolaus Filus 2009-02-01 18:40:35 UTC
grr, in ubuntu it's https://bugs.launchpad.net/ubuntu/+source/totem/+bug/323235
Comment 4 Philip Withnall 2009-02-01 23:31:42 UTC
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.
Comment 5 Nikolaus Filus 2009-02-02 19:21:41 UTC
Created attachment 127778 [details]
rhythmbox debug output
Comment 6 Nikolaus Filus 2009-02-02 19:22:06 UTC
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.
Comment 7 Nikolaus Filus 2009-02-02 19:22:46 UTC
Created attachment 127779 [details]
rhythmbox backtrace
Comment 8 Nikolaus Filus 2009-02-02 19:23:10 UTC
Created attachment 127780 [details]
gedit_start.log
Comment 9 Philip Withnall 2009-02-02 21:42:05 UTC
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.
Comment 10 Bastien Nocera 2009-02-03 17:08:47 UTC
Looks like a bug in your setup indeed.
Comment 11 Nikolaus Filus 2009-02-03 19:14:45 UTC
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.
Comment 12 Philip Withnall 2009-02-03 20:10:35 UTC
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.