GNOME Bugzilla – Bug 158060
F-Spot freezes if permission denied
Last modified: 2005-08-16 16:52:57 UTC
1. Import a file which is on a non-writable drive (in my case, a NTFS drive) 2. Assign a tag to the files 3. Quit F-Spot 4. Load F-Spot and watch console The output I get is: Unhandled Exception: System.UnauthorizedAccessException: Access to the path "/windows/C/Documents and Settings/kbreit/My Documents/My Pictures/Stuff/DCP_7180.JPG" is denied. in [0x001ea] (at /cvs/1-mono/mcs/class/corlib/System.IO/FileStream.cs:180) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,bool) in [0x00018] (at /cvs/1-mono/mcs/class/corlib/System.IO/FileStream.cs:103) System.IO.FileStream:.ctor (string,System.IO.FileMode) in <0x00065> (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode) in [0x00032] (at /tmp/bb-daemon.33122/beagle-snaps/f-spot/BUILD/f-spot-0.0.2/src/AsyncPixbufLoader.cs:29) FSpot.AsyncPixbufLoader:Load (string) in [0x00042] (at /tmp/bb-daemon.33122/beagle-snaps/f-spot/BUILD/f-spot-0.0.2/src/PhotoView.cs:154) PhotoView:UpdateImageView () in [0x00018] (at /tmp/bb-daemon.33122/beagle-snaps/f-spot/BUILD/f-spot-0.0.2/src/PhotoView.cs:250) PhotoView:Update () in [0x0003d] (at /tmp/bb-daemon.33122/beagle-snaps/f-spot/BUILD/f-spot-0.0.2/src/PhotoView.cs:47) PhotoView:set_Query (PhotoQuery) in [0x00009] (at /tmp/bb-daemon.33122/beagle-snaps/f-spot/BUILD/f-spot-0.0.2/src/PhotoView.cs:540) PhotoView:.ctor (PhotoQuery,PhotoStore) in [0x0033c] (at /tmp/bb-daemon.33122/beagle-snaps/f-spot/BUILD/f-spot-0.0.2/src/MainWindow.cs:194) MainWindow:.ctor (Db) in [0x00080] (at /tmp/bb-daemon.33122/beagle-snaps/f-spot/BUILD/f-spot-0.0.2/src/main.cs:30) Driver:Main (string[])
Created attachment 33891 [details] [review] My most advanced patch yet...
To be fair, that only addresses the first of many issues with read only pics. f-spot should handle failed attempts to transform such images more gracefully. Unfortunately, to get it right, it involves delving into the suckage of libjpegtrans' error reporting.
see also 129381
ok I committed this much of the fix, long term we definitely needs to come up with a better solution.
I'm closing this now there is a better bug for the ro handling now now.