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 566977 - F-Spot crashes when database is empty and user clicks time scale slider
F-Spot crashes when database is empty and user clicks time scale slider
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: General
0.5.x
Other All
: Normal major
: 0.6.0
Assigned To: F-spot maintainers
F-spot maintainers
Depends on:
Blocks:
 
 
Reported: 2009-01-08 03:21 UTC by alexey_nedilko
Modified: 2009-11-04 16:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot with 'crasher' control marked (34.32 KB, image/png)
2009-01-08 03:27 UTC, alexey_nedilko
Details

Description alexey_nedilko 2009-01-08 03:21:41 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.
Comment 1 alexey_nedilko 2009-01-08 03:27:25 UTC
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 ;))
Comment 2 alexey_nedilko 2009-10-09 00:50:13 UTC

*** This bug has been marked as a duplicate of bug 578871 ***
Comment 3 alexey_nedilko 2009-11-02 11:22:40 UTC
Reopening as discussed with Mike Gemünde here:
https://bugzilla.gnome.org/show_bug.cgi?id=578871#c19
Comment 4 Mike Gemünde 2009-11-03 17:37:28 UTC
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?
Comment 5 Stephane Delcroix 2009-11-04 16:24:08 UTC
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