Cannot import any images (import error)

Bug #141180 reported by LGB [Gábor Lénárt]
42
Affects Status Importance Assigned to Milestone
F-Spot
Fix Released
Low
f-spot (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

If I choose a directory to import, then try to import images from it, I got an error dialog window on every single image saying:

Import error
Error importing /home/lgb/pictures/somefilename.jpg
Index is less than 0 or more than or equal to the list count.
Parameter name: index
-1

meanwhile, in the terminal window:

open uri = file:///home/lgb/pictures/1416799051.jpg
System.NullReferenceException: A null value was found where an object instance was required.
  at FSpot.JpegFile.get_Date () [0x00000]
System.NullReferenceException: A null value was found where an object instance was required.
  at FSpot.JpegFile.get_Description () [0x00000]
Error importing /home/lgb/pictures/1416799051.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]

Related branches

Revision history for this message
LGB [Gábor Lénárt] (lgb) wrote :

Oh, sorry version information: it's Ubuntu gutsy on i386, f-spot 0.4.0-0ubuntu2

Revision history for this message
none (ubuntu-bugs-nullinfinity-deactivatedaccount) wrote :

I also see this. Same version but on amd64.

Changed in f-spot:
status: New → Confirmed
Revision history for this message
Pedro Villavicencio (pedro) wrote :

will forward upstream, thanks.

Changed in f-spot:
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
Pedro Villavicencio (pedro) wrote :

Similar bug upstream: http://bugzilla.gnome.org/show_bug.cgi?id=441078 ; feel free to make your comments there, thanks you.

Changed in f-spot:
assignee: nobody → desktop-bugs
Changed in f-spot:
status: Unknown → New
Revision history for this message
none (ubuntu-bugs-nullinfinity-deactivatedaccount) wrote :

Apparently this is an issue with the sqlite database being 2.x and not 3.x. Doing

cd ~/.gnome2/f-spot/
mv photos.db photos_sqlite2.db
sqlite photos_sqlite2.db .dump | sqlite3 photos.db

fixed the problem for me.

Revision history for this message
LGB [Gábor Lénárt] (lgb) wrote :

Ack, this fixed the problem for me too. HOwever now sometimes f-spot freezes with xlib async reply messages (though I don't think it's related to this message ....)

Changed in f-spot:
status: New → Invalid
Changed in f-spot:
status: Unknown → New
Revision history for this message
Magnus Runesson (m-runesson) wrote :

Just run f-spot-sqlite-upgrade fixes the problem.

Revision history for this message
Maia Everett (linneris) wrote :

In this case, upgrading to the latest Debian version will fix it, since it runs f-spot-sqlite-upgrade automatically.

I'll file a merge request.

Changed in f-spot:
assignee: desktop-bugs → sikon
status: Triaged → Incomplete
Maia Everett (linneris)
Changed in f-spot:
status: Incomplete → Fix Committed
Revision history for this message
Maia Everett (linneris) wrote :

This bug has been fixed in version 0.4.1-4ubuntu1.

Manually closing because the upload failed to autoclose it.

Changed in f-spot:
assignee: sikon → nobody
status: Fix Committed → Fix Released
Revision history for this message
Maia Everett (linneris) wrote :

A more detailed explanation of _why_ I consider it fixed: thanks to Mirco Bauer, Debian versions 0.4.1-2 and later include an automatic sqlite upgrade script. If this issue persists for you, please reopen.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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