Totem crashes on startup

Bug #367573 reported by devo
36
This bug affects 4 people
Affects Status Importance Assigned to Milestone
totem (Ubuntu)
Fix Released
Low
Martin Pitt
Lucid
Fix Released
Low
Martin Pitt

Bug Description

Binary package hint: totem

Description: Ubuntu 9.04
Release: 9.04

totem:
  Installed: 2.26.1-0ubuntu5
  Candidate: 2.26.1-0ubuntu5
  Version table:
 *** 2.26.1-0ubuntu5 0
        500 http://archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status

Well, I expect it to work and open up.

What happened instead is it crashes and the output it gives me in the console is this...

** (totem:21700): WARNING **: Could not import pygtk
ImportError: No module named pygtk
Segmentation fault

I have pygtk installed though according to Synaptic so I don't see what the problem is. I've tried reinstalling it and reinstalling totem and nothing changes...

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please try to obtain a backtrace following the instructions at http://wiki.ubuntu.com/DebuggingProgramCrash and upload the backtrace (as an attachment) to the bug report. This will greatly help us in tracking down your problem.

Changed in totem (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Sebastien Bacher (seb128) wrote :

What videocard and driver do you use?

Revision history for this message
Josecuervo86 (josecuervo86) wrote :

The same thing happen to me. Totem really needs pygtk? Before install Jaunty i have no problem whit it.

Ps: sorry for my english

Revision history for this message
devo (msburson) wrote :

Here's the debug information. I hope this helps.

Revision history for this message
Sebastien Bacher (seb128) wrote :

the issue seems due to the fact that pygtk is incorrectly installed

Changed in totem (Ubuntu):
status: Incomplete → New
Revision history for this message
Sebastien Bacher (seb128) wrote :

is pygtk installed?

Revision history for this message
devo (msburson) wrote :

The output I get when I try the command

sudo apt-get install python-gtk2

is

Reading package lists... Done
Building dependency tree
Reading state information... Done
python-gtk2 is already the newest version.
python-gtk2 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.

Revision history for this message
Sebastien Bacher (seb128) wrote :

can you use other pygtk softwares? pygtk-demo for example

Revision history for this message
devo (msburson) wrote :

I guess not because I get this

~/Desktop/pygtk-2.12.1/examples/pygtk-demo$ python pygtk-demo.py
Traceback (most recent call last):
  File "pygtk-demo.py", line 18, in <module>
    import gobject
ImportError: No module named gobject

I guess I need something like pyGnome?

Revision history for this message
Sebastien Bacher (seb128) wrote :

python-gobject should be installed you have a weird installation issue

Revision history for this message
Josecuervo86 (josecuervo86) wrote :

I have the same "weird installation issue" :P

Revision history for this message
devo (msburson) wrote :

How can I fix this? I tried installing python-gobject and I got

devo@devo-desktop:~/Desktop/pygtk-2.12.1/examples/pygtk-demo$ sudo apt-get install python-gobject
[sudo] password for devo:
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-gobject is already the newest version.
python-gobject set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.

I have installed my own installation of python 3.0 but... I don't believe that would conflict with my other installations of python... I'm guessing this is not longer a Totem problem and is now a "weird installation" problem. Heh.

Revision history for this message
Josecuervo86 (josecuervo86) wrote :

I agree with that, because i have the same problem with Rhythmbox and Screenlets.

Screenlets:
josecuervo86@josecuervo86-desktop:~$ screenlets
Traceback (most recent call last):
  File "/usr/share/screenlets-manager/screenlets-manager.py", line 25, in <module>
    import pygtk
ImportError: No module named pygtk

Rhythmbox:
josecuervo86@josecuervo86-desktop:~$ rhythmbox
(rhythmbox:12376): Rhythmbox-WARNING **: Could not import pygtk
ImportError: No module named pygtk
Fallo de segmentación

affects: totem (Ubuntu) → python-support (Ubuntu)
Changed in python-support (Ubuntu):
assignee: Ubuntu Desktop Bugs (desktop-bugs) → nobody
Revision history for this message
devo (msburson) wrote :

How can this be fixed if uninstalling the pygtk library and uninstalling the application and then reinstalling them doesn't work. This problem only started happening when I upgraded to Jaunty.

Revision history for this message
anonyMouse (21973145b) wrote :

may be it can help... i solved similar problem by this.

http://community.livejournal.com/ubuntu_users/411194.html

p.s.: Sorry for my english

Revision history for this message
Josecuervo86 (josecuervo86) wrote :

Thank you!! This just solve my problem!!! I remove all the files that started with python from /usr/local/bin

Pd: sorry for my english

Revision history for this message
devo (msburson) wrote :

Yeah. Deleting the python binary in /usr/local/bin fixed the problem.

Revision history for this message
ovoid (mail-cosmin) wrote :

I have no problems with /usr/local/bin - there is only my own scripts - but pygtk do work 'strange' on my machine to. It may be a compatibility issue, since my Totem and Rhythmbox work ootb, but my simple, elementar pygtk script (that us to work in 8.10) don't work anymore. And the error message is not very pythonic, or human readable, so, back to WX...

Revision history for this message
devo (msburson) wrote :

ovoid, a good command to help you troubleshoot would be in the terminal, 'which python'. This will, tell you which binary the command python refers to. The problem that the python binary in /usr/local/bin was that it wasn't referencing the proper paths to libraries such as PyGTK.

Revision history for this message
Kenneth (kennethgustav) wrote :
Download full text (5.9 KiB)

This is my firts comment :D
I speak sapnish so sorry for my future gramatical mistakes..

When i open totem
whit GDB
$ gdb totem
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(no debugging symbols found)
(gdb) run
Starting program: /usr/bin/totem
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---ryn
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---run
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---run
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(n...

Read more...

Revision history for this message
Kenneth (kennethgustav) wrote :

I think that this bug have a relation (sotty english) whit the themes..
because it was wokring fine..

Revision history for this message
Kenneth (kennethgustav) wrote :

Fix :D

Revision history for this message
Kenneth (kennethgustav) wrote :

no no fix

Revision history for this message
devo (msburson) wrote :

With gdb you have to install the debugger symbols from Synaptic in or for it to work. Did you read the previous comments?

Revision history for this message
Kenneth (kennethgustav) wrote : Re: [Bug 367573] Re: Totem crashes on startup

Nop sorry

2009/6/20 devo <email address hidden>

> With gdb you have to install the debugger symbols from Synaptic in or
> for it to work. Did you read the previous comments?
>
> --
> Totem crashes on startup
> https://bugs.launchpad.net/bugs/367573
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “python-support” source package in Ubuntu: New
>
> Bug description:
> Binary package hint: totem
>
> Description: Ubuntu 9.04
> Release: 9.04
>
> totem:
> Installed: 2.26.1-0ubuntu5
> Candidate: 2.26.1-0ubuntu5
> Version table:
> *** 2.26.1-0ubuntu5 0
> 500 http://archive.ubuntu.com jaunty/main Packages
> 100 /var/lib/dpkg/status
>
> Well, I expect it to work and open up.
>
> What happened instead is it crashes and the output it gives me in the
> console is this...
>
> ** (totem:21700): WARNING **: Could not import pygtk
> ImportError: No module named pygtk
> Segmentation fault
>
> I have pygtk installed though according to Synaptic so I don't see what the
> problem is. I've tried reinstalling it and reinstalling totem and nothing
> changes...
>

Revision history for this message
Hagen (hagenf) wrote :

I had the same problem after upgrading to Jaunty and solved it by deleting my self-installed /usr/local/bin/python.

Maybe totem should explicitly use /usr/bin/python instead of the one first found on the path?

Revision history for this message
Loïc Minier (lool) wrote :

This is certainly not a python-support problem.

totem uses libpython to test-load pygtk. People reported here that removing /usr/local/bin/python helped with this situation, but totem doesn't run that. Could it be that you removed /usr/loca/lib/python* instead? That would be a more plausible explanation.

affects: python-support (Ubuntu) → ubuntu
Revision history for this message
devo (msburson) wrote :

This bug is so old. And Totem doesn't use Python? Totem isn't written in Python? Also, Totem would use the /usr/local/bin/python because that would be the Python that every program using Python in that environment would be using... So removing that one would make sense... Anyways, whatever. This is such an old bug.

Revision history for this message
chrismuris (chrismuris) wrote :

i got this bug after a kernel upgrade in Karmic. I solved the issue by reinstalling python-gtk2.

Revision history for this message
Adam S (skewmeister) wrote :

While totem isn't written in Python, many of its plugins are, and totem has a module written to handle python plugins. So if a python coded plugin is enabled when totem is closed, a custom python installed in /usr/local/bin/, and totem restarted, when it reloads its python based plugins import errors occur because the custom python can't find required modules (as described in the link provided by anonyMouse on 2009-05-10).

An alternative to deleting the python binaries from /usr/local/bin is to go to /usr/lib/totem/plugins and prevent access to any folder (using chmod 700 <folder> or tarballing for example) that is a python based plugin (the folder will contain .py/.pyc files). While this is still a band-aid solution, it is an option for those who wish to keep their custom python install in preference to totem's plugins.

Revision history for this message
Hagen (hagenf) wrote :

I figured out why deleting /usr/local/bin/python solves the problem: As Loïc said, this is surprising because totem uses libpython and not the python executable. However, libpython tries to be clever and looks for the executable itself. That's why deleting the executable steers it towards the system default python in /usr, where pygtk can be found and everything is fine.

A very simple workaround and possibly a fix for the bug is to set PYTHONHOME to "/usr", i.e. call Totem with "PYTHONHOME=/usr totem".

I still think that Totem shouldn't segfault on a missing pygtk, though. The problem with this is in totem-python-module.c: If pygtk can't be found, "totem_python_module_init_python" simply prints a warning and returns. "init_pygobject" is never called, but "totem_python_module_load" later calls "pyg_gil_state_ensure", which leads to the segfault.

Revision history for this message
Hagen (hagenf) wrote :

I filed an upstream bug with patch for the segfault issue:

https://bugzilla.gnome.org/show_bug.cgi?id=615437

Revision history for this message
Hagen (hagenf) wrote :

The segfault was fixed in upstream, so totem shouldn't become unusable any more, but rather show errors and then disable the Python plugins.

The workaround (set PYTHONHOME) stays valid.

Revision history for this message
Adam S (skewmeister) wrote :

Very nice workaround Hagen, can confirm it works in Intrepid and Karmic.

Revision history for this message
Martin Pitt (pitti) wrote :

Fixed upstream.

affects: ubuntu → totem (Ubuntu)
Changed in totem (Ubuntu):
status: New → Fix Committed
Changed in totem (Ubuntu Lucid):
assignee: nobody → Martin Pitt (pitti)
Revision history for this message
Martin Pitt (pitti) wrote :

SRU team members: Debdiff for 2.30.1 update (which has a fix for this) is attached to bug 535426.

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted totem into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Fabio Marconi (fabiomarconi) wrote :

Verified: OK
uninstalled and reinstalled, everythings ok.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

I've tested the proposed package, the crash is not there anymore, instead a warning is presented to the user, the bug is fixed, thanks for the work.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package totem - 2.30.1-0ubuntu1

---------------
totem (2.30.1-0ubuntu1) lucid-proposed; urgency=low

  [ Martin Pitt ]
  * New upstream bug fix release. Changes since our last git snapshot:
    - Fix crashes on exit.
    - Fix possible crasher when PyGTK isn't available. (LP: #367573)
    - Require gstreamer 0.10.28.1 for queue2 fixes.
    - Fix Youtube search lasting forever while playing Video. (LP: #559862)
    - Fix artifacts or black screen when paused. (LP: #535426)
    - Translation updates.
  * 90_autotools.patch: Refresh for new upstream version.
  * 90_autotools.patch: Revert upstream change of bumping gstreamer
    dependency to 0.10.28.1; set it back to 0.10.28. There are no queue2
    related changes in totem since our previous git snapshot, so this can't
    make a difference.

  [ Loïc Minier ]
  * totem.preinst: Actually remove alternatives by checking for action
    "upgrade" instead of "configure" which isn't used with preinsts; bump
    version to 2.30.0git20100413-0ubuntu2 for that to be effective.
 -- Martin Pitt <email address hidden> Wed, 28 Apr 2010 15:58:47 +0200

Changed in totem (Ubuntu Lucid):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Copied lucid-proposed to maverick.

Changed in totem (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.