Merge lp:~aaronp/software-center/fix-694836 into lp:software-center
Proposed by
Aaron Peachey
Status: | Merged |
---|---|
Merged at revision: | 1456 |
Proposed branch: | lp:~aaronp/software-center/fix-694836 |
Merge into: | lp:software-center |
Diff against target: |
15 lines (+5/-1) 1 file modified
softwarecenter/view/catview_gtk.py (+5/-1) |
To merge this branch: | bzr merge lp:~aaronp/software-center/fix-694836 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Vogt | Pending | ||
Review via email: mp+48451@code.launchpad.net |
Commit message
avoid div by 0 to temporarily fix bug lp:694836
Description of the change
avoid div by 0 to temporarily fix bug lp:694836
To post a comment you must log in.
Heya Aaron! Thanks for working on this one and for your branch! I took a quick look at this error myself yesterday and it's not quite clear to me yet why the value of self.n_posters is zero, as by all rights it really should never be. We do have some asynchronous activity at startup and that may be the contributing factor, tho without looking closer that's just an assumption. I wondered if you had any thoughts or insights about it?
So one thing that I note is that this problem was first reported at version 3.1.9, so it's possible that a change there has allowed this condition to occur (of course, it also may just not have been encountered/ reported before then).
It may very well be that your fix is all that's required. My only concern is for the off-chance that there may be other glitches or side effects caused by the underlying bug that may be unmasked now that we have taken care of the divide-by-zero condition. Specifically, I'm wondering whether all the associated UI elements still render/work correctly, etc.? I noticed in one of the dupes (bug 712121), Jean-Baptiste (jibel) reports that all the categories are empty (though that have just been due to the ZeroDivisionError itself).
It might be useful to find a way to induce the bug artificially, or even better, to write a test case for the bug (though I suspect that won't be terribly straightforward to do).
Anyway, please let me know what you think. And thanks again for all your good work!! It's so great to have you aboard the Software Center team.
Cheers,
Gary
P.S. Our time zones are way out (I'm in Massachusetts USA), but if you happen to catch me on IRC please say hello. :) I'm "tremolux" there and I hang out in #ubuntu-desktop and #ubuntu-devel, among many others. See ya then!