Seg faults in 64-bit AIX 6.1
Posted: 2014-03-26T13:14:43-07:00
I've been stuck on this for a while now, and could really use some help. I'm in the process of converting some old C++ code to 64-bit on AIX 6.1, and have downloaded and built ImageMagick ver 6.8.7 for this project. (created both 32 and 64 bit libs) The code is pretty simple in it's use of ImageMagick, the images are scanned documents in TIFF format, and the program needs to make a JPEG thumbnail view of the image. It loads the image from a Blob, creates a "Image" object using it, tries to set the image format to Jpeg and reduces the size, and then writes it out to another Blob. (the Blobs are eventually pushed into a database table, but that's not relevant here)
The problem I'm having is that I can compile and link the code, create the Blob, create the Image object from the Blob, and then I get a segmentation fault when I attempt to set the Image to JPEG. ( Image.magick("JPEG") ) it's not specific to JPEG either, it happens with any image format I try to set. I'm able to read the attributes of the Image object, but a format change or even a call to write to a file causes the seg fault.
The exact message is:
Segmentation fault in . at 0x7c0802a6f800 ($t1)
0x7c0802a6f800 (???) Unreadable instruction at address 0x7c0802a6f800
The 32-bit version of this code is working fine with an older version of ImageMagick, and the images I'm using are valid. I did attempt to do the TIFF to JPEG conversion with the "convert" tool, and it works just fine. I could try to post some code snippets, but I'm not doing anything different than the ImageMagick sample code does. One minor difference is that it's using the old deprecated auto_ptr to create the Magick::Image objects, but it was doing that in the 32-bit version too.
The machine I'm on has plenty of memory for this operation, the doc image is only about 88k as a TIFF, 1.6mb as a Jpeg, and I've tried upping the ulimits with no change in behavior.
Any clues as to what my problem might be, or at least something else I can look at to try to diagnose this? One thing that comes to mind, is if I need the "coders" for the api to work properly? I'm not sure how to get them, they exist in the build directory, but they aren't getting copied when I do a make install.
Thanks in advance,
--Mike
The problem I'm having is that I can compile and link the code, create the Blob, create the Image object from the Blob, and then I get a segmentation fault when I attempt to set the Image to JPEG. ( Image.magick("JPEG") ) it's not specific to JPEG either, it happens with any image format I try to set. I'm able to read the attributes of the Image object, but a format change or even a call to write to a file causes the seg fault.
The exact message is:
Segmentation fault in . at 0x7c0802a6f800 ($t1)
0x7c0802a6f800 (???) Unreadable instruction at address 0x7c0802a6f800
The 32-bit version of this code is working fine with an older version of ImageMagick, and the images I'm using are valid. I did attempt to do the TIFF to JPEG conversion with the "convert" tool, and it works just fine. I could try to post some code snippets, but I'm not doing anything different than the ImageMagick sample code does. One minor difference is that it's using the old deprecated auto_ptr to create the Magick::Image objects, but it was doing that in the 32-bit version too.
The machine I'm on has plenty of memory for this operation, the doc image is only about 88k as a TIFF, 1.6mb as a Jpeg, and I've tried upping the ulimits with no change in behavior.
Any clues as to what my problem might be, or at least something else I can look at to try to diagnose this? One thing that comes to mind, is if I need the "coders" for the api to work properly? I'm not sure how to get them, they exist in the build directory, but they aren't getting copied when I do a make install.
Thanks in advance,
--Mike