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 560265 - f-spot crashes when Edit -> Preferences is chosen
f-spot crashes when Edit -> Preferences is chosen
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: General
0.5.x
Other All
: Normal critical
: ---
Assigned To: F-spot maintainers
F-spot maintainers
: 566864 573112 580639 580797 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-11-11 02:52 UTC by Aaron Kelley
Modified: 2009-04-30 07:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
colormanagement-default-values.patch (638 bytes, patch)
2008-11-13 16:17 UTC, Maxxer
none Details | Review
Debug output (7.52 KB, text/plain)
2008-11-18 16:59 UTC, Aaron Kelley
  Details
should fix it (1.23 KB, patch)
2008-11-18 20:06 UTC, Stephane Delcroix
committed Details | Review
patch against 0.5.0.3_STABLE (1.60 KB, patch)
2008-11-18 20:13 UTC, Stephane Delcroix
committed Details | Review
Output of compiled unmodified 0.5.0.3 source with --debug --uninstalled (16.19 KB, text/plain)
2008-11-18 20:22 UTC, Aaron Kelley
  Details

Description Aaron Kelley 2008-11-11 02:52:56 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.
Comment 1 Maxxer 2008-11-11 07:58:14 UTC
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
Comment 2 Aaron Kelley 2008-11-11 17:07:19 UTC
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
Comment 3 Maxxer 2008-11-11 17:19:56 UTC
please try creating those two keys, as bool, and set them to false.
Comment 4 Aaron Kelley 2008-11-11 17:30:16 UTC
A set those two keys to false, and it still crashes with the same exception.
Comment 5 Maxxer 2008-11-12 07:57:55 UTC
Please try creating also 
color_management_display_profile
color_management_output_profile
as string...
Comment 6 Aaron Kelley 2008-11-12 13:51:44 UTC
I added these two keys (with an "empty string" as the value) and still get a crash with the same exception.
Comment 7 Maxxer 2008-11-13 16:17:18 UTC
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...
Comment 8 Stephane Delcroix 2008-11-13 21:29:43 UTC
(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 

Comment 9 Aaron Kelley 2008-11-15 21:53:18 UTC
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
Comment 10 Stephane Delcroix 2008-11-18 16:52:04 UTC
could you please run f-spot with --debug option ?
Comment 11 Aaron Kelley 2008-11-18 16:58:06 UTC
Sure...  I'm attaching the debug output.
Comment 12 Aaron Kelley 2008-11-18 16:59:51 UTC
Created attachment 122959 [details]
Debug output

Ran with --debug switch.  f-spot main window opened, I went to Edit->Preferences, crash.
Comment 13 Aaron Kelley 2008-11-18 17:43:52 UTC
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.
Comment 14 Stephane Delcroix 2008-11-18 19:52:57 UTC
> 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
Comment 15 Stephane Delcroix 2008-11-18 20:06:53 UTC
Created attachment 122976 [details] [review]
should fix it

This should fix your issue, please test this
Comment 16 Stephane Delcroix 2008-11-18 20:13:04 UTC
Created attachment 122977 [details] [review]
patch against 0.5.0.3_STABLE

same patch, but against the release, not SVN
Comment 17 Aaron Kelley 2008-11-18 20:21:19 UTC
> 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.
Comment 18 Aaron Kelley 2008-11-18 20:22:15 UTC
Created attachment 122979 [details]
Output of compiled unmodified 0.5.0.3 source with --debug --uninstalled
Comment 19 Stephane Delcroix 2008-11-18 21:04:55 UTC
(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 
Comment 20 Aaron Kelley 2008-11-18 21:13:44 UTC
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.
Comment 21 Maxxer 2009-01-07 07:35:57 UTC
*** Bug 566864 has been marked as a duplicate of this bug. ***
Comment 22 glacialfury 2009-01-07 16:15:53 UTC
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.  
Comment 23 Maxxer 2009-02-25 13:58:46 UTC
*** Bug 573112 has been marked as a duplicate of this bug. ***
Comment 24 Maxxer 2009-04-28 18:56:10 UTC
*** Bug 580639 has been marked as a duplicate of this bug. ***
Comment 25 Maxxer 2009-04-30 07:11:03 UTC
*** Bug 580797 has been marked as a duplicate of this bug. ***