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 637283 - Crash on clicking on photo which actually does not exist
Crash on clicking on photo which actually does not exist
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: Browsing
GIT
Other Linux
: Normal critical
: 0.8.1
Assigned To: F-spot maintainers
F-spot maintainers
Depends on:
Blocks:
 
 
Reported: 2010-12-15 05:55 UTC by Paul Wellner Bou
Modified: 2010-12-19 12:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't crash if clicking on photo which' file does not exist (981 bytes, patch)
2010-12-15 19:57 UTC, Paul Wellner Bou
none Details | Review
Add log message telling that file does not exist. (1.08 KB, patch)
2010-12-15 20:13 UTC, Paul Wellner Bou
none Details | Review
Don't crash if clicking on photo which' file does not exist (1.06 KB, patch)
2010-12-15 20:18 UTC, Paul Wellner Bou
reviewed Details | Review
Don't crash if querying file info throws an Exception (1.18 KB, patch)
2010-12-15 21:50 UTC, Paul Wellner Bou
none Details | Review
Don't crash in InfoBox if querying file info throws an Exception and/or metadata is null (2.39 KB, patch)
2010-12-16 08:18 UTC, Paul Wellner Bou
none Details | Review
Don't crash in InfoBox if querying file info throws an Exception and/or metadata is null (2.44 KB, patch)
2010-12-16 08:49 UTC, Paul Wellner Bou
committed Details | Review

Description Paul Wellner Bou 2010-12-15 05:55:07 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.
Comment 1 Paul Wellner Bou 2010-12-15 19:57:53 UTC
Created attachment 176494 [details] [review]
Don't crash if clicking on photo which' file does not exist
Comment 2 Paul Wellner Bou 2010-12-15 19:58:29 UTC
See screenshot attached here https://bugzilla.gnome.org/show_bug.cgi?id=636694#c8 to see how this will look like.
Comment 3 Tim Howard 2010-12-15 20:05:49 UTC
Review of attachment 176494 [details] [review]:

I would like to see a log statement stating the fact that the file was not found.
Comment 4 Paul Wellner Bou 2010-12-15 20:13:04 UTC
Created attachment 176496 [details] [review]
Add log message telling that file does not exist.
Comment 5 Paul Wellner Bou 2010-12-15 20:18:24 UTC
Created attachment 176498 [details] [review]
Don't crash if clicking on photo which' file does not exist
Comment 6 Tim Howard 2010-12-15 20:24:07 UTC
Review of attachment 176498 [details] [review]:

Looks good to me. Ruben?
Comment 7 Paul Wellner Bou 2010-12-15 21:50:40 UTC
Created attachment 176505 [details] [review]
Don't crash if querying file info throws an Exception
Comment 8 Paul Wellner Bou 2010-12-15 22:05:23 UTC
Sorry, the last patch isn't working because of the implicitely typed var. Will submit a working one tomorrow.
Comment 9 Paul Wellner Bou 2010-12-16 08:18:11 UTC
Created attachment 176519 [details] [review]
Don't crash in InfoBox if querying file info throws an Exception and/or metadata is null
Comment 10 Paul Wellner Bou 2010-12-16 08:49:45 UTC
Created attachment 176520 [details] [review]
Don't crash in InfoBox if querying file info throws an Exception and/or metadata is null
Comment 11 Paul Wellner Bou 2010-12-16 08:50:43 UTC
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.
Comment 12 Tim Howard 2010-12-18 22:54:18 UTC
Review of attachment 176520 [details] [review]:

Looks good to me, hopefully we can get it into 0.8.1.
Comment 13 Ruben Vermeersch 2010-12-19 12:16:17 UTC
Attachment 176520 [details] pushed as 8762fbe - Don't crash in InfoBox if querying file info throws an Exception and/or metadata is null
Comment 14 Ruben Vermeersch 2010-12-19 12:16:53 UTC
Great reviewing action going on here, good work guys!
Comment 15 Ruben Vermeersch 2010-12-19 12:19:08 UTC
Merged to master. The infobox changes have not been merged to stable-0.8, as it does not contain the changed infobox yet.