-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
None
-
None
from http://bugs.musicbrainz.org/ticket/3900
Apologies if this is actually a couple of bugs. Perhaps the other issues are highlighted elsewhere, but I thought it'd be useful to outline an overall issue and a couple of potential solutions.
In usability of Picard, I believe it's quite plausible for users to end up in a situation where Picard will fail to save the odd file (and maybe create a dupe?) due to timing issues between Scanning and Saving. The scanning/fingerprinting thread appears to lock the file from a Windows (Vista? XP?) perspective, so if a Scan is still ongoing but a user clicks Save (after possibly doing an intermediary Cluster/Lookup) it may fail with an error like
{{{
D: 20:54:17 'Creating fingerprint for file C:\Documents and Settings\Ben\Desktop\Shared Files\Music\Basia Bulat\Basia Bulat - Oh, My Darling\06 - Basia Bulat - Oh, My Darling.mp3...'
D: 20:54:17 Decoding using 'picard.musicdns.avcodec'...
D: 20:54:17 Moving file u'C:
Documents and Settings\\Ben\\Desktop
Shared Files\\Music
Basia Bulat
Basia Bulat - Oh, My Darling
06 - Basia Bulat - Oh, My Darling.mp3' => u'C:
Documents and Settings\\Ben\\Desktop
Shared Files\\Music
Basia Bulat
Basia Bulat - Oh, My Darling
Oh, My Darling (06) Oh, My Darling.mp3'
E: 20:54:17 Traceback (most recent call last):
File "picard\util\thread.pyo", line 80, in generic_run_item
File "picard\file.pyo", line 148, in _save_and_rename
File "picard\file.pyo", line 248, in _rename
File "shutil.pyo", line 200, in move
WindowsError: [Error 13] The process cannot access the file because it is being used by another process: u'C:
Documents and Settings\\Ben\\Desktop
Shared Files\\Music
Basia Bulat
Basia Bulat - Oh, My Darling
06 - Basia Bulat - Oh, My Darling.mp3'
}}}I'm guessing recreation of this may either depend on how fast your filesystem and CPU are (to get things happening at the same time) or on Windows version, as I can't recreate it on my zippy XP system. The user above appeared to have the issue on Vista.
If this is a wider issue than a Vista problem, perhaps there needs to either:
- be some purging of items from the scanning queue when/if you move them to the right hand side?
- or maybe this would be more confusing; and the save/rename/move process should check with the fingerprinting thread for each file prior to saving; and if it is being processed by the PUID thread, wait for scanning to complete before saving? Obviously there are some thread synchronisation issues to address with this solution as well.
This issue was discussed/raised at http://forums.musicbrainz.org/viewtopic.php?pid=5261