GNOME Bugzilla – Bug 508124
While trying to create new version without creating a file, Crash because of bug in CreateVersions
Last modified: 2008-01-09 13:18:54 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.
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.
fixed in r3534