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.
ReadImage fails on Windows with ImageMagick 6.9.10 and GhostScript 9.06 if multiple threads execute these operation using dedicated ImageInfo instances.
Ghostscript 9.06 is ancient. Try upgrading to the current version which I think is 9.23. I have heard that 9.22 may also have problems. So be sure to get at least 9.23.
Thanks for the reply. ReadImage fails so my assumption is that the output format does not matter for the issue.
The EPS I used: https://people.sc.fsu.edu/~jburkardt/da ... circle.eps
Actually, I tried multiple files and always had the problem.
I found the following ImageMagick changelog entry:
2015-11-24 6.9.2-7 Dirk Lemstra <dirk@lem.....org>
* The DICOM reader now handles the rescale intercept and slope.
* Added 'bmp3:alpha' option for including the alpha channel when writing
an image in the BMP3 format. (reference viewtopic.php?f=1&t=28733).
* Only one thread permitted when delegating to the Ghostscript library
under Windows.
I'm not sure if a lock was introduced with that change. Maybe the lock was removed again in a later version.
I can tell you that on my INTEL Mac Mini OSX Sierra with 2 cores, I can convert your file fine using ImageMagick 6.9.10.8 Q16 with OpenMP enabled and libjpeg 90.
Thanks. However, I don't think that this can be reproduced using convert alone because it does not execute multiple conversions concurrently - in a single process. My understanding is that the thread limit of convert is a limit for a single conversion. That's why I provided the testcase.
Any news on this issue? We worked around this by adding a lock in case of Windows. On Windows, ImageMagick loads the GhostScript DLL and uses GhostSCript in-process - the DLL must not be used concurrently. On Linux, ImageMagick uses GhostScript out-of-process, so the issue cannot occur.
Looks like Ghostscript 9.06 is not thread safe. We're using ImageMagick 9.25 and 9.26 and your program completes as expected without complaint. We tried 1 to 30 threads.