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 591424 - Crash on adding color profiles for color management while starting up
Crash on adding color profiles for color management while starting up
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: General
0.6.0
Other All
: Normal critical
: ---
Assigned To: F-spot maintainers
F-spot maintainers
Depends on:
Blocks:
 
 
Reported: 2009-08-11 09:10 UTC by Martin Szulecki
Modified: 2009-08-14 11:31 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Martin Szulecki 2009-08-11 09:10:45 UTC
Steps to reproduce:
1. Put a couple of color profiles in /usr/share/color/icc/
2. Start f-spot
3. See it crash


Stack trace:
@:~> f-spot --debug
** Running f-spot in Debug Mode **
** Running Mono with --debug   **
...
[Info  10:54:51.087] Hack for gnome-settings-daemon engaged
Exception in Gtk# callback delegate
  Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
System.ArgumentException: An element with the same key already exists in the dictionary.
  at System.Collections.Generic.Dictionary`2[System.Object,System.Object].Add (System.Object key, System.Object value) [0x00000] 
  at FSpot.ColorManagement.AddProfiles (System.String path, IDictionary`2 profs) [0x00042] in /usr/src/packages/BUILD/f-spot-0.6.0.0/src/Core/ColorManagement.cs:57 
  at FSpot.ColorManagement.get_Profiles () [0x00058] in /usr/src/packages/BUILD/f-spot-0.6.0.0/src/Core/ColorManagement.cs:32 
  at FSpot.TagSelectionWidget.IconDataFunc (Gtk.TreeViewColumn column, Gtk.CellRenderer renderer, TreeModel model, TreeIter iter) [0x0003f] in /usr/src/packages/BUILD/f-spot-0.6.0.0/src/TagSelectionWidget.cs:190 
  at GtkSharp.TreeCellDataFuncWrapper.NativeCallback (IntPtr tree_column, IntPtr cell, IntPtr tree_model, IntPtr iter, IntPtr data) [0x00000] in /usr/src/packages/BUILD/gtk-sharp-2.12.6/gtk/generated/GtkSharp.TreeCellDataFuncNative.cs:57 
   at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal) in /usr/src/packages/BUILD/gtk-sharp-2.12.6/glib/ExceptionManager.cs:line 58
   at GtkSharp.TreeCellDataFuncWrapper.NativeCallback(IntPtr tree_column, IntPtr cell, IntPtr tree_model, IntPtr iter, IntPtr data) in /usr/src/packages/BUILD/gtk-sharp-2.12.6/gtk/generated/GtkSharp.TreeCellDataFuncNative.cs:line 61
   at Gtk.Application.gtk_main()
   at Gtk.Application.Run() in /usr/src/packages/BUILD/gtk-sharp-2.12.6/gtk/generated/AboutDialog.cs:line 1
   at FSpot.Driver.Main(System.String[] args) in /usr/src/packages/BUILD/f-spot-0.6.0.0/src/main.cs:line 345
[Debug 10:54:51.217] Finalizer called on FSpot.PhotoView. Should be Disposed
...

Other information:
Structure of my only color profile directory:

/usr/share/color/icc/
/usr/share/color/icc/bluish.icc
/usr/share/color/icc/gamma_1_0.icc
/usr/share/color/icc/gamma_2_2.icc
/usr/share/color/icc/gamma_2_2_lowContrast.icc
/usr/share/color/icc/Adobe ICC Profiles
/usr/share/color/icc/Adobe ICC Profiles/CMYK Profiles
/usr/share/color/icc/Adobe ICC Profiles/CMYK Profiles/USSheetfedUncoated.icc
/usr/share/color/icc/Adobe ICC Profiles/CMYK Profiles/EuroscaleUncoated.icc
/usr/share/color/icc/Adobe ICC Profiles/CMYK Profiles/JapanColor2002Newspaper.icc
/usr/share/color/icc/Adobe ICC Profiles/CMYK Profiles/JapanWebCoated.icc
/usr/share/color/icc/Adobe ICC Profiles/CMYK Profiles/JapanColor2001Uncoated.icc
/usr/share/color/icc/Adobe ICC Profiles/CMYK Profiles/USWebCoatedSWOP.icc
/usr/share/color/icc/Adobe ICC Profiles/CMYK Profiles/EuropeISOCoatedFOGRA27.icc
/usr/share/color/icc/Adobe ICC Profiles/CMYK Profiles/JapanColor2001Coated.icc
/usr/share/color/icc/Adobe ICC Profiles/CMYK Profiles/USSheetfedCoated.icc
/usr/share/color/icc/Adobe ICC Profiles/CMYK Profiles/USWebUncoated.icc
/usr/share/color/icc/Adobe ICC Profiles/RGB Profiles
/usr/share/color/icc/Adobe ICC Profiles/RGB Profiles/sRGB Color Space Profile.icm
/usr/share/color/icc/Adobe ICC Profiles/RGB Profiles/AdobeRGB1998.icc
/usr/share/color/icc/Adobe ICC Profiles/RGB Profiles/AppleRGB.icc
/usr/share/color/icc/Adobe ICC Profiles/RGB Profiles/ColorMatchRGB.icc
/usr/share/color/icc/gamma_2_2_bright.icc

Judging from a first look at the code, "profs.Add(profile.ProductName, profile);" profile.ProductName is probably not unique enough, especially if like me, you have files for variants of the same color profile (like the gamma ones here)
Comment 1 Stephane Delcroix 2009-08-14 11:31:20 UTC
fixed