Memory Freeing Crash

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
johnpccd

Memory Freeing Crash

Post by johnpccd »

Hi all,
I am using Magick++ to do some image processing in a project.. I have been getting crashes in the destructor of class Image.
I do not manually delete any images.
Here is the full gdb trace:
#0 0xb7f05410 in __kernel_vsyscall ()
#1 0x00babd80 in raise () from /lib/libc.so.6
#2 0x00bad691 in abort () from /lib/libc.so.6
#3 0x00be424b in __libc_message () from /lib/libc.so.6
#4 0x00bea5b6 in malloc_consolidate () from /lib/libc.so.6
#5 0x00bebe2a in _int_free () from /lib/libc.so.6
#6 0x00befbc0 in free () from /lib/libc.so.6
#7 0xb7a63182 in RelinquishMagickMemory (memory=0x0) at magick/memory.c:745
#8 0xb79962fe in DestroyPixelCache (cache=0xad924f80) at magick/cache.c:1544
#9 0xb7998cce in DestroyImagePixelCache (image=0xad9ad500) at magick/cache.c:1472
#10 0xb798f159 in DestroyImagePixels (image=0xad9ad500) at magick/cache.c:1511
#11 0xb7a4e03d in DestroyImage (image=0xad9ad500) at magick/image.c:1280
#12 0xb7a5a929 in DeleteImageFromList (images=0xaec14900) at magick/list.c:298
#13 0xb7a5a96b in DestroyImageList (images=0x0) at magick/list.c:451
#14 0xb7ecc831 in ~ImageRef (this=0xad906150) at Magick++/lib/ImageRef.cpp:70
#15 0xb7ec87ea in ~Image (this=0xaec160a8) at Magick++/lib/Image.cpp:296
#16 0x0805c82f in Play (this=0x823a138, ) at mycode.cpp:3927
#17 0x00cfd49b in start_thread () from /lib/libpthread.so.0
#18 0x00c5442e in clone () from /lib/libc.so.6

Any suggestions will be much appreciated.
johnpccd

Re: Memory Freeing Crash

Post by johnpccd »

Sorry, forgot to post the error msg
*** glibc detected *** /root/project-backups/project1/project1/dist/Debug/GNU-Linux-x86/project1: corrupted double-linked list: 0xad9b3590 ***
Program received signal SIGABRT, Aborted.


I sometimes get double free or corruption.
johnpccd

Re: Memory Freeing Crash

Post by johnpccd »

Sorry forgot to say I'm using ImageMagick 6.6.0-9
Post Reply