I get "segmentation fault" error everytime starting convert

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
konstantin
Posts: 50
Joined: 2013-08-07T13:50:31-07:00
Authentication code: 6789

I get "segmentation fault" error everytime starting convert

Post by konstantin »

I get "segmentation fault" error everytime starting convert, and memory core is dumped. I am using Arch Linux on my headless VPS (I mean no X installed, 4.4.5-1-ARCH) and I installed the ImageMagick package with Pacman package manager, version 6.9.3.8-1. Then I tried to compile it from source (7.0.1-0) with different configure options, and disabling different features, code parts. When I used this configure line, I got a working install, but labelling images with text didn't worked anymore:

Code: Select all

./configure --with-openexr=no --with-quantum-depth=8 --with-x=no --without-freetype --without-threads --without-pango   --disable-shared   --disable-openmp
Is it possible to analyze somehow, maybe the dumped memory core, which features need to be disabled on my system to disable exactly only the non-working and segmentation fault causing code parts, and leaving enabled the working ones? I don't want to try omiting them one by one.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: I get "segmentation fault" error everytime starting convert

Post by fmw42 »

Look in the download folder of IM 7 and see if there is a config.log file. If so, search it for errors and see what might have failed.

IM 7 installs by default as HDRI. You may want to add --disable-hdri.

IM 7 uses the the "magick" command rather than "convert", but I am told that a symbolic link to from convert to magick should be created automatically.

What was your exact IM command and what was the result of using it?
konstantin
Posts: 50
Joined: 2013-08-07T13:50:31-07:00
Authentication code: 6789

Re: I get "segmentation fault" error everytime starting convert

Post by konstantin »

Using this configure line I managed to get a working install:

Code: Select all

./configure --with-openexr=no --with-quantum-depth=8 --with-x=no  --without-threads --without-pango   --disable-shared   --disable-openmp
konstantin
Posts: 50
Joined: 2013-08-07T13:50:31-07:00
Authentication code: 6789

Re: I get "segmentation fault" error everytime starting convert

Post by konstantin »

I am trying to simply append 14 jpg files, vertically, so I use command:

Code: Select all

convert -append 4_*.jpg  examine_gamma_4.jpg
I still get an error message:

Code: Select all

convert: unable to extend pixel cache `no such file or directory' @ fatal/cache.c/CacheSignalHandler/3182.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: I get "segmentation fault" error everytime starting convert

Post by fmw42 »

Try the correct syntax for IM, esp IM 7, which is less forgiving than IM 6. The input images must come before any operator.

Code: Select all

convert  4_*.jpg  -append examine_gamma_4.jpg
Does that fix the issue?
konstantin
Posts: 50
Joined: 2013-08-07T13:50:31-07:00
Authentication code: 6789

Re: I get "segmentation fault" error everytime starting convert

Post by konstantin »

Unfortunately changing the order of input files and the operator doesn't solve the issue, I get the same error message in both cases. Maybe the resulting image is too big, and doesn't fit in the memory as I have only 512 MB in the VPS. My individual images are 2076x902, I tried appending only the half of them (7 images)together, and it worked. Appending 14 images together still doesn't work.
konstantin
Posts: 50
Joined: 2013-08-07T13:50:31-07:00
Authentication code: 6789

Re: I get "segmentation fault" error everytime starting convert

Post by konstantin »

I see, in the past (few months ago) stitching 14 similar sized images worked flawlessly.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: I get "segmentation fault" error everytime starting convert

Post by fmw42 »

On IM 7 does this work?

Code: Select all

magick  4_*.jpg  -append examine_gamma_4.jpg
konstantin
Posts: 50
Joined: 2013-08-07T13:50:31-07:00
Authentication code: 6789

Re: I get "segmentation fault" error everytime starting convert

Post by konstantin »

Doesn't work, after a few seconds the error message appears:

Code: Select all

magick: unable to extend pixel cache `<some random looking strange word appears here>' @ fatal/cache.c/CacheSignalHandler/3182.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: I get "segmentation fault" error everytime starting convert

Post by fmw42 »

Try changing your policy values as mentioned above for large image processing, so that if you run out of RAM it goes to disk.
Post Reply