Cause: ImageMagick uses librsvg which initializes gnome libs, whose in turn install atexit handler. But since librsvg gets unloaded after use, program then crashes due to exit handler trying to access an unloaded code.
Consequence: segfault occurs after succesful conversion during exit code
Fix: __attribute__((destructor)) has been used instead of atexit()
Result: ImageMagick tools no longer crash on exit