After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 536707 - null reference exception thrown by export to folder
null reference exception thrown by export to folder
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: General
0.4.x
Other Linux
: Normal normal
: ---
Assigned To: F-spot maintainers
F-spot maintainers
Depends on:
Blocks:
 
 
Reported: 2008-06-04 22:59 UTC by Matt Gerber
Modified: 2008-06-05 07:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
export settings (43.27 KB, image/png)
2008-06-04 23:00 UTC, Matt Gerber
  Details
export progress (10.20 KB, image/png)
2008-06-04 23:01 UTC, Matt Gerber
  Details
the gallery that results from the failed export (24.09 KB, image/png)
2008-06-04 23:02 UTC, Matt Gerber
  Details
patch for folder export (1.35 KB, patch)
2008-06-05 04:02 UTC, Matt Gerber
none Details | Review

Description Matt Gerber 2008-06-04 22:59:15 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".
Comment 1 Matt Gerber 2008-06-04 23:00:57 UTC
Created attachment 112171 [details]
export settings
Comment 2 Matt Gerber 2008-06-04 23:01:36 UTC
Created attachment 112172 [details]
export progress
Comment 3 Matt Gerber 2008-06-04 23:02:37 UTC
Created attachment 112173 [details]
the gallery that results from the failed export
Comment 4 Matt Gerber 2008-06-05 03:37:34 UTC
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.
Comment 5 Matt Gerber 2008-06-05 04:02:20 UTC
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.
Comment 6 Stephane Delcroix 2008-06-05 07:31:30 UTC
fixed in r4043. I'll push a new FolderExport extension for 0.4.4 to the repository in a few. 
Comment 7 Stephane Delcroix 2008-06-05 07:48:46 UTC
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