Hey all,
I'm writing a gphoto2 interface object for PD.
For some reason I get segfaults when running functions in my external, the backtrace shows these are related to libimageMagick.
If I don't load Gem my code works as expected.
I've attached the code.
The openCam() causes the problem.
Does anyone see anything in there that would conflict with imageMagick?
Thanks, B. Bogart
B. Bogart wrote:
Hey all,
I'm writing a gphoto2 interface object for PD.
For some reason I get segfaults when running functions in my external, the backtrace shows these are related to libimageMagick.
If I don't load Gem my code works as expected.
I've attached the code.
The openCam() causes the problem.
Does anyone see anything in there that would conflict with imageMagick?
seems to be a bug in one of the 2 libraries, unrelated to Gem, as can be demonstrated by a simple program: <code> #include <gphoto2/gphoto2-camera.h> int main(int argc, char**argv) { Camera *camera=NULL; gp_camera_new (&camera); gp_camera_init (camera, NULL); gp_camera_unref (camera); return 0; } </code>
compiling the above code against libgphoto2 % cc test.c -o test -I/usr/include/gphoto2 -I/usr/include/libexif -lc -lm -lgphoto2 -lgphoto2_port -lexif -lm -lusb will work like a charm.
however, linking it (additionally) to ImageMagick++ % cc test.c -o test -I/usr/include/gphoto2 -I/usr/include/libexif -lc -lm -lMagick++ -lWand -lMagick -lgphoto2 -lgphoto2_port -lexif -lm -lusb will segfault when calling gp_camera_init()
without debugging versions of ImageMagick++ and libgphoto2 there is little chance to detect the problem.
fmgasdr IOhannes