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 508124 - While trying to create new version without creating a file, Crash because of bug in CreateVersions
While trying to create new version without creating a file, Crash because of ...
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: General
SVN
Other All
: Normal critical
: ---
Assigned To: F-spot maintainers
F-spot maintainers
Depends on:
Blocks:
 
 
Reported: 2008-01-08 19:34 UTC by guava
Modified: 2008-01-09 13:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fixes the bug. (770 bytes, patch)
2008-01-08 19:46 UTC, guava
committed Details | Review

Description guava 2008-01-08 19:34:45 UTC
Steps to reproduce:
1. Go to http://bugzilla.gnome.org/show_bug.cgi?id=342138 and download the attached extension (comment #4)
2. Recreate problem in aforementioned bug
3. Go to the Tools menu, run FixBackVersions, then click "DO IT NOW"


Stack trace:
Exception in Gtk# callback delegateopen uri = file:///home/prabhas/Documents/photos/2006/7/11/img_1493.jpg
open uri = file:///home/prabhas/Documents/photos/2006/7/11/img_1493.jpg

  Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
open uri = file:///home/prabhas/Documents/photos/2006/7/11/img_1495.jpg
open uri = file:///home/prabhas/Documents/photos/2006/7/11/img_1495.jpg
System.Exception: An object at this uri file:///home/prabhas/Documents/photos/2006/7/11/img_1470 (Modified).jpg already exists
  at Photo.CreateVersion (System.String name, UInt32 base_version_id, Boolean create, Boolean is_protected) [0x00000] 
  at Photo.CreateVersion (System.String name, UInt32 base_version_id, Boolean create) [0x00000] 
  at FBVExt.FBV.Run (System.Object o, System.EventArgs e) [0x00000] 
  at FSpot.Extensions.CommandMenuItemNode.OnActivated (System.Object o, System.EventArgs e) [0x00000] 
  at (wrapper delegate-invoke) System.MulticastDelegate:invoke_void_object_EventArgs (object,System.EventArgs)
  at GLib.Signal.voidObjectCallback (IntPtr handle, IntPtr gch) [0x00000] 
open uri = file:///home/prabhas/Documents/photos/2006/7/11/img_1496.jpg
open uri = file:///home/prabhas/Documents/photos/2006/7/11/img_1496.jpg

   at GLib.ExceptionManager.RaiseUnhandledException ()
   at GLib.Signal.voidObjectCallback ()
   at GLib.Signal.voidObjectCallback ()
   at Gtk.Application.gtk_main ()
   at Gtk.Application.gtk_main ()
   at Gtk.Application.Run ()
   at Gnome.Program.Run ()
   at FSpot.Driver.Main ()
make: *** [run] Error 1


Other information:
The error comes from incorrect logic in CreateVersions. Patch coming momentarily.
Comment 1 guava 2008-01-08 19:46:16 UTC
Created attachment 102414 [details] [review]
Fixes the bug.

The logic was incorrent before, as far as I can tell. When (create) is not true, the file doesn't need to be allocated, so no exception should be thrown.
Comment 2 Stephane Delcroix 2008-01-09 13:18:54 UTC
fixed in r3534