Software Center not start, infinite loading

Bug #891499 reported by Anderson Souza
46
This bug affects 8 people
Affects Status Importance Assigned to Milestone
software-center (Ubuntu)
Fix Released
Medium
Gary Lasker
Oneiric
Fix Released
Medium
Gary Lasker

Bug Description

I cant use the Software-center.. the app open but stay on loading screen forever, the cicle indicator of load never ends. So i can't see, search, install or unistall programs by software-center, im forced to use the Terminal or Synaptic.
I just tried fix in terminal using apt-get clean, autoclean, check, update, upgrade, install -f and much more but without effect.

Steps to reproduce for SRU:
1. Run Oneiric
2. Set aside the file /var/lib/apt-xapian-index/cataloged_times.p for safekeeping.
3. Copy the attached broken cataloged_times.p file from this bug (https://bugs.launchpad.net/ubuntu/+source/software-center/+bug/891499/+attachment/2601868/+files/cataloged_times.p) to /var/lib/apt-xapian-index/cataloged_times.p.
4. Launch software-center and observe that it opens but shows only a spinner and never fully starts.
5. Quit software-center
6. Update to software-center version 5.0.4 in oneiric-proposed.
7. Start software-center again and verify that now it starts normally.
8. Finally, restore your original copy of /var/lib/apt-xapian-index/cataloged_times.p that you had set aside in step 2.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: software-center 5.0.2
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic i686
ApportVersion: 1.23-0ubuntu4
Architecture: i386
Date: Thu Nov 17 04:52:54 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110426)
PackageArchitecture: all
SourcePackage: software-center
UpgradeStatus: Upgraded to oneiric on 2011-10-13 (34 days ago)

Revision history for this message
Anderson Souza (andersonn-asouza) wrote :
Revision history for this message
Gary Lasker (gary-lasker) wrote :

Hello Anderson, thank you for your bug report. I'd like to figure out exactly what is happening that is preventing startup like this. Could you please open a terminal and launch software-center from the command line (as shown below), and then paste the resulting output here? That should tell us what is happening so that we can fix this up for you.

  $ software-center

Thank you very much for your help!
Gary

Changed in software-center (Ubuntu):
status: New → Incomplete
Revision history for this message
Anderson Souza (andersonn-asouza) wrote :

Thank for help me..
I tried the command and I got this:
------------------------------------------------------------------------

~$ software-center
2011-11-17 23:50:15,603 - softwarecenter.ui.gtk3.em - INFO - EM's: 17 15 21
2011-11-17 23:50:22,871 - softwarecenter.backend.reviews - WARNING - Could not get usefulness from server, no username in config file
2011-11-17 23:50:23,131 - softwarecenter.ui.gtk3.utils - INFO - Softwarecenter style provider for ambiance Gtk theme: /usr/share/software-center/ui/gtk3/css/softwarecenter.css
Traceback (most recent call last):
  File "/usr/share/software-center/update-software-center-agent", line 39, in <module>
    from softwarecenter.db.update import update_from_software_center_agent
  File "/usr/share/software-center/softwarecenter/db/update.py", line 91, in <module>
    cataloged_times = pickle.load(open(CF))
ValueError: could not convert string to float
2011-11-17 23:50:23,788 - softwarecenter.ui.gtk3.app - INFO - software-center-agent finished with status 1
Traceback (most recent call last):
  File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py", line 1193, in show_lobby
    self.view_manager.set_active_view(ViewPages.AVAILABLE)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/session/viewmanager.py", line 125, in set_active_view
    view_widget.init_view()
  File "/usr/share/software-center/softwarecenter/ui/gtk3/panes/availablepane.py", line 109, in init_view
    SoftwarePane.init_view(self)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/panes/softwarepane.py", line 261, in init_view
    self.icons, self.show_ratings)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/views/appview.py", line 76, in __init__
    self.helper = AppPropertiesHelper(db, cache, icons)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/models/appstore2.py", line 228, in __init__
    softwarecenter.paths.APP_INSTALL_PATH)
  File "/usr/share/software-center/softwarecenter/db/categories.py", line 111, in parse_applications_menu
    category = self._parse_menu_tag(child)
  File "/usr/share/software-center/softwarecenter/db/categories.py", line 267, in _parse_menu_tag
    l = self._parse_directory_tag(element)
  File "/usr/share/software-center/softwarecenter/db/categories.py", line 142, in _parse_directory_tag
    from softwarecenter.db.update import DesktopConfigParser
  File "/usr/share/software-center/softwarecenter/db/update.py", line 91, in <module>
    cataloged_times = pickle.load(open(CF))
ValueError: could not convert string to float

----------------------------------------------
is there anything I can do to fix this issue?
Tnx for all help.

Changed in software-center (Ubuntu):
status: Incomplete → Triaged
importance: Undecided → Medium
assignee: nobody → Gary Lasker (gary-lasker)
status: Triaged → In Progress
Revision history for this message
Gary Lasker (gary-lasker) wrote :

Hi Anderson, thanks for the info, that's exactly what we needed. It seems that a local cache file that Software Center uses has become corrupted and that is causing this issue. First, so that we can take a look at the file to see exactly what went wrong, could you please attached the following file to this bug?:

   /var/lib/apt-xapian-index/cataloged_times.p

After you've done that, you can restore normal Software Center operation as follows. Please shut down Software Center (if it is running) and type the following command into a terminal window to delete the corrupted file:

  $ sudo rm /var/lib/apt-xapian-index/cataloged_times.p

After this, Software Center should start normally. Please let us know if it does not, or if have you any further problems.

I'll leave this bug open for the moment as we need to make a fix in Software Center itself such that it no longer hangs under this (albeit rare) error condition.

Thank you for taking the time to help us to improve Software Center! As always, be sure to report any and all issues that you may encounter. Thanks again!

Best regards,
Gary

Revision history for this message
Anderson Souza (andersonn-asouza) wrote :

Hello, I follow your commands and my Software-Center finally opened normally. I'm sending the file as you asked.
Thank you for helping me.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-center - 5.1.2

---------------
software-center (5.1.2) precise; urgency=low

  [ Michael Vogt ]
  * test/test_channels.py:
    - add unit test for channels backend
  * lp:~mvo/software-center/app-treeview-buy-plus-refactor:
    - add unit test for ApplicationManager, additional tweaks
  * lp:~mvo/software-center/video-support:
    - implement the ability to display embedded videos in
      the application details view
  * softwarecenter/ui/gtk3/widgets/exhibits.py:
    - add basic error reporting for exhibits downloading

  [ Matthew McGowan ]
  * lp:~mmcg069/software-center/app-treeview-buy-plus-refactor:
    - implement the ability to initiate a purchase from the application
      list directly and display the price there, include some nice
      refactoring
  * softwarecenter/ui/gtk3/widgets/apptreeview.py:
    - make hidden rows collapse properly when unselected (LP: #888463)

  [ Gary Lasker ]
  * lp:~gary-lasker/software-center/unit-tests:
    - update tests for custom lists and for launcher integration
  * lp:~gary-lasker/software-center/fix-lp891499:
    - be more robust about problems reading the cataloged_times file
      as problems here can hang the UI (LP: #891499)
 -- Michael Vogt <email address hidden> Mon, 21 Nov 2011 13:45:29 +0100

Changed in software-center (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
rkoester (rob-koester) wrote :

Went to a bunch of places and the removal of the file fixed it all in a jiffy. I just hope others get this fix and find it fast.

THANKS!

Revision history for this message
quantenemitter (quantenemitter) wrote :

Nice one, thank you. I also stumbled into this bug, but I had to delete /var/lib/apt-xapian-index/cataloged_times.p manually. Any way to test the file automatically for deletion etc?

Revision history for this message
Gary Lasker (gary-lasker) wrote :

Hello quantenemitter, indeed, we need to regenerate this file if it is found to be corrupted. Also, we need to SRU this fix for Oneiric. This will be done soon.

Thanks!

Revision history for this message
omichalek (omichalek) wrote :
Download full text (4.3 KiB)

I previously filed bug 876941

Attached is my file from /var/lib/apt-xapian-index/. After deleting it however I see no change. SW Center still does not load

And in Terminal:

2011-12-07 18:49:59,996 - softwarecenter.ui.gtk3.em - INFO - EM's: 17 15 21
2011-12-07 18:50:01,014 - softwarecenter.backend.reviews - WARNING - Could not get usefulness from server, no username in config file
2011-12-07 18:50:01,156 - softwarecenter.ui.gtk3.utils - INFO - Softwarecenter style provider for ambiance Gtk theme: /usr/share/software-center/ui/gtk3/css/softwarecenter.css
Traceback (most recent call last):
  File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py", line 1193, in show_lobby
    self.view_manager.set_active_view(ViewPages.AVAILABLE)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/session/viewmanager.py", line 125, in set_active_view
    view_widget.init_view()
  File "/usr/share/software-center/softwarecenter/ui/gtk3/panes/availablepane.py", line 109, in init_view
    SoftwarePane.init_view(self)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/panes/softwarepane.py", line 261, in init_view
    self.icons, self.show_ratings)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/views/appview.py", line 76, in __init__
    self.helper = AppPropertiesHelper(db, cache, icons)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/models/appstore2.py", line 228, in __init__
    softwarecenter.paths.APP_INSTALL_PATH)
  File "/usr/share/software-center/softwarecenter/db/categories.py", line 111, in parse_applications_menu
    category = self._parse_menu_tag(child)
  File "/usr/share/software-center/softwarecenter/db/categories.py", line 271, in _parse_menu_tag
    query = self._parse_include_tag(element)
  File "/usr/share/software-center/softwarecenter/db/categories.py", line 230, in _parse_include_tag
    return self._parse_and_or_not_tag(include, query, xapian.Query.OP_AND)
  File "/usr/share/software-center/softwarecenter/db/categories.py", line 177, in _parse_and_or_not_tag
    or_elem = self._parse_and_or_not_tag(and_elem, xapian.Query(), xapian.Query.OP_OR)
  File "/usr/share/software-center/softwarecenter/db/categories.py", line 217, in _parse_and_or_not_tag
    q = self.db.xapian_parser.parse_query(s, xapian.QueryParser.FLAG_WILDCARD)
  File "/usr/share/software-center/softwarecenter/db/database.py", line 151, in xapian_parser
    self._parser_per_thread[thread_name] = self._get_new_xapian_parser()
  File "/usr/share/software-center/softwarecenter/db/database.py", line 175, in _get_new_xapian_parser
    xapian_parser.set_database(self.xapiandb)
  File "/usr/share/software-center/softwarecenter/db/database.py", line 143, in xapiandb
    self._db_per_thread[thread_name] = self._get_new_xapiandb()
  File "/usr/share/software-center/softwarecenter/db/database.py", line 155, in _get_new_xapiandb
    xapiandb = xapian.Database(self._db_pathname)
  File "/usr/lib/python2.7/dist-packages/xapian/__init__.py", line 3408, in __init__
    _xapian.Database_swiginit(self,_xapian.new_Database(*args))
xapian.DatabaseOpeningError: Couldn't stat '/var/cache/software-center/xapian' (Adresář nebo soubor neexistuje)
2011-12-07 18:...

Read more...

Revision history for this message
Peter Ivanov (emzak) wrote :
Download full text (11.7 KiB)

Came to that status after trying to install gnome-tweak-tool:

user@ubuntubox:~$ sudo apt-get install gnome-tweak-tool
[sudo] password for user:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  caribou cups-pk-helper gir1.2-accountsservice-1.0 gir1.2-caribou-1.0 gir1.2-clutter-1.0 gir1.2-cogl-1.0 gir1.2-folks-0.6 gir1.2-gee-1.0
  gir1.2-gkbd-3.0 gir1.2-json-1.0 gir1.2-mutter-3.0 gir1.2-networkmanager-1.0 gir1.2-polkit-1.0 gir1.2-telepathyglib-0.12 gir1.2-telepathylogger-0.2
  gir1.2-upowerglib-1.0 gjs gnome-icon-theme-full gnome-shell gnome-themes-standard libcaribou0 libclutter-1.0-0 libclutter-1.0-common libcogl-common
  libcogl5 libgjs0c libmozjs185-1.0 libmutter0 mesa-utils mutter-common
The following NEW packages will be installed:
  caribou cups-pk-helper gir1.2-accountsservice-1.0 gir1.2-caribou-1.0 gir1.2-clutter-1.0 gir1.2-cogl-1.0 gir1.2-folks-0.6 gir1.2-gee-1.0
  gir1.2-gkbd-3.0 gir1.2-json-1.0 gir1.2-mutter-3.0 gir1.2-networkmanager-1.0 gir1.2-polkit-1.0 gir1.2-telepathyglib-0.12 gir1.2-telepathylogger-0.2
  gir1.2-upowerglib-1.0 gjs gnome-icon-theme-full gnome-shell gnome-themes-standard gnome-tweak-tool libcaribou0 libclutter-1.0-0
  libclutter-1.0-common libcogl-common libcogl5 libgjs0c libmozjs185-1.0 libmutter0 mesa-utils mutter-common
0 upgraded, 31 newly installed, 0 to remove and 0 not upgraded.
Need to get 14.9 MB of archives.
After this operation, 40.5 MB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://tux.rainside.sk/ubuntu/ oneiric/main libcogl5 i386 1.8.0-1~svn1 [242 kB]
Get:2 http://tux.rainside.sk/ubuntu/ oneiric/main libclutter-1.0-0 i386 1.8.0-1~svn1 [480 kB]
Get:3 http://tux.rainside.sk/ubuntu/ oneiric-updates/main gir1.2-accountsservice-1.0 i386 0.6.14-1git1ubuntu1 [4,308 B]
Get:4 http://tux.rainside.sk/ubuntu/ oneiric/universe libcaribou0 i386 0.3.92-0ubuntu1 [45.9 kB]
Get:5 http://tux.rainside.sk/ubuntu/ oneiric/universe gir1.2-caribou-1.0 i386 0.3.92-0ubuntu1 [6,088 B]
Get:6 http://tux.rainside.sk/ubuntu/ oneiric/main gir1.2-cogl-1.0 i386 1.8.0-1~svn1 [21.2 kB]
Get:7 http://tux.rainside.sk/ubuntu/ oneiric/main gir1.2-json-1.0 i386 0.14.0-1 [8,296 B]
Get:8 http://tux.rainside.sk/ubuntu/ oneiric/main gir1.2-clutter-1.0 i386 1.8.0-1~svn1 [139 kB]
Get:9 http://tux.rainside.sk/ubuntu/ oneiric/main gir1.2-folks-0.6 i386 0.6.3.2-0ubuntu1 [15.8 kB]
Get:10 http://tux.rainside.sk/ubuntu/ oneiric/main gir1.2-gee-1.0 i386 0.6.2.1-0ubuntu1 [15.3 kB]
Get:11 http://tux.rainside.sk/ubuntu/ oneiric/main gir1.2-gkbd-3.0 i386 3.2.0-0ubuntu1 [7,914 B]
Get:12 http://tux.rainside.sk/ubuntu/ oneiric-updates/universe mutter-common all 3.2.1-0ubuntu2 [1,397 kB]
Get:13 http://tux.rainside.sk/ubuntu/ oneiric-updates/universe libmutter0 i386 3.2.1-0ubuntu2 [400 kB]
Get:14 http://tux.rainside.sk/ubuntu/ oneiric-updates/universe gir1.2-mutter-3.0 i386 3.2.1-0ubuntu2 [21.0 kB]
Get:15 http://tux.rainside.sk/ubuntu/ oneiric-updates/main gir1.2-networkmanager-1.0 i386 0.9.1.90-0ubuntu5.1 [37.4 kB] ...

Revision history for this message
Peter Ivanov (emzak) wrote :

Fixed it by reinstalling software-center using .deb from this page: http://pkgs.org/ubuntu-11.10/ubuntu-main-i386/software-center_5.0.1.4_all.deb/download/ via dpkg. Then I had to clean the broken dependencies by installing all broken packages from online available .deb files located @ http://pkgs.org.

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

Hello Anderson, or anyone else affected,

Accepted software-center into oneiric-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!

Changed in software-center (Ubuntu Oneiric):
status: New → Fix Committed
tags: added: verification-needed
description: updated
Revision history for this message
Gary Lasker (gary-lasker) wrote :

I have verified that the version of software-center in oneiric-proposed, 5.0.4, does indeed fix this bug (per the given test case).

Many thanks!

Changed in software-center (Ubuntu Oneiric):
importance: Undecided → Medium
assignee: nobody → Gary Lasker (gary-lasker)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-center - 5.0.4

---------------
software-center (5.0.4) oneiric-proposed; urgency=low

  [ Gary Lasker ]
  * lp:~gary-lasker/software-center/fix-lp891499-for-5.0:
    - be more robust about problems reading the cataloged_times file
      as problems here can hang the UI (LP: #891499)

  [ Gabor Kelemen ]
  * lp:~kelemeng/software-center/bug869935:
    - Update help translations from Launchpad (LP: #869935)
  * lp:~kelemeng/software-center/bug880757:
    - Mark strings containing the “ character as Unicode, to fix
      their translations. LP: #880757

  [ Michael Vogt ]
  * fix cache opening to improve startup time
  * lp:~mvo/software-center/icon-data-for-5.0:
    - remove the need for inline icon data from the agent, instead
      download icons directly using the provided URL (LP: #914054)
 -- Michael Vogt <email address hidden> Tue, 10 Jan 2012 09:52:09 +0100

Changed in software-center (Ubuntu Oneiric):
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.