Page 1 of 1

odd issue with MagickWriteImage (error/exception 435)

Posted: 2011-08-28T04:55:06-07:00
by mskuma
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.

Re: odd issue with MagickWriteImage (error/exception 435)

Posted: 2011-08-28T05:30:49-07:00
by magick
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?

Re: odd issue with MagickWriteImage (error/exception 435)

Posted: 2011-08-28T16:07:26-07:00
by mskuma
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.