Exception when clearing up temporary images in PivotImage


Randomly I get the following error when the PivotImage destructor tries to delete the temporary image when using a remote image

"The process cannot access the file 'C:\Users\Alex\AppData\Local\Temp\tmpBD8.tmp' because it is being used by another process."

The Call Stack when this error occurs is as follows:
mscorlib.dll!System.IO.__Error.WinIOError(int errorCode, string maybeFullPath) + 0x3d0 bytes    
mscorlib.dll!System.IO.File.Delete(string path) + 0xaa bytes    
PauthorLib.dll!Microsoft.LiveLabs.Pauthor.Core.PivotImage.Finalize() + 0x99 bytes   
This unhandled exception then causes the program to crash.


s1mm0t wrote Aug 25, 2010 at 3:45 PM

The problem is caused by a bug that has been reintroduced into the latest version of the Deep Zoom Tools. You can find more information in my reply to the thread at http://getsatisfaction.com/livelabs/topics/imagecreator_create_does_not_release_file. As mentioned in that reply, I have got round the problem by using an older version of the Deep Zoom Tools that ships with Deep Zoom Composer (Note that this dll isn't strong named and therefore I had to uncheck the "sign the assembly" checkbox when recompiling pauthor).