MagickGetImageBlob Issue
Posted: 2011-07-28T11:55:13-07:00
I realize that this is slightly out of scope, but I'm at a loss and would really appreciate some pointers on where to look next.
I'm getting sporadic segmentation faults calling MagickGetImageBlob on the same wand intermittently over time.
The lifecycle of the wand is basically:
1) wand = NewMagickWand()
2) MagickReadImage(wand, "/Users/roxton/image.tif")
3) MagickSetImageFormat(wand, "PNG")
4) image = MagickGetImageBlob(wand, &length)
5) MagickRelinquishMemory(image)
6) Repeat 3-5 at various intervals from different threads, never simultaneously.
7) Eventually segfault on step #4.
Here's the wrinkle. I'm doing this from Java using SWIG. The "OK, doctor, but how would you diagnose this problem if I /weren't/ obese" ethos applies, but I certainly wouldn't snub a SWIG/JNI-oriented suggestion.
The typical error message, FWIW, is:
Invalid memory access of location 0x20 rip=0x11755b550
ImageMagick 6.7.1-0 2011-07-24 Q16
I'm getting sporadic segmentation faults calling MagickGetImageBlob on the same wand intermittently over time.
The lifecycle of the wand is basically:
1) wand = NewMagickWand()
2) MagickReadImage(wand, "/Users/roxton/image.tif")
3) MagickSetImageFormat(wand, "PNG")
4) image = MagickGetImageBlob(wand, &length)
5) MagickRelinquishMemory(image)
6) Repeat 3-5 at various intervals from different threads, never simultaneously.
7) Eventually segfault on step #4.
Here's the wrinkle. I'm doing this from Java using SWIG. The "OK, doctor, but how would you diagnose this problem if I /weren't/ obese" ethos applies, but I certainly wouldn't snub a SWIG/JNI-oriented suggestion.
The typical error message, FWIW, is:
Invalid memory access of location 0x20 rip=0x11755b550
ImageMagick 6.7.1-0 2011-07-24 Q16