slow redisplay of category ites

Bug #964433 reported by mohammed on 2012-03-25
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
software-center (Ubuntu)
Medium
Michael Vogt

Bug Description

when i browse through the software center categories (games for example),and click more information about some game or application, it works fine, but when i hit back to return to the list of games, it shows an empty category ??the work around i found is to resize the software center from window to full screen or vice versa then the category list will repopulate properly to where i stopped

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: software-center 5.1.13.1
ProcVersionSignature: Ubuntu 3.2.0-20.32-generic-pae 3.2.12
Uname: Linux 3.2.0-20-generic-pae i686
ApportVersion: 1.95-0ubuntu1
Architecture: i386
Date: Sun Mar 25 12:32:42 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha i386 (20120216)
PackageArchitecture: all
ProcEnviron:
 TERM=xterm
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: software-center
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

mohammed (mangolok1426) wrote :
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

I tried to reproduce this without success, could you please provide a step-by-step guide? Could you also please provide a screenshot when this happens? The log shows some network errors, I wonder if that is
releated? Is there anything "special" about your network setup (i.e. behind a proxy or firewall or anything
like this?)

Thanks,
 Michael

mohammed (mangolok1426) wrote :

i am using a usbmodem ,and it is working fine in updates , browsing, and in installing everything i want, this connection reaches up to 7.2 mb/s and is not slow at all, the category is still empty as i write this report (more than 5m minutes) after ai took the screenshot and will only appear if i resize the software center, then it appear instantly

Michael Vogt (mvo) wrote :

Thanks a bunch mohammed for this screenshot.

Could you please open software-center in a terminal window (like gnome-terminal) and reproduce the steps
to trigger the bug and paste what is written in the terminal?

Based on your description I did the following to reproduce (without success so far):
- open software-center
- click on the games category
- click on arcade
- click on teeworlds
- click on "back"

Do these steps reproduce the error for you or do you do something differently?

Changed in software-center (Ubuntu):
status: New → Incomplete
Kiwinote (kiwinote) wrote :

the trick here is not to click on teeworlds, rather scroll down a few pages and select an app from down there

Changed in software-center (Ubuntu):
importance: Undecided → Medium
status: Incomplete → Confirmed
mohammed (mangolok1426) wrote :

thanks for your patience,this is what appears in the terminal window when i open the software center and reproduce the bug

Michael Vogt (mvo) wrote :

Thanks Kiwinote, that did the trick! I can reproduce the bug now.

Michael Vogt (mvo) wrote :

Some observations that make fixing this hopefully easier:

=== modified file 'softwarecenter/ui/gtk3/session/viewmanager.py'
--- softwarecenter/ui/gtk3/session/viewmanager.py 2012-03-15 00:16:03 +0000
+++ softwarecenter/ui/gtk3/session/viewmanager.py 2012-03-29 07:24:47 +0000
@@ -171,7 +171,7 @@
             ni = self.navhistory.stack[self.navhistory.stack.cursor]
             if ni.pane.is_applist_view_showing():
                 v = ni.pane.app_view.tree_view_scroll.get_vadjustment()
- ni.view_state.vadjustment = v.get_value()
+ #ni.view_state.vadjustment = v.get_value()

         if callback is None:
             callback = pane.get_callback_for_page(page, view_state)

This gets rid of the bug on the expense of the scroll position. So its either that the treeview is confused that the
adjustment is set or that its set before it has the right signals connected or that its not loading the content on demand
when at the end of the adjustment (or something else that I have not thought off :)

Michael Vogt (mvo) wrote :

So it seems its the extends loading that does not take into account what items it needs:

=== modified file 'softwarecenter/ui/gtk3/models/appstore2.py'
--- softwarecenter/ui/gtk3/models/appstore2.py 2012-03-16 10:44:05 +0000
+++ softwarecenter/ui/gtk3/models/appstore2.py 2012-03-29 07:37:10 +0000
@@ -414,7 +414,7 @@
         if n_matches == 0:
             return

- extent = min(self.LOAD_INITIAL, n_matches)
+ extent = max(self.LOAD_INITIAL, n_matches)

         with ExecutionTime("store.append_initial"):
             for doc in [m.document for m in matches][:extent]:

Fixes it as well

Michael Vogt (mvo) on 2012-03-29
Changed in software-center (Ubuntu):
status: Confirmed → In Progress
Michael Vogt (mvo) wrote :

It turns out that the problem is that:
- in appview.py we call model.set_from_matches()
- this will load a initial batch of rows and the add empty placeholder rows
- because the apptreeview has a _cell_data_func the rows are requesting data
- this causes load_range to be run and that will load the documents that were meant to be empty and loaded on demand

The fix is to disconnect the model first and then after its updated set it again.

Changed in software-center (Ubuntu):
assignee: nobody → Michael Vogt (mvo)
Launchpad Janitor (janitor) wrote :

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

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

  [ Michael Vogt ]
  * lp:~mvo/software-center/lp962580:
    - add locking to the expunge helper process to fix bugs that are triggered
      if multiple expunge cache processes are run (LP: #962580)
  * lp:~mvo/software-center/cache-refresh-glitch:
    - ensure that we get a full refresh if a pkg was not available before
      show_app is called
  * lp:~mvo/software-center/lp940482:
    - fix crash if the debfile does not return proper utf8 for the
      description (LP: #940482)
  * lp:~mvo/software-center/lp966514:
    - properly handle network disconnect conditions with the Ubuntu
      SSO dialog (LP: #966514)
  * lp:~mvo/software-center/lp966879:
    - fix for crashes in the installed view treeview (LP: #966879,
      LP: #950899)
  * lp:~mvo/software-center/lp846204:
    - fix ValueError crashes in get_iter due to invalid tree paths
      (LP: #846204)
  * lp:~mvo/software-center/lp964433:
    - disconnect the model from the view before calling set_from_matches
      (LP: #964433)
  * lp:~mvo/software-center/treeview-keep-state-on-db-cache-change:
   - restore the state of the installed view treeview when the
     the db or cache changes, such as on an app install or remove
  * lp:~mvo/software-center/946393:
   - fix installing multiple apps when in a custom list view (LP: #946393)
  * lp:~mvo/software-center/lp969050:
   - disconnect the view when the model is cleared to avoid a furry of
     cursor_changed signals as the rows get removed (LP: #969050)

  [ Gary Lasker ]
  * lp:~gary-lasker/software-center/installed-pane-refresh:
    - avoid rebuilding the treeview in the installedpane if its not
      required (LP: #828887)
  * lp:~gary-lasker/software-center/fix-crash-lp967036:
    - Small branch to fix a crash due to a UnicodeDecodeError when accessing
      the short description for H/W requirements (LP: #967036)
  * lp:~gary-lasker/software-center/fix-crash-lp935930:
    - fix a crash due to a UnicodeDecodeError (LP: #935930)
 -- Michael Vogt <email address hidden> Fri, 30 Mar 2012 18:00:50 +0200

Changed in software-center (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers