F-Spot System.ArgumentException at System.Collections.Generic.Dictionary`2[System.String,Cms.Profile].Add (System.String key, Cms.Profile value) [0x00000]

Bug #412157 reported by xtknight
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
f-spot (Ubuntu)
Fix Released
Medium
Ubuntu Desktop Bugs

Bug Description

Binary package hint: f-spot

Simply starting f-spot reveals this bug.

andy@bloomfield:/var/crash$ f-spot
[Info 16:29:10.760] Initializing DBus
[Info 16:29:10.827] Initializing Mono.Addins
[Info 16:29:10.923] Starting new FSpot server (f-spot 0.6.0.0)
[Info 16:29:11.361] Starting BeagleService
[Info 16:29:11.371] Hack for gnome-settings-daemon engaged

(f-spot:23092): GdkPixbuf-WARNING **: GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference.
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.String,Cms.Profile].Add (System.String key, Cms.Profile value) [0x00000]
  at FSpot.ColorManagement.AddProfiles (System.String path, IDictionary`2 profs) [0x00000]
  at FSpot.ColorManagement.get_Profiles () [0x00000]
  at FSpot.TagSelectionWidget.IconDataFunc (Gtk.TreeViewColumn column, Gtk.CellRenderer renderer, TreeModel model, TreeIter iter) [0x00000]
  at GtkSharp.TreeCellDataFuncWrapper.NativeCallback (IntPtr tree_column, IntPtr cell, IntPtr tree_model, IntPtr iter, IntPtr data) [0x00000]
   at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal)
   at GtkSharp.TreeCellDataFuncWrapper.NativeCallback(IntPtr tree_column, IntPtr cell, IntPtr tree_model, IntPtr iter, IntPtr data)
   at Gtk.Application.gtk_main()
   at Gtk.Application.Run()
   at FSpot.Driver.Main(System.String[] args)

ProblemType: Bug
Architecture: amd64
Date: Tue Aug 11 16:31:01 2009
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: nvidia
Package: f-spot 0.6.0.0-1~ubuntu1
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=en_US.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-5.24-generic
SourcePackage: f-spot
Uname: Linux 2.6.31-5-generic x86_64

Revision history for this message
xtknight (xt-knight) wrote :
Revision history for this message
xtknight (xt-knight) wrote :

This happens because I have a /usr/share/color/icc directory looking like this:

andy@bloomfield:/usr/share/color/icc$ ls -al
total 6400
drwxr-xr-x 2 root root 4096 2009-08-11 16:55 .
drwxr-xr-x 4 root root 4096 2009-08-11 16:48 ..
-rw-r--r-- 1 root root 540 2005-08-04 19:39 ECI-RGB.V1.0.icc
-rw-r--r-- 1 root root 225824 2005-08-02 05:45 Fogra27L.icm
-rw-r--r-- 1 root root 1526728 2005-08-04 19:39 ISOcoated.icc
-rw-r--r-- 1 root root 1528264 2005-08-04 19:39 ISOuncoated.icc
-rw-r--r-- 1 root root 1528312 2005-08-04 19:39 ISOuncoatedyellowish.icc
-rw-r--r-- 1 root root 1526792 2005-08-04 19:39 ISOwebcoated.icc
-rw-r--r-- 1 root root 17688 2009-07-31 18:18 l227wt.icc
lrwxrwxrwx 1 root root 15 2009-07-29 03:21 lcd2690wuxi.icc -> LCD2690WUXi.icc
lrwxrwxrwx 1 root root 15 2009-07-29 03:21 lcd2690wuxi.ICC -> LCD2690WUXi.icc
-rw-r--r-- 1 root root 1644 2009-07-31 19:44 LCD2690WUXi.icc
lrwxrwxrwx 1 root root 15 2009-07-29 03:20 LCD2690WUXi.ICC -> LCD2690WUXi.icc
lrwxrwxrwx 1 root root 15 2009-07-29 03:20 LCD2690WUXI.ICC -> LCD2690WUXi.icc
lrwxrwxrwx 1 root root 15 2009-07-29 03:22 lcd2690wuxi.icm -> LCD2690WUXi.icc
lrwxrwxrwx 1 root root 15 2009-07-29 03:22 lcd2690wuxi.ICM -> LCD2690WUXi.icc
lrwxrwxrwx 1 root root 15 2009-07-29 03:22 LCD2690WUXi.ICM -> LCD2690WUXi.icc
lrwxrwxrwx 1 root root 15 2009-07-29 03:22 LCD2690WUXI.ICM -> LCD2690WUXi.icc
-rw-r--r-- 1 root root 1052 2005-08-04 19:39 LStar-RGB.icc
-rw-r--r-- 1 root root 157312 2005-08-04 19:40 PhotoGamutRGB_avg6c.icc
-rw-r--r-- 1 root root 3144 2005-08-01 19:43 sRGB.icm

That's not likely to happen on most PCs, but I do it because of case sensitivity. This patch should fix the problem.

However, I do wonder if the issue is deeper in Mono. Maybe that file enumeration function shouldn't even return symlinks if they are duplicates?

I'm subscribing ubuntu-main-sponsors because I believe this is a perfectly valid fix for the issue for now.

Revision history for this message
Sebastien Bacher (seb128) wrote :

The package is on sync with debian, could you send the bug and change upstream and to the debian bts?

Revision history for this message
Pedro Villavicencio (pedro) wrote :
Changed in f-spot (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
importance: Undecided → Medium
Revision history for this message
xtknight (xt-knight) wrote :

Pedro:

I don't think so. That's for when somebody has one monitor and several ICM profiles for it.

This has to do with symlinks. I'm all updated and I've still got the problem in Ubuntu.

I'd prefer not to completely uproot my system but if you want I will test f-spot SVN. I'd like to know what patch he submitted, and I could probably tell if it fixed the problem.

Revision history for this message
xtknight (xt-knight) wrote :

LOL well I obviously spoke way too soon. It only took like three minutes to compile and I isolated it from the rest of my system. I didn't expect it to be that easy.

GIT head fixes the problem. As per http://f-spot.org/How_To_Build_from_HEAD

The bug is still valid, because the patch needs to be backported to Ubuntu and Debian, or we need to sync to the latest GIT. Which one should we do? I'll open a Debian bug.

Revision history for this message
Sebastien Bacher (seb128) wrote :

the issue should be fixed in the current karmic version now

Changed in f-spot (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.