out of range index while importing - DB problem?



Hey all,

I've just upgraded to svn head as of this morning, and I'm running into a problem importing images into one of my repositories - I get the following exception and traceback:

Error importing /home/warren/Photos/2007/07/08/img_4637.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


This seems to only happen on one of my repositories, so it's gonna be hard to repro (hence posting here rather than b.g.o)

I've traced it down to the "Database.Execute" call in PhotoStore.Create(string, string, int, Pixbuf) that is trying to add the photo info to the 'photos' table. I dumped the args to the Database.Execute command, and things look alright...

I must admit I don't understand the innards of Sqlite much... If anyone has any suggestions, I'd love to hear them.

My backup position is to make sure all my metadata is saved in my images, and just recreate my db... but I'd rather track down and fix the problem if possible.

Thanks,

Warren



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]