Qt World Summit: Register Today!

Unhandled Exceptions with Magick++

  • I have a project that does some image manipulations using ImageMagick's Magick++ libraries. It works flawlessly under Linux. But when I port it to Windows, it crashes. Stepping through the execution, everything works fine until the first time I call to a Magick++ method. That's when the program crashes, and C Runtime Library gives me an unhandled exception.

    I thought maybe there was some name mangling with the binary distribution libs, so I tried installing from source. I compiled with the same compiler (Visual C++ 2017) that I use to compile my application. The standalone executables (compiled at the same time) that do the same things (e.g., convert and montage) work fine. Any ideas what I'm doing wrong with the libraries?

  • Lifetime Qt Champion

    @scrand Is there more information about this unhandled exception?

  • On my debug build, when I try to use the overloaded Magick::Image(std::string) assignment operator to load the image from a filename, I get "The inferior stopped because it triggered an exception. Stopped in thread 0 by: Exception at [address], code: 0x06d7363: C++ exception, flags = 0x1 (execution cannot be continued).

    But I guess resolved now? I just somehow got a non-debug build to work, even though it used to crash. I'm not even sure if it's using the binary or the source distribution (I have both on my system). But it works. The debug build still crashes, but I don't need to debug any of my usage of ImageMagick, so I guess I'll take what I can get. Thanks!

Log in to reply