GNOME Bugzilla – Bug 637283
Crash on clicking on photo which actually does not exist
Last modified: 2010-12-19 12:19:08 UTC
[4 Debug 06:38:09.434] Invalid thumbnail, reloading: file:///home/paul/Photos/2010/09/22/CSC_6942.JPG [4 Debug 06:38:09.435] Failed loading image for thumbnailing: file:///home/paul/Photos/2010/09/22/CSC_6942.JPG [4 Warn 06:38:09.441] Caught an exception - System.Exception: Unsupported image: file:///home/paul/Photos/2010/09/22/CSC_6942.JPG (in `f-spot') at FSpot.Imaging.ImageFile.Create (Hyena.SafeUri uri) [0x0004c] in /home/paul/src/f-spot/src/Clients/MainApp/FSpot.Imaging/ImageFile.cs:171 at FSpot.Driver.<Main>m__5F (Hyena.SafeUri uri) [0x00000] in /home/paul/src/f-spot/src/Clients/MainApp/FSpot/main.cs:181 at FSpot.Utils.XdgThumbnailSpec.CreateFrom (Hyena.SafeUri uri, Hyena.SafeUri thumb_uri, ThumbnailSize size, FSpot.Utils.PixbufLoader loader) [0x00016] in /home/paul/src/f-spot/src/Core/FSpot.Utils/FSpot.Utils/XdgThumbnailSpec.cs:97 [1 Debug 06:39:13.779] open uri = file:///home/paul/Photos/2010/09/22/DSC_6835.JPG Exception in Gtk# callback delegate Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception. GLib.GException: Error stating file '/home/paul/Photos/2010/09/22/CSC_6942.JPG': No such file or directory at GLib.FileAdapter.QueryInfo (System.String attributes, FileQueryInfoFlags flags, GLib.Cancellable cancellable) [0x00000] in <filename unknown>:0 at FSpot.Utils.Metadata.Parse (Hyena.SafeUri uri) [0x0000c] in /home/paul/src/f-spot/src/Core/FSpot.Utils/FSpot.Utils/Metadata.cs:43 at FSpot.Widgets.InfoBox.Update () [0x0004c] in /home/paul/src/f-spot/src/Clients/MainApp/FSpot.Widgets/InfoBox.cs:507 at FSpot.Utils.DelayedOperation.HandleOperation () [0x0000d] in /home/paul/src/f-spot/src/Core/FSpot.Utils/FSpot.Utils/DelayedOperation.cs:57 at GLib.Idle+IdleProxy.Handler () [0x00000] in <filename unknown>:0 at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal) at GLib.Idle+IdleProxy.Handler() at Gtk.Application.gtk_main() at Gtk.Application.Run() at FSpot.Driver.Startup() in /home/paul/src/f-spot/src/Clients/MainApp/FSpot/main.cs:line 390 at Hyena.Gui.CleanRoomStartup.Startup(Hyena.Gui.StartupInvocationHandler startup) in /home/paul/src/f-spot/lib/Hyena/Hyena.Gui/Hyena.Gui/CleanRoomStartup.cs:line 54 at FSpot.Driver.Main(System.String[] args) in /home/paul/src/f-spot/src/Clients/MainApp/FSpot/main.cs:line 308 I would expect to be able to remove this from the catalog out of F-Spot without having to go manually into the SQLite database. As far as I remember this works, if the thumbnail is already created, but I'd have to check. The reason is, again, in InfoBox.cs, but is not fixed by the the patch submitted for bug #636694.
Created attachment 176494 [details] [review] Don't crash if clicking on photo which' file does not exist
See screenshot attached here https://bugzilla.gnome.org/show_bug.cgi?id=636694#c8 to see how this will look like.
Review of attachment 176494 [details] [review]: I would like to see a log statement stating the fact that the file was not found.
Created attachment 176496 [details] [review] Add log message telling that file does not exist.
Created attachment 176498 [details] [review] Don't crash if clicking on photo which' file does not exist
Review of attachment 176498 [details] [review]: Looks good to me. Ruben?
Created attachment 176505 [details] [review] Don't crash if querying file info throws an Exception
Sorry, the last patch isn't working because of the implicitely typed var. Will submit a working one tomorrow.
Created attachment 176519 [details] [review] Don't crash in InfoBox if querying file info throws an Exception and/or metadata is null
Created attachment 176520 [details] [review] Don't crash in InfoBox if querying file info throws an Exception and/or metadata is null
Now, finally. This patch includes the fixing patch for bug https://bugzilla.gnome.org/show_bug.cgi?id=636694#c8 as it is required to fix this bug as well.
Review of attachment 176520 [details] [review]: Looks good to me, hopefully we can get it into 0.8.1.
Attachment 176520 [details] pushed as 8762fbe - Don't crash in InfoBox if querying file info throws an Exception and/or metadata is null
Great reviewing action going on here, good work guys!
Merged to master. The infobox changes have not been merged to stable-0.8, as it does not contain the changed infobox yet.