"SQL logic error or missing database" when importing

Bug #135152 reported by Alan Pope 🍺🐧🐱 🦄
6
Affects Status Importance Assigned to Milestone
f-spot (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Binary package hint: f-spot

F-Spot 0.3.5 on Ubuntu Feisty with 5507 photos already imported.

Importing photos from compact flash, or indeed from a folder in home results in an error "SQL logic error or missing database" and then a skip or cancel option. If I skip it happens on subsequent pictures too.

If I run f-spot from the command line I get this:-

alan@wopr:~$ f-spot
Starting new FSpot server
The existing database version is more recent than this version of F-Spot expects.

(f-spot:21656): libglade-WARNING **: unknown attribute `comment' for <property>.
Reloading
item changed
open uri = file:///home/alan/Photos/2007/08/22/IMG_9255.JPG
open uri = file:///home/alan/Photos/2007/08/22/IMG_9255.JPG
open uri = file:///home/alan/Photos/2007/08/21/IMG_9225.JPG
open uri = file:///home/alan/Photos/2007/08/21/IMG_9225.JPG
open uri = file:///home/alan/Photos/2007/08/21/IMG_9201.JPG
open uri = file:///home/alan/Photos/2007/08/21/IMG_9201.JPG
open uri = file:///home/alan/Photos/2007/08/21/IMG_9211.JPG
open uri = file:///home/alan/Photos/2007/08/21/IMG_9211.JPG
open uri = file:///home/alan/Photos/2007/08/03/IMG_9155.JPG
open uri = file:///home/alan/Photos/2007/08/03/IMG_9155.JPG
open uri = file:///home/alan/Photos/2007/08/15/IMG_9196.JPG
open uri = file:///home/alan/Photos/2007/08/15/IMG_9196.JPG
open uri = file:///home/alan/Photos/2007/08/03/IMG_9163.JPG
open uri = file:///home/alan/Photos/2007/08/03/IMG_9163.JPG
open uri = file:///home/alan/Photos/2007/08/12/IMG_9184.JPG
open uri = file:///home/alan/Photos/2007/08/12/IMG_9184.JPG
open uri = file:///home/alan/Photos/2007/08/21/IMG_9240.JPG
open uri = file:///home/alan/Photos/2007/08/21/IMG_9240.JPG
open uri = file:///home/alan/Photos/2007/08/22/IMG_9255.JPG
open uri = file:///home/alan/Photos/2007/08/22/IMG_9255.JPG

(f-spot:21656): libglade-WARNING **: unknown attribute `comment' for <property>.
250GDisk - gnome-dev-harddisk-usb - Mountpoint file:///media/250GDisk True True Harddrive
Harddrive
500GDisk - gnome-dev-harddisk-usb - Mountpoint file:///media/500GDisk True True Harddrive
Harddrive
750GDisk - gnome-dev-harddisk-usb - Mountpoint file:///media/750GDisk True True Harddrive
Harddrive
EOS_DIGITAL - gnome-dev-media-cf - Mountpoint file:///media/EOS_DIGITAL True True MemoryStick
MemoryStick
looking for /media/EOS_DIGITAL
cleanup context
cleanup context
item ImportCommand+SourceItem
Scanning /media/EOS_DIGITAL
Scanning /media/EOS_DIGITAL/DCIM
Scanning /media/EOS_DIGITAL/DCIM/166CANON
item changed
open uri = file:///media/EOS_DIGITAL/DCIM/166CANON/IMG_9256.JPG
open uri = file:///media/EOS_DIGITAL/DCIM/166CANON/IMG_9256.JPG
Error importing /media/EOS_DIGITAL/DCIM/166CANON/IMG_9256.JPG
Mono.Data.SqliteClient.SqliteExecutionException: SQL logic error or missing database
  at Mono.Data.SqliteClient.SqliteCommand.ExecuteStatement (IntPtr pStmt, System.Int32& cols, System.IntPtr& pazValue, System.IntPtr& pazColName) [0x00000]
  at (wrapper remoting-invoke-with-check) Mono.Data.SqliteClient.SqliteCommand:ExecuteStatement (intptr,int&,intptr&,intptr&)
  at Mono.Data.SqliteClient.SqliteDataReader.ReadpVm (IntPtr pVm, Int32 version, Mono.Data.SqliteClient.SqliteCommand cmd) [0x00000]
  at Mono.Data.SqliteClient.SqliteDataReader..ctor (Mono.Data.SqliteClient.SqliteCommand cmd, IntPtr pVm, Int32 version) [0x00000]
  at (wrapper remoting-invoke-with-check) Mono.Data.SqliteClient.SqliteDataReader:.ctor (Mono.Data.SqliteClient.SqliteCommand,intptr,int)
  at Mono.Data.SqliteClient.SqliteCommand.ExecuteReader (CommandBehavior behavior, Boolean want_results, System.Int32& rows_affected) [0x00000]
  at Mono.Data.SqliteClient.SqliteCommand.ExecuteReader (CommandBehavior behavior) [0x00000]
  at Mono.Data.SqliteClient.SqliteCommand.ExecuteReader () [0x00000]
  at Mono.Data.SqliteClient.SqliteCommand.ExecuteScalar () [0x00000]
  at PhotoStore.Create (System.String newPath, System.String origPath, Gdk.Pixbuf& thumbnail) [0x00000]
  at FileImportBackend.Step (.Photo& photo, Gdk.Pixbuf& thumbnail, System.Int32& count) [0x00000]
Could not import file

Revision history for this message
Ulisse (ulipo) wrote :

exactly the same here.

Revision history for this message
Ulisse (ulipo) wrote :

I solved by running a newer version of f-spot (0.4.0), but I had to do some other stuff to have it working:

(on Ubuntu 7.04)
- dump the database with sqlite to a flat file (sqlite photos.db .dump > flat-file.dump)
- backup the original photos db (mv photos.db photos.db.bak)
- recreate the database with sqlite3 (sqlite3 photos.db < flat-file.dump)
- uninstall sqlite and libsqlite0 (not sure if it is needed, the first time it didn't work w/o uninstalling, but now it is...)

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Is this still an issue with f-spot 0.4?

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

Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!.

Changed in f-spot:
status: Incomplete → Invalid
Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) wrote :

For the record I "resolved" this by deleting the sql database (meaning I lost all my tags).

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.