GNOME Bugzilla – Bug 560265
f-spot crashes when Edit -> Preferences is chosen
Last modified: 2009-04-30 07:11:03 UTC
Steps to reproduce: 1. Open f-spot. 2. Go to Edit -> Preferences. 3. Boom! Stack trace: Exception in Gtk# callback delegate Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception. System.NullReferenceException: Object reference not set to an instance of an object at FSpot.UI.Dialog.PreferenceDialog.LoadPreference (System.String key) [0x00000] at FSpot.UI.Dialog.PreferenceDialog..ctor () [0x00000] at FSpot.UI.Dialog.PreferenceDialog.Show () [0x00000] at MainWindow.HandlePreferences (System.Object sender, System.EventArgs args) [0x00000] at GLib.Signal.voidObjectCallback (IntPtr handle, IntPtr data) [0x00000] at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal) at GLib.Signal.voidObjectCallback(IntPtr handle, IntPtr data) at GLib.Signal.voidObjectCallback(IntPtr , IntPtr ) at Gtk.Application.gtk_main() at Gtk.Application.gtk_main() at Gtk.Application.Run() at Gnome.Program.Run() at FSpot.Driver.Main(System.String[] args) Other information: Let me know what other information I can provide for you! This is f-spot 0.5.0.3 on Ubuntu 8.10.
can you please check in gconf if you have those keys? /apps/f-spot/ui/color_management_enabled /apps/f-spot/ui/color_management_use_x_profile
Doesn't appear so. --- $ gconftool-2 -R /apps/f-spot/ui group_adaptor_sort_asc = true show_filmstrip = true import_window_width = 664 show_toolbar = true show_sidebar = true sidebar_size = 274 expanded_tags = [6] zoom = 0.484375 tag_icon_size = 24 show_ratings = false group_adaptor = 0 import_window_height = 467 glass_position = 6 import_window_pane_position = 400 show_tags = false maximized = true show_dates = true show_timeline = true /apps/f-spot/ui/histogram_visible: Library = 0 /apps/f-spot/ui/sidebar: Edit = Tags
please try creating those two keys, as bool, and set them to false.
A set those two keys to false, and it still crashes with the same exception.
Please try creating also color_management_display_profile color_management_output_profile as string...
I added these two keys (with an "empty string" as the value) and still get a crash with the same exception.
Created attachment 122586 [details] [review] colormanagement-default-values.patch this patch is probably needed, but won't fix your error. I suspect Sde fixed your bug these days in svn. I'll let you know...
(In reply to comment #7) > I suspect Sde fixed your bug these days in svn. I'll let you know... > no, I didn't. missing default values shouldn't cause the NullRef Exception as the generic Get() returns a default value in any case. this bug is puzzling me too
Do you think that it could be something specific to Ubuntu or changes the Ubuntu folks made to the f-spot package? I got a confirmation over at my Ubuntu bug. :-P https://bugs.launchpad.net/ubuntu/+source/f-spot/+bug/298283
could you please run f-spot with --debug option ?
Sure... I'm attaching the debug output.
Created attachment 122959 [details] Debug output Ran with --debug switch. f-spot main window opened, I went to Edit->Preferences, crash.
I just built f-spot from source and did some debugging. The crash seems to occur when "/apps/f-spot/screensaver/tag_id" is loaded. I do not have this key in gconf. Setting this key fixes the problem. So, you also need to add a default value to be returned for this key.
> I just built f-spot from source and did some debugging. nice. which sources ? 0.5.0.3 ? SVN ? or the sources of the ubuntu package ? > The crash seems to occur when "/apps/f-spot/screensaver/tag_id" is loaded. I > do not have this key in gconf. Setting this key fixes the problem. I don't have this key, and it's working fine here > So, you also need to add a default value to be returned for this key. A default is already set for this key here's a few questions: - which sources (see upper) - did you removed the pre-defined tags ? I'm thinking about the "Favorites" tag - can you go in the src/ folder of the archive you compiled, and run ./f-spot --debug --uninstalled
Created attachment 122976 [details] [review] should fix it This should fix your issue, please test this
Created attachment 122977 [details] [review] patch against 0.5.0.3_STABLE same patch, but against the release, not SVN
> nice. which sources ? 0.5.0.3 ? SVN ? or the sources of the ubuntu package ? I used 0.5.0.3 from the f-spot site. > - did you removed the pre-defined tags ? I'm thinking about the "Favorites" tag Yeah, I removed some of the pre-defined tags including that one. With --debug --uninstalled, I grabbed the output and will post next. And I compiled with your patch, it fixed my issue.
Created attachment 122979 [details] Output of compiled unmodified 0.5.0.3 source with --debug --uninstalled
(In reply to comment #17) > Yeah, I removed some of the pre-defined tags including that one. That's not a smart thing to do. A team of 12 usability experts worked night and day for a month to pick that fine default preselection :):) > With --debug --uninstalled, I grabbed the output and will post next. it helped to cross-check my guess, thx > And I compiled with your patch, it fixed my issue. the patch is already applied to trunk and to 0_5_0_3_STABLE branch
Ooo, hope I don't upset anyone by removing some tags. :-P (In my defense, I have an existing tag hierarchy that I am moving over from Windows Photo Gallery... which wasn't based on any of their defaults either, if they had any. :-P) Anyways, I just wanted to say thanks for your quick response on this.
*** Bug 566864 has been marked as a duplicate of this bug. ***
There is a temporary fix for this. It started occurring to me. It occurred for me when I set the tag for the screensaver in the preferences, then deleted the pictures and associated tag from F-Spot. Then, when you load the preferences dialog, it is still looking for the tag that no longer exists, and crashes. I opened F-Spot, and I created the tag that was in preferences, which I had deleted before. Once this tag was sitting around in F-Spot again, the preferences dialog loaded just fine - with the restored tag sitting in the screensaver tag section.
*** Bug 573112 has been marked as a duplicate of this bug. ***
*** Bug 580639 has been marked as a duplicate of this bug. ***
*** Bug 580797 has been marked as a duplicate of this bug. ***