Vanishing .cache files

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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Vanishing .cache files

Post 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:".)
snibgo's IM pages: im.snibgo.com
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Vanishing .cache files

Post 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.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Vanishing .cache files

Post 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.
snibgo's IM pages: im.snibgo.com
Post Reply