possible bug segmentation fault IM 6.6.0-4

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

possible bug segmentation fault IM 6.6.0-4

Post by fmw42 »

IM 6.6.0-4 Q16 Mac OSX Tiger

Input:
Image

This completes successfully with negative y offsets on -roll and the tmps and final image look correct.

infile="zelda3.png"
numchannels=3
ww=`convert $infile -ping -format "%w" info:`
hh=`convert $infile -ping -format "%h" info:`
hhh=`convert xc: -format "%[fx:$numchannels*$hh]" info:`
convert zelda3.png -scale 100x300% -separate +channel \
\( -size 1x1 xc:white xc:black xc:black -append -write mpr:stripes +delete \
-size ${ww}x${hhh}! tile:mpr:stripes -write tmpA00.png \) \
\( -clone 0 -clone 3 -alpha off -compose copy_opacity -composite -write tmpA0.png \) \
\( -clone 1 -clone 3 -roll +0-1 -alpha off -compose copy_opacity -composite -write tmpA1.png \) \
\( -clone 2 -clone 3 -roll +0-2 -alpha off -compose copy_opacity -composite -write tmpA2.png \) \
-delete 0-3 -compose over -background none -flatten tmp_line.png

But I need to roll the other way and then get a segmentation fault.

infile="zelda3.png"
numchannels=3
ww=`convert $infile -ping -format "%w" info:`
hh=`convert $infile -ping -format "%h" info:`
hhh=`convert xc: -format "%[fx:$numchannels*$hh]" info:`
convert zelda3.png -scale 100x300% -separate +channel \
\( -size 1x1 xc:white xc:black xc:black -append -write mpr:stripes +delete \
-size ${ww}x${hhh}! tile:mpr:stripes -write tmpA00.png \) \
\( -clone 0 -clone 3 -alpha off -compose copy_opacity -composite -write tmpA0.png \) \
\( -clone 1 -clone 3 -roll +0+1 -alpha off -compose copy_opacity -composite -write tmpA1.png \) \
\( -clone 2 -clone 3 -roll +0+2 -alpha off -compose copy_opacity -composite -write tmpA2.png \) \
-delete 0-3 -compose over -background none -flatten tmp_line.png

Can you verify whether you get the segmentation fault? Thanks.

Fred

P.S.

When I add -debug trace, it ends with:

2010-03-10T21:14:35-08:00 0:20.040 4.070u 6.6.0 Trace convert[836]: image.c/GetImageVirtualPixelMethod/1694/Trace
tmpA00.png
2010-03-10T21:14:35-08:00 0:20.040 4.070u 6.6.0 Trace convert[836]: cache.c/GetPixelCacheVirtualMethod/2985/Trace
tmpA00.png
2010-03-10T21:14:35-08:00 0:20.040 4.070u 6.6.0 Trace convert[836]: cache-view.c/GetCacheViewVirtualPixels/709/Trace
tmpA00.png
2010-03-10T21:14:35-08:00 0:20.040 4.070u 6.6.0 Trace convert[836]: cache.c/GetVirtualPixelsFromNexus/3288/Trace
tmpA00.png
2010-03-10T21:14:35-08:00 0:20.040 4.070u 6.6.0 Trace convert[836]: cache.c/SetPixelCacheNexusPixels/5010/Trace
tmpA00.png
2010-03-10T21:14:35-08:00 0:20.040 4.070u 6.6.0 Trace convert[836]: cache.c/ReadPixelCachePixels/4754/Trace
mpr:stripes[0]
Segmentation fault
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: possible bug segmentation fault IM 6.6.0-4

Post by magick »

We can reproduce the problem you posted and have a patch. Look for it in ImageMagick 6.6.0-5 Beta by sometime tomorrow. Thanks.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug segmentation fault IM 6.6.0-4

Post by fmw42 »

thanks very much. I thought I was going crazy with this as it works fine standalone to roll any one image.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug segmentation fault IM 6.6.0-4

Post by fmw42 »

magick wrote:We can reproduce the problem you posted and have a patch. Look for it in ImageMagick 6.6.0-5 Beta by sometime tomorrow. Thanks.
Yes, this works fine now with no segmentation fault
Post Reply