read_info crashes if the file doesn't exist
Reported by Virgil Dupras | January 20th, 2010 @ 10:00 AM
Application Identifier: com.hardcoded_software.dupeguru
Application Version: 2.9.0
Traceback (most recent call last):
File "hsutil/cocoa.pyc", line 47, in _async_run
File "dupeguru/app.pyc", line 87, in _do_load
File "dupeguru/fs.pyc", line 122, in _read_all_info
File "dupeguru/fs.pyc", line 87, in _read_info
File "hsutil/io.pyc", line 80, in stat
OSError: [Errno 2] No such file or directory: '/Users/jtaylo20/Pictures/1 iPhone_Portrait (original).png'
Comments and changes to this ticket
-
Virgil Dupras April 3rd, 2010 @ 01:57 PM
- Tag changed from feature to bug
-
Virgil Dupras April 7th, 2010 @ 09:48 AM
- State changed from new to accepted
- Assigned user set to Virgil Dupras
This crash is pretty hard to reproduce. I've tried starting a scan and then deleting some files from under the nose of dupeGuru before it could read its metadata, but it didn't crash (I think it checks that the file exists before reading metadata). I guess that with the right timing, it would be possible, so it can't hurt to wrap the info reading method around a try..except.
-
Virgil Dupras April 7th, 2010 @ 10:02 AM
Ooh, stupid, the crash is during result loading. Yeah, if you're fast enough and remove a file in the middle of metadata reading, you get that crash.
The thing is, a proper fix of this bug would mean to remove problematic files individually, and it would cause problem if the file is a group's ref file because there's no easy way to remove such a file in
Results
methods.So, since it's a rare bug, what I'll do is simply to clear out the results when such thing happens.
-
Virgil Dupras April 7th, 2010 @ 10:29 AM
- State changed from accepted to fixed
(from [7a1418e6528f]) [#90 state:fixed] Fixed a rare crash on results loading. http://bitbucket.org/hsoft/dupeguru/changeset/7a1418e6528f/
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
People watching this ticket
Tags
Referenced by
- 90 read_info crashes if the file doesn't exist (from [7a1418e6528f]) [#90 state:fixed] Fixed a rare cras...