Page 1 of 1

Segfault convert'ing PDF => * (IM 6.5.5-6 / OSX 10.6)

Posted: 2009-09-08T22:56:22-07:00
by rubysolo
Hello--

I'm experiencing fairly consistent segmentation faults using the convert utility from ImageMagick 6.5.5-6 on OSX 10.6 (Snow Leopard) when reading from a PDF and writing to different output formats (have tried JPG, PNG, and GIF). I had it work successfully one time, but could not reproduce this.

Here's what gdb reports:

Code: Select all

$ gdb convert
... { several warnings about missing debug info }...
(gdb) run test.pdf test.gif
Starting program: /usr/local/bin/convert test.pdf test.gif
Reading symbols for shared libraries .++++++++++++++.. done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000020
[Switching to process 41250]
0x0000000100170f10 in omp_get_thread_num ()
(gdb) where
#0  0x0000000100170f10 in omp_get_thread_num ()
#1  0x00000001000f4b51 in GetOpenMPThreadId [inlined] () at /usr/local/src/ImageMagick-6.5.5-6/magick/thread-private.h:418
#2  0x00000001000f4b51 in GetQuantumPixels (quantum_info=0x100811310) at magick/quantum.c:418
#3  0x0000000100742d72 in ReadPNMImage.omp_fn.2 (.omp_data_i=0x7fff5fbeaf50) at coders/pnm.c:832
#4  0x00000001007450c6 in gomp_thread_start ()
#5  0x00007fff812af06e in _pthread_start ()
#6  0x00007fff812aef21 in thread_start ()
(gdb) 
Any tips?

TIA,

Solomon

Re: Segfault convert'ing PDF => * (IM 6.5.5-6 / OSX 10.6)

Posted: 2009-09-09T05:34:06-07:00
by magick
We have identified a bug in libgomp under Mac OS X. We selectively turned off OpenMP for the PNM coder in the latest ImageMagick release 6.5.5-8. Otherwise you can turn off OpenMP in your release of ImageMagick with the --disable-openmp option for the configure script to fix the problem (but of course you lose the multi-core speed-ups).