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 457480 - Crashes at startup: LoadPreference
Crashes at startup: LoadPreference
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: General
SVN
Other All
: Normal normal
: ---
Assigned To: F-spot maintainers
F-spot maintainers
Depends on:
Blocks:
 
 
Reported: 2007-07-16 20:23 UTC by Christoffer Sørensen
Modified: 2007-07-29 07:43 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Christoffer Sørensen 2007-07-16 20:23:40 UTC
Steps to reproduce:
1. Get f-spot from trunk 16. july 2007
2. Compile and install
3. Startup. Crash.


Stack trace:
An unhandled exception was thrown: An element with the same key already exists in the dictionary.

  at System.Collections.Generic.Dictionary`2[System.String,System.Object].Add (System.String , System.Object ) [0x00000] 
  at FSpot.Preferences.Get (System.String key) [0x00000] 
  at MainWindow.LoadPreference (System.String key) [0x00000] 
  at MainWindow..ctor (.Db db) [0x00000] 
  at FSpot.Core.get_MainWindow () [0x00000] 
  at FSpot.Core.Organize () [0x00000] 
  at FSpot.Driver.Main (System.String[] args) [0x00000] 
.NET Version: 2.0.50727.42

Assembly Version Information:

Mono.Addins.Gui (0.2.0.0)
pango-sharp (2.10.0.0)
SemWeb (0.7.1.0)
glade-sharp (2.10.0.0)
gtkhtml-sharp (2.16.0.0)
System.Data (2.0.0.0)
Mono.Data.SqliteClient (2.0.0.0)
System.Xml (2.0.0.0)
gconf-sharp (2.16.0.0)
gdk-sharp (2.10.0.0)
gnome-vfs-sharp (2.16.0.0)
Mono.Addins (0.2.0.0)
NDesk.DBus.GLib (0.3.0.0)
NDesk.DBus (1.0.0.0)
System (2.0.0.0)
Mono.Posix (2.0.0.0)
atk-sharp (2.10.0.0)
gtk-sharp (2.10.0.0)
Mono.Addins.Setup (0.2.0.0)
glib-sharp (2.10.0.0)
gnome-sharp (2.16.0.0)
f-spot (0.4.0.0)
Mono.GetOptions (2.0.0.0)
mscorlib (2.0.0.0)

Platform Information: Linux 2.6.17-11-generic i686 unknown GNU/Linux

Distribution Information:

[/etc/debian_version]
testing/unstable

[/etc/lsb-release]
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=6.10
DISTRIB_CODENAME=edgy
DISTRIB_DESCRIPTION="Ubuntu 6.10"



Other information:
Comment 1 Christoffer Sørensen 2007-07-16 20:33:18 UTC
After closing and restarting f-spot, f-spot didn't crash.
Comment 2 Christoffer Sørensen 2007-07-19 18:35:48 UTC
This also happens when I open Edit->Preferences:

An unhandled exception was thrown: An element with the same key already exists in the dictionary.

  at System.Collections.Generic.Dictionary`2[System.String,System.Object].Add (System.String , System.Object ) [0x00000] 
  at FSpot.Preferences.Get (System.String key) [0x00000] 
  at FSpot.PreferenceDialog.LoadPreference (System.String key) [0x00000] 
  at FSpot.PreferenceDialog..ctor () [0x00000] 
  at FSpot.PreferenceDialog.Show () [0x00000] 
  at MainWindow.HandlePreferences (System.Object sender, System.EventArgs args) [0x00000] 
  at (wrapper delegate-invoke) System.MulticastDelegate:invoke_void_object_EventArgs (object,System.EventArgs)
  at GLib.Signal.voidObjectCallback (IntPtr handle, IntPtr gch) [0x00000] 
  at (wrapper native-to-managed) GLib.Signal:voidObjectCallback (intptr,intptr)
  at <0x00000> <unknown method>
  at (wrapper managed-to-native) Gtk.Application:gtk_main ()
  at Gtk.Application.Run () [0x00000] 
  at Gnome.Program.Run () [0x00000] 
  at FSpot.Driver.Main (System.String[] args) [0x00000] 
.NET Version: 2.0.50727.42

Assembly Version Information:

Mono.Addins.Gui (0.2.0.0)
SemWeb (0.7.1.0)
pango-sharp (2.10.0.0)
glade-sharp (2.10.0.0)
System.Data (2.0.0.0)
Mono.Data.SqliteClient (2.0.0.0)
System.Xml (2.0.0.0)
gconf-sharp (2.16.0.0)
gdk-sharp (2.10.0.0)
gnome-vfs-sharp (2.16.0.0)
Mono.Addins (0.2.0.0)
NDesk.DBus.GLib (0.3.0.0)
NDesk.DBus (1.0.0.0)
System (2.0.0.0)
Mono.Posix (2.0.0.0)
atk-sharp (2.10.0.0)
gtk-sharp (2.10.0.0)
Mono.Addins.Setup (0.2.0.0)
glib-sharp (2.10.0.0)
gnome-sharp (2.16.0.0)
f-spot (0.4.0.0)
Mono.GetOptions (2.0.0.0)
mscorlib (2.0.0.0)

Platform Information: Linux 2.6.17-12-generic i686 unknown GNU/Linux

Distribution Information:

[/etc/debian_version]
testing/unstable

[/etc/lsb-release]
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=6.10
DISTRIB_CODENAME=edgy
DISTRIB_DESCRIPTION="Ubuntu 6.10"

Comment 3 Stephane Delcroix 2007-07-19 19:22:05 UTC
looks like this code needs some locks for multithreading support... if rubenv doesn't shows up in the next few days, I'll give a try by myself
Comment 4 Ruben Vermeersch 2007-07-19 20:00:22 UTC
Goddarn this is my fault :-)

I'll clean up my own mess. Very strange that we're getting calls from multiple threads. I'll put monitors around them.

Also, note that I suck at reading bugmail lately (IBM eats my spare time), if you need me, be sure to ping me, a lot :-)
Comment 5 Ruben Vermeersch 2007-07-19 20:18:08 UTC
I've pushed in a patch that makes the cache manipulation thread-safe. If the threading problems are what cause this, it should be fixed.

Could you try updating your copy? Let me know if it did the trick, if not, I'll dive into it some more. Sorry for the breakage, it worked on my system :-)
Comment 6 Christoffer Sørensen 2007-07-20 15:33:24 UTC
Your fix worked.

Thanks.
Comment 7 Christoffer Sørensen 2007-07-28 20:27:02 UTC
I think there is something wrong here.

I am trying to make a patch for http://bugzilla.gnome.org/show_bug.cgi?id=326328

but I get hit by this bug again. 

It happens with settings that does not exist yet. I cannot understand why it happens, so can't make a patch for this bug.
Comment 8 Stephane Delcroix 2007-07-29 07:43:24 UTC
I committed another fix (provided by Mike) to this bug yesterday as r3258