Nasty. Convert hangs SOMETIMES on same file ! Command (have tried several variations) is
convert /tmp/nexf.new -crop 462x456+7+15 +repage -type palette \ /tmp/nexfoo.tga ; convert /tmp/nexfoo.tga -resize 607x599! /tmp/nexf.tga
Program receives a new nexf.new (a gif) image every few minutes and creates nexf.tga via system(above command). But occasionally it just hangs, cpu 95%, no error message, forever. Can't reproduce because running it again on the same input file from the command line it works fine. This happens on two different computers so it's not hardware. May work fine for hours and then suddenly hangs on one file. A gdb attach says:
(no debugging symbols found)
0x000000330683bb40 in ReadBlob () from /usr/lib64/libMagickCore.so.1
Missing separate debuginfos, use: debuginfo-install ImageMagick.x86_64
(gdb) where
#0 0x000000330683bb40 in ReadBlob () from /usr/lib64/libMagickCore.so.1
#1 0x0000000000114970 in ?? ()
from /usr/lib64/ImageMagick-6.4.2/modules-Q16/coders/gif.so
#2 0x0000003306867b30 in ReadImage () from /usr/lib64/libMagickCore.so.1
#3 0x0000003306e3c3fa in ConvertImageCommand ()
from /usr/lib64/libMagickWand.so.1
#4 0x0000000000400cdc in ?? ()
#5 0x0000003dcc01e32a in __libc_start_main () from /lib64/libc.so.6
(snip)
#18 0x0000000000000000 in ?? ()
This is F9 (Sulphur) 2.6.25.6-55.fc9.x86_64
Memory 2.0GiB
Processor 0: AMD 64 X2 Dual Core Processor 6000+
Processor 1: AMD 64 X2 Dual Core Processor 6000+
On our FC6 32-bit systems we have never had this problem.
Is this a known issue? Is something uninitialized? Can anyone suggest a workaround or something I could do to narrow it down?
Thanks, Jim
convert inf loop hang
Re: convert inf loop hang
Which version of ImageMagick? Does it fail consistently on a particular image so we can reproduce the problem? Do you need nexfoo.tga? If not, does this command work?
- convert /tmp/nexf.new -crop 462x456+7+15 +repage -type palette -resize 607x599! /tmp/nexf.tga
Re: convert inf loop hang
Am home sick so can't get more info right now. The gdb output seems to suggest version 6.4.2 and the loop is called from the gif decoder (frame #2). Is this right? Your command was indeed one of the variations I tried and eventually it also hung. Repeating that command with the same input file from the command line (rather than a system call) always works fine - I found absolutely no way to reproduce it, the input files are identical except for slight differences in image content.
I will try it with -debug and diverting all output to a file, and I will also try getting the latest IM, thanks for the suggestions. It sometimes has to run for several hours before the error occurs. I fear it's randomly dependent on system memory layout for each instance. Is that even possible?
I will try it with -debug and diverting all output to a file, and I will also try getting the latest IM, thanks for the suggestions. It sometimes has to run for several hours before the error occurs. I fear it's randomly dependent on system memory layout for each instance. Is that even possible?