After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 673068 - f-spot crashes when reversing time order display
f-spot crashes when reversing time order display
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: Editing
0.8.2
Other Linux
: Normal critical
: ---
Assigned To: F-spot maintainers
F-spot maintainers
Depends on:
Blocks:
 
 
Reported: 2012-03-29 12:01 UTC by Fabrice Bellet
Modified: 2012-11-17 08:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch that doesn't reload TimeAdaptor twice (703 bytes, patch)
2012-03-29 12:04 UTC, Fabrice Bellet
none Details | Review

Description Fabrice Bellet 2012-03-29 12:01:57 UTC
I select a subset of images based on a common tag, then I select all these images, and try to view them in reverse order (View->Reverse Order). F-spot crashes with this error message :

[3 Debug 13:48:50.674] Exception executing command: SELECT COUNT (*) as count, month from population GROUP BY month
[3 Warn  13:48:50.677] Caught an exception - Hyena.Data.Sqlite.SqliteException: Sqlite error 1: no such table: population (SQL: SELECT COUNT (*) as count, month from population GROUP BY month) (in `Hyena.Data.Sqlite')
  at Hyena.Data.Sqlite.Connection.CheckError (Int32 errorCode, System.String sql) [0x0003b] in /builddir/build/BUILD/f-spot-0.8.2/lib/Hyena/Hyena.Data.Sqlite/Hyena.Data.Sqlite/Sqlite.cs:107 
  at Hyena.Data.Sqlite.Statement.CheckError (Int32 code) [0x00000] in /builddir/build/BUILD/f-spot-0.8.2/lib/Hyena/Hyena.Data.Sqlite/Hyena.Data.Sqlite/Sqlite.cs:345 
  at Hyena.Data.Sqlite.Statement..ctor (Hyena.Data.Sqlite.Connection connection, System.String sql) [0x00026] in /builddir/build/BUILD/f-spot-0.8.2/lib/Hyena/Hyena.Data.Sqlite/Hyena.Data.Sqlite/Sqlite.cs:236 
  at Hyena.Data.Sqlite.Connection.Query (System.String sql) [0x00000] in /builddir/build/BUILD/f-spot-0.8.2/lib/Hyena/Hyena.Data.Sqlite/Hyena.Data.Sqlite/Sqlite.cs:117 
  at Hyena.Data.Sqlite.HyenaSqliteCommand.Execute (Hyena.Data.Sqlite.HyenaSqliteConnection hconnection, Hyena.Data.Sqlite.Connection connection) [0x00068] in /builddir/build/BUILD/f-spot-0.8.2/lib/Hyena/Hyena.Data.Sqlite/Hyena.Data.Sqlite/HyenaSqliteCommand.cs:98 

The problem is that two threads invoke method FSpot.TimeAdaptor.Reload() simultaneously. This method calls FSpot.PhotoStore.PhotosPerMonth(), which create a temporary sqlite table without locking protection. The temporary table is removed by a thread before being used by the other thread.
Comment 1 Fabrice Bellet 2012-03-29 12:04:37 UTC
Created attachment 210861 [details] [review]
Patch that doesn't reload TimeAdaptor twice
Comment 2 Arun Persaud 2012-10-12 05:55:48 UTC
Tested with commit 3a4dbc4622af12fe9df8cc31da5565d912f65958 and can _not_ reproduce this issue. The problem addressed in the patch is still in the current code though (e.g. patch could be applied).
Comment 3 Stephen Shaw 2012-11-17 08:15:53 UTC
commit 24e001df9fc3d0596ab9696f510c1be70d2eafec
Author: Fabrice Bellet <fabrice@bellet.info>
Date:   Sun Mar 18 10:28:48 2012 +0100

    Dont reload FSpot.TimeAdaptor twice