Page 1 of 1

draw text to a jpeg file:Segmentation fault

Posted: 2009-05-14T01:49:36-07:00
by elvila
Hi

when i execute "convert -draw 'text 50,50 "hello"' watermark.jpg dst.jpg",it gave:Segmentation fault and no other information.

here is my config.log:

Host system type: arm-unknown-linux-gnu
Build system type: i686-pc-linux-gnu

Option Value
-------------------------------------------------------------------------------
Shared libraries --enable-shared=yes yes
Static libraries --enable-static=yes yes
Module support --with-modules=yes yes
GNU ld --with-gnu-ld=yes yes
Quantum depth --with-quantum-depth=16 16
High Dynamic Range Imagery
--enable-hdri=no no

Delegate Configuration:
BZLIB --with-bzlib=yes no
Autotrace --with-autotrace=no no
DJVU --with-djvu=no no
DPS --with-dps=yes no
FlashPIX --with-fpx=no no
FontConfig --with-fontconfig=yes yes
FreeType --with-freetype=yes yes
GhostPCL None pcl6 (unknown)
GhostXPS None gxps (unknown)
Ghostscript None gs (8.60)
Ghostscript fonts --with-gs-font-dir=default /usr/share/fonts/default/Type1/
Ghostscript lib --with-gslib=no no
Graphviz --with-gvc=no
JBIG --with-jbig=yes no
JPEG v1 --with-jpeg=yes yes
JPEG-2000 --with-jp2=yes no
LCMS --with-lcms=no no
LQR --with-lqr=no no
Magick++ --with-magick-plus-plus=no no
OpenEXR --with-openexr=no no
PERL --with-perl=no no
PNG --with-png=yes yes
RSVG --with-rsvg=no no
TIFF --with-tiff=no no
Windows fonts --with-windows-font-dir= none
WMF --with-wmf=yes no
X11 --with-x=no no
XML --with-xml=no no
ZLIB --with-zlib=yes yes



any idea?

i have fonts in /usr/share/fonts/default/Type1 and fonts.conf

Must i install ghostscript?

Re: draw text to a jpeg file:Segmentation fault

Posted: 2009-05-14T18:51:11-07:00
by elvila
If i execute "identify -list font",it also gave:Segmentation fault

Re: draw text to a jpeg file:Segmentation fault

Posted: 2009-05-14T19:38:25-07:00
by magick
Can you post a stack trace so we can determine where in ImageMagick it is failing. Without it we don't have a clue why it faults.

Re: draw text to a jpeg file:Segmentation fault

Posted: 2009-05-14T20:21:39-07:00
by elvila
sorry ,i cannot provide trace stack information. because i execute the command on a embeded device.

i think the problem is the font support.
I can convert jpeg files.

now i configure IM with option --with-fontconfig and download the fontconfig conf files and libfontconfig.so to my device.
I also download the afm and pfd files from usr\share\fonts\default\Type1 (my computer) to my device.


Do you think all these is enough for using font ?

Thanks a lot!

Re: draw text to a jpeg file:Segmentation fault

Posted: 2009-05-17T20:45:15-07:00
by elvila
hi ,

the problem is solved.

need point out the default font path when ./configure

use --with-fontpath=/usr/share/fonts


Anyway, thanks!

Re: draw text to a jpeg file:Segmentation fault

Posted: 2009-05-18T05:50:45-07:00
by magick
Without a font path, ImageMagick should report an exception, not fault. Unfortunately we cannot reproduce the problem. We patched ImageMagick to return no fonts on our system and ImageMagick gracefully exited without generating a fault.