In a threaded context, CoreConverter occassionally fails to close the file handle of the converted file such that delete operations (as in move operations) on the converted file fail with a "Permission Denied" error after CoreConverter has itself completed. I am using reference release 12.3 on a windows media player lossless to mp3 (-V 2) conversion.
To verify this, I ran a batch of conversions, and used process explorer to search for a part of one of the files' name in the handles search, and it returned an inactive CoreConverter process as the sole user of the file handle for the file name. Attempts to delete the file failed. Around 10 seconds after the CoreConverter process exits, the file may always be deleted, and searches for the file name in the handles search produces no result. In the majority of the cases, the file handle closes properly, and the file may be deleted immediately with no errors.
This causes me some trouble since I can't reliably move the file under these conditions. Is it possible that the handle is not being flushed prior to close the handle and exiting from CoreConverter? If some form of IO::Handle is being used, a call to flush might help? Perhaps some other idea?
To verify this, I ran a batch of conversions, and used process explorer to search for a part of one of the files' name in the handles search, and it returned an inactive CoreConverter process as the sole user of the file handle for the file name. Attempts to delete the file failed. Around 10 seconds after the CoreConverter process exits, the file may always be deleted, and searches for the file name in the handles search produces no result. In the majority of the cases, the file handle closes properly, and the file may be deleted immediately with no errors.
This causes me some trouble since I can't reliably move the file under these conditions. Is it possible that the handle is not being flushed prior to close the handle and exiting from CoreConverter? If some form of IO::Handle is being used, a call to flush might help? Perhaps some other idea?
Comment