Merge lp:~gary-lasker/software-center/fix-crash_lp973379 into lp:software-center/5.2

Proposed by Gary Lasker
Status: Merged
Merged at revision: 3013
Proposed branch: lp:~gary-lasker/software-center/fix-crash_lp973379
Merge into: lp:software-center/5.2
Diff against target: 11 lines (+1/-0)
1 file modified
softwarecenter/ui/gtk3/ (+1/-0)
To merge this branch: bzr merge lp:~gary-lasker/software-center/fix-crash_lp973379
Reviewer Review Type Date Requested Status
Michael Vogt Approve
Review via email:

Description of the change

This branch should fix intermittent crasher bug 973379 by makes sure the cache is ready before accessing the installed package list for upload to the recommender service. Since this happens asynchronously, it can occur on a cache refresh, causing the potential for the crash.

I could not find a reliable way to reproduce this error as it depends quite heavily on timing, but this should be a very low-risk change.


To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for this branch, looks good. Its a bit scary that this can happen as the profile upload is timed after 45s but its probably a combination of cache-reopen after e.g. software-center-agent finished.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'softwarecenter/ui/gtk3/'
--- softwarecenter/ui/gtk3/ 2012-05-10 17:12:20 +0000
+++ softwarecenter/ui/gtk3/ 2012-05-14 21:38:19 +0000
@@ -498,6 +498,7 @@
498 self.menuitem_recommendations.set_label(498 self.menuitem_recommendations.set_label(
499 _(u"Turn On Recommendations…"))499 _(u"Turn On Recommendations…"))
501 @wait_for_apt_cache_ready
501 def _upload_recommendations_profile(self):502 def _upload_recommendations_profile(self):
502 recommender_agent = self._get_recommender_agent()503 recommender_agent = self._get_recommender_agent()
503 if recommender_agent.is_opted_in():504 if recommender_agent.is_opted_in():


People subscribed via source and target branches