Bug 351745

Summary: f-spot photo import fails
Product: [openSUSE] openSUSE 10.3 Reporter: Michael Meeks <mmeeks>
Component: GNOMEAssignee: Larry Ewing <lewing>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: federico
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard: gnome-function-does-not-work, gnome-showstopper
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: f-spot log
photo

Description Michael Meeks 2008-01-04 20:29:32 UTC
f-spot does 99.7% of things right here it seems; I hot plug the camera, it is detected by HAL:

Jan  2 12:52:10 linux kernel: usb 5-1: new high speed USB device using ehci_hcd and address 15
Jan  2 12:52:11 linux kernel: usb 5-1: new device found, idVendor=04a9, idProduct=314f
Jan  2 12:52:11 linux kernel: usb 5-1: new device strings: Mfr=1, Product=2, SerialNumber=3
Jan  2 12:52:11 linux kernel: usb 5-1: Product: Canon Digital Camera
Jan  2 12:52:11 linux kernel: usb 5-1: Manufacturer: Canon Inc.
Jan  2 12:52:11 linux kernel: usb 5-1: SerialNumber: B6DDBCF5BDDA4044B31A1D47F32D38AC
Jan  2 12:52:11 linux kernel: usb 5-1: configuration #1 chosen from 1 choice

f-spot is launched, thumbnails are shown nicely, photos are imported and the progress moves to ~100%

Then - at the last minute it barfs with some error - presumably it doesn't like the JPEG files (for some strange reason):

I attach stdout/stderr from f-spot, the interesting section being:

open uri = file:///home/michael/Photos/2007/12/25/img_0003-1.jpg
Error importing /home/michael/Photos/2007/12/25/img_0003-1.jpg
System.ArgumentOutOfRangeException: Index is less than 0 or more than or equal to the list count.
Parameter name: index
-1
  at System.Collections.ArrayList.get_Item (Int32 index) [0x00000] 
  at Mono.Data.SqliteClient.SqliteParameterCollection.GetParameter (Int32 parameterIndex) [0x00000] 
  at System.Data.Common.DbParameterCollection.get_Item (Int32 index) [0x00000] 
  at System.Data.Common.DbParameterCollection.get_Item (System.String parameterName) [0x00000] 
  at (wrapper remoting-invoke-with-check) System.Data.Common.DbParameterCollection:get_Item (string)
  at Mono.Data.SqliteClient.SqliteCommand.BindParameters2 () [0x00000] 
  at Mono.Data.SqliteClient.SqliteCommand.Prepare () [0x00000] 
  at Mono.Data.SqliteClient.SqliteCommand.ExecuteReader (CommandBehavior behavior, Boolean want_results, System.Int32& rows_affected) [0x00000] 
  at Mono.Data.SqliteClient.SqliteCommand.ExecuteNonQuery () [0x00000] 
  at Banshee.Database.QueuedSqliteCommand.Execute () [0x00000] 
Could not import file

and a photo of my eldest daughter :-)
Comment 1 Michael Meeks 2008-01-04 20:29:57 UTC
Created attachment 189397 [details]
f-spot log
Comment 2 Michael Meeks 2008-01-04 20:32:05 UTC
Created attachment 189398 [details]
photo
Comment 3 Mark Gordon 2008-01-04 20:41:08 UTC
At first glance, this doesn't look like a duplicate of Bug 327122

I'm unable to reproduce the problem with the attached photo.
Comment 4 JP Rosevear 2008-01-24 14:50:41 UTC
*** Bug 349067 has been marked as a duplicate of this bug. ***
Comment 5 Federico Mena Quintero 2008-02-26 17:47:44 UTC
I just started getting this bug as well.  It started after:

1. using a recycled /home directory
2. doing a fresh install of openSUSE 10.3
3. finding that I get bug #327122
4. installing sqlite2
5. restarting f-spot - now it starts, but it won't import.

I get the same exception as Michael.
Comment 6 Federico Mena Quintero 2008-02-26 17:49:43 UTC
However, I get the exception as soon as F-spot loads the first photo from the CF card - it never gets to 100%, unlike Michael's case.

If I hit "skip" in the error dialog that tells me about the incorrect index, I get the same error again for the next photo.
Comment 7 Federico Mena Quintero 2008-02-26 17:58:27 UTC
From talking to Larry and then experimenting, this made things work for me:

0. Backup ~/.gnome2/f-spot
1. Install sqlite2
2. Run f-spot, exit it
3. Run f-spot-sqlite-upgrade
3. Run f-spot again

After that, importing works fine.
Comment 8 JP Rosevear 2008-03-26 14:25:12 UTC

*** This bug has been marked as a duplicate of bug 327122 ***
Comment 9 Michael Meeks 2008-03-28 10:15:17 UTC
So - what about the end-users ? do they all need to run 5 steps from the command-line to be able to import pictures again ;-)

Grief - I -hate- databases. Can we not have a dual representation of the tag data in an append-only log file / journal of some kind; treat that as authoritative and re-build the database if necessary.