GNOME Bugzilla – Bug 566977
F-Spot crashes when database is empty and user clicks time scale slider
Last modified: 2009-11-04 16:24:08 UTC
Steps to reproduce: 1. Start F-Spot that does not have any photos in the database. 2. Perform a click on the slider of the time scale (screenshot attached). 3. The application exits without any error messages visible to user. Exception stack trace is below. Stack trace: Exception in Gtk# callback delegate Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception. System.ArgumentOutOfRangeException: Argument is out of range. Parameter name: Parameters describe an unrepresentable DateTime. at System.DateTime..ctor (Int32 year, Int32 month, Int32 day, Int32 hour, Int32 minute, Int32 second, Int32 millisecond) [0x00000] at System.DateTime..ctor (Int32 year, Int32 month, Int32 day) [0x00000] at FSpot.TimeAdaptor.DateFromIndexAscending (Int32 item) [0x00000] at FSpot.TimeAdaptor.DateFromIndex (Int32 item) [0x00000] at FSpot.TimeAdaptor.GlassLabel (Int32 item) [0x00000] at FSpot.GroupSelector+Glass.StartDrag (Double x, Double y, UInt32 time) [0x00000] at FSpot.GroupSelector.OnButtonPressEvent (Gdk.EventButton args) [0x00000] at Gtk.Widget.buttonpressevent_cb (IntPtr widget, IntPtr evnt) [0x00000] at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal) at Gtk.Widget.buttonpressevent_cb(IntPtr widget, IntPtr evnt) at Gtk.Widget.buttonpressevent_cb(IntPtr , IntPtr ) at Gtk.Application.gtk_main() at Gtk.Application.gtk_main() at Gtk.Application.Run() at Gnome.Program.Run() at FSpot.Driver.Main(System.String[] args) Other information: The time scale control is disabled when the database is empty, but the slider still raises events when being clicked with the mouse.
Created attachment 125994 [details] Screenshot with 'crasher' control marked The slider is marked with red on the screenshot (just in case I name this control incorrectly ;))
*** This bug has been marked as a duplicate of bug 578871 ***
Reopening as discussed with Mike Gemünde here: https://bugzilla.gnome.org/show_bug.cgi?id=578871#c19
ok, here is a fix for it: http://gitorious.org/~tigger/f-spot/tiggers-clone/commits/empty-db-timeline-crash can you please test it?
commit 6e4d605a13d072168e135d4e3d4d4afa8a7a749b Author: Mike Gemuende <mike@gemuende.de> Date: Wed Nov 4 17:19:01 2009 +0100 ignores drag-begins if glass is not visible The glass of the timeselector was sensitive to drags, even if it was not drawn. This caused crashes on an empty database, when one clicked to the position the glass really (but invisible) is. Now the glass ignores such drags. fixes bgo #566977