Hello
I'm calling MagickWand functions in the DLL (ImageMagick-6.7.2-Q8) from a Basic compiler (Windows OS), and calling MagickWriteImage (my program is threaded). Generally (about 95%+ of the time) the image is written to the disk with no error (I capture the return value of the function & determine any exception/error string). Sometimes I get a fail return value with severity of 435 and exception details of 'unable to open image <filename>: Invalid argument @ error/blob.c/OpenBlob/2588'. However I see the actual image seems to be written ok on the disc. This seems odd to me - can anyone suggest something to me? I notice there seems to be some environment variables relating to max threads or CPU throttling etc - should I try these?
Thanks.
odd issue with MagickWriteImage (error/exception 435)
Re: odd issue with MagickWriteImage (error/exception 435)
MagickWriteImage() is single threaded and unaffected by max threads and CPU throttling. The exception you received is most likely from the Windows system call _wfopen(). Does it always fail on the same filename? If so, what is it? Does your problem work properly if it is single threaded? What about 2 threads verses 4 threads?
Without additional information it is difficult to determine the source of the problem. Can you post a minimal code set we could use to reproduce the problem?
Without additional information it is difficult to determine the source of the problem. Can you post a minimal code set we could use to reproduce the problem?
Re: odd issue with MagickWriteImage (error/exception 435)
Thanks for your reply. I'm composing various images prior to saving these, so it doesn't always fail on the same image. I think you're right - I should try adjusting the number of threads or no threads & see if this problem reoccurs.