app crashes if delegate.xml file not present

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
graemeNPS
Posts: 64
Joined: 2009-01-12T14:25:55-07:00

app crashes if delegate.xml file not present

Post by graemeNPS »

We use imagemagick to extract a jpg preview and jpg thumbnail from a wide variety of image file types, using a standard convert command to perform the initial extraction from (eg) a PSD file to a jpg preview, and then a resize on the jpg to get a thumbnail. We have a dll that statically links IM code based on
ImageMagick-6.5.5 built thus:MAGICKCORE_QUANTUM_DEPTH 8
as it was faster for most of the files we use.

We advise users to install all the xml files mentioned in http://www.imagemagick.org/script/resources.php in our application's directory. We have noticed that failing to do so can crash our app when we use the ImageMagick components; on my test machine (windows 7), I have narrowed the crash down to the absence of delegates.xml.

One of our developers tracked it down in the debugger thus:
"This is a stack overflow caused internally by the ImageMagick Library.
The library is attempting to log an error that the config files cannot be found, but the logging function also looks for the config files, generating another error of the same type. There is a stack overflow after several thousand iterations.
There is no opportunity for (Our application)the Viewer to catch this error."

We are wondering if there is a solution for this problem.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: app crashes if delegate.xml file not present

Post by magick »

We're removed delegates.xml from the ImageMagick 6.5.9-3 release and we received an exception as expected and no crash. The solution to your problem may be to upgrade.
Post Reply