Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Repair() to prevent crashing when looking for addin descriptions
This modification fixes a bug in the Repair method. The bug was very hard to catch, as a very low rate of banshee users could hit it. However, since the LatestVersion-checking feature was committed (which was implemented by commit in a4f3b3c and bisected by Iain Lane in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=630590), the bug was exposed as 100% reproducible in debug mode ('banshee --debug'). This LatestVersion-feature introduced the possibility that addins could query the addins collections when asked for their Enabled property (to find other sibling-addins with different versions), which made the Repair() method crash, as it firstly removes the AddinCache folders, and after that it tries to update the database by looking at their content (and the content was removed by itself). Before the LatestVersion-feature was introduced, this bug would not be hit so often because it was less likely to find a non-empty "allSetupInfos" cache-variable combined with an empty "addinSetupInfos" cache-variable. Both circumstances happening at the same time would cause an Addin.ReadFromDescription() call, while iterating over the cached addins to find if each addin is not root. Fixes http://monoaddins.codeplex.com/workitem/6901 .
- Loading branch information