Page 1 of 1

Vanishing .cache files

Posted: 2016-08-07T14:43:56-07:00
by snibgo
IM v6.9.5-3, pre-built binary, on Windows 8.1.

Some users have reported vanishing .cache files under complex conditions. I have now encountered the problem, and I've reduced it to a simple reproducible example.

Code: Select all

f:\web\im>del test2.miff
f:\web\im>del tc.mpc
f:\web\im>del tc.cache
f:\web\im>c:\im\ImageMagick-6.9.5-3-Q16\convert -size 14000x7000 gradient: tc.mpc

f:\web\im>dir tc.*
 Directory of f:\web\im

07/08/2016  22:30       784,000,000 tc.cache
07/08/2016  22:30               371 tc.mpc
               2 File(s)    784,000,371 bytes
               0 Dir(s)  58,100,236,288 bytes free

f:\web\im>c:\im\ImageMagick-6.9.5-3-Q16\convert tc.mpc test2.miff

f:\web\im>dir tc.*
 Directory of f:\web\im

07/08/2016  22:30               371 tc.mpc
               1 File(s)            371 bytes
               0 Dir(s)  58,296,238,080 bytes free
As the above shows, converting from the MPC image deletes the .cache file. The output from convert, test2.miff, seems okay.
My MPC image is large. The problem doesn't occur with smaller images (eg 10000x5000). I have plenty of free space on this disk, and in %TEMP% (68 GB).

("gradient:" isn't important. The problem also occurs with "xc:".)

Re: Vanishing .cache files

Posted: 2016-08-07T15:35:48-07:00
by magick
Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ http://www.imagemagick.org/download/beta/ by sometime tomorrow.

Re: Vanishing .cache files

Posted: 2016-08-07T15:47:54-07:00
by snibgo
Excellent, thanks.

For the benefit of search engines, I'll mention the error messages I get when I try to read the MPC that has no .cache:

Code: Select all

convert.exe: unable to open pixel cache `tc.mpc': No such file or directory @ error/cache.c/OpenPixelCache/3956.
convert.exe: unable to persist pixel cache `tc.mpc' @ error/mpc.c/ReadMPCImage/944.