IM hangs trying to open always the same temporary file (2)

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
dinotoa

IM hangs trying to open always the same temporary file (2)

Post by dinotoa »

Sorry, the previous post was incomplete.

While using IM 6.3.8 for tiling and resizing very large TIFFs, I found a nasty bug which appears consistently in one of the three platforms I tested the library.

It apparently has to do with AcquireUniqueFileResource and is caused by GetRandomKey() consistently returning a key made by all zeroes.

The code for the random key generation is quite complex and therefore I couldn't figure out where exactly the problem is.
By the way, until this file is present in the temporary directory of the machine, every operation requiring the cache hangs waiting forever for this file to disappear.

I think it would be very useful if the core traced the file it is trying to open at a level different from trace, perhaps at the resource (-debug Resource) level, although I'm confident there are simpler ways for generating a temporary file name (just kidding).

I'll be glad to help you fixing the bug, can you suggest some test I could run?
The platform I'm running on is:

Double pentium 4 dual core w/2 gigabytes of ram
Windows XP with latest service packs and patches
Visual Studio 2005 installed
Binary distribution http://www.imagemagick.org/download/bin ... ws-dll.exe

Antonio
Post Reply