I am using ImageMagick-6.6.3-Q16 in my application that I am building in Visual Studio 2010 on Windows 7 64 bitand it is crashing in runtime with this error:
Unhandled exception at 0x76cab727 in PICamera.exe: Microsoft C++ exception: Magick::ErrorMissingDelegate at memory location 0x0018bea0..
when I get to any write or read function in the code such as this:
Code: Select all
image1.write(location+"\\"+timestamp+"-00.tiff");
It's giving this error in both Debug and Release. None of the other forums have really helped answer this. It's a similar problem to the one that this guy had http://www.imagemagick.org/discourse-se ... =6&t=13970 except that mine doesn't work in debug at all. I tried building from source but for some reason had trouble linking to those files. Any suggestions are greatly appreciated.
ErrorMissingDelegate
Re: ErrorMissingDelegate
A missing delegate exception generally means your program does not support the image format. Try saving the image to PNM rather than TIFF. Does that work? If so, your version of ImageMagick may not include support for TIFF. Make sure you generate the Release build for ImageMagick rather than Debug. If that fails, try a Magick++ demo @ c:\Program Files\ImageMagick-6.7.0-Q16\Magic++_demos. Click on the button workspace, build and run. Does that complete without complaint?
Re: ErrorMissingDelegate
Using PNM, PNG, JPEG or any other format does not work.
The button demo builds and runs, but when I build it again with the line
uncommented, the program crashes when it runs. When I debug, it gives a reading error:
Unhandled exception at 0x006bddd8 in button.exe: 0xC0000005: Access violation reading location 0x00003032.
Since the code is encapsulated in a try / catch, it looks a lot like write() is throwing an exception again while trying to allocate memory for the image...
Also, not sure how relevant this is, but the current version I am using is ImageMagick-6.6.3-Q16, which I installed from the binary. I also have 6.7.0 built from source. Should I try using 6.7.0 or rebuild it and make sure I build in Release? Or should the binary installed version work fine?
The button demo builds and runs, but when I build it again with the line
Code: Select all
button.display();
Unhandled exception at 0x006bddd8 in button.exe: 0xC0000005: Access violation reading location 0x00003032.
Since the code is encapsulated in a try / catch, it looks a lot like write() is throwing an exception again while trying to allocate memory for the image...
Also, not sure how relevant this is, but the current version I am using is ImageMagick-6.6.3-Q16, which I installed from the binary. I also have 6.7.0 built from source. Should I try using 6.7.0 or rebuild it and make sure I build in Release? Or should the binary installed version work fine?
Re: ErrorMissingDelegate
So it turns out that having two different versions of ImageMagick (source and binary) isn't a very good idea... Uninstalling the binary-built versions solved my problem.