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

Proposed by Gary Lasker on 2012-05-14
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/app.py (+1/-0)
To merge this branch: bzr merge lp:~gary-lasker/software-center/fix-crash_lp973379
Reviewer Review Type Date Requested Status
Michael Vogt 2012-05-14 Approve on 2012-05-15
Review via email: mp+105725@code.launchpad.net

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.

Thanks!

To post a comment you must log in.
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/app.py'
--- softwarecenter/ui/gtk3/app.py 2012-05-10 17:12:20 +0000
+++ softwarecenter/ui/gtk3/app.py 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…"))
500500
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():

Subscribers

People subscribed via source and target branches