GNOME Bugzilla – Bug 536707
null reference exception thrown by export to folder
Last modified: 2008-06-05 07:48:46 UTC
Version: 0.4.3.1 OS: Ubuntu 8.04 F-Spot throws a null reference exception when exporting to a folder. This bug has also been reported here: https://bugs.launchpad.net/ubuntu/+source/f-spot/+bug/235071 To reproduce, select photo(s) and go to Photo->Export To-> Folder. Check "Create standalone web gallery" and hit "Export".
Created attachment 112171 [details] export settings
Created attachment 112172 [details] export progress
Created attachment 112173 [details] the gallery that results from the failed export
I have found the source of the bug. It is in /extensions/FolderExport/FolderExport.cs, in the function ProcessImage, at this block of code: if ((bool)Preferences.Get (FolderExport.SHARPEN_KEY)) { if (req.Name == "lq") req_set.Add (new SharpFilter (0.1, 2, 4)); if (req.Name == "thumbs") req_set.Add (new SharpFilter (0.1, 2, 5)); } Preferences does not define a preference with the value of FolderExport.SHARPEN_KEY, and thus throws an exception. Commenting out this code fixes the problem.
Created attachment 112185 [details] [review] patch for folder export This patch reflects the changes mentioned in my above comment. It simply removes the offending block of code, which doesn't seem to serve any purpose considering there is not Preferences key by the name given by SHARPEN_KEY.
fixed in r4043. I'll push a new FolderExport extension for 0.4.4 to the repository in a few.
I even backported the fix for 0.4.3.1 to have it, from the "Manage Extensions" dialog, disable the current FolderExport extension then install the new one from the repository