Bug 131561 - convert infinite loop with -resize
Summary: convert infinite loop with -resize
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: ImageMagick
Version: 2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jonathan Blandford
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-09-02 10:46 UTC by Jan "Yenya" Kasprzak
Modified: 2013-04-02 04:19 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-09-02 10:55:12 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
example.gif (203.16 KB, image/gif)
2004-09-02 10:48 UTC, Jan "Yenya" Kasprzak
no flags Details

Description Jan "Yenya" Kasprzak 2004-09-02 10:46:58 UTC
Description of problem:
convert enters an infinite loop when resizing the multi-layered (=
animated) GIF image.

Version-Release number of selected component (if applicable):
ImageMagick-5.5.7.15-1.3

How reproducible:
100%

Steps to Reproduce:
1. get an animated gif (I will attach one)
2. run "convert -resize 200x200 -size 200x200 -quality 80 src.gif dst.jpg"
  
Actual results:
Apparently, JPEGs for all layers are created, but then convert enters
an infinite loop, and does not even react to SIGTERM.

Expected results:
After converting all layers to JPEGs, convert should normally exit.

Additional info:
I have tried various animated GIFs on several installations of
Fedora Core 2.

The loop is somewhere in DestroyImageList()/DestroyImage(): I've ran
gdb on it, and after sending CTRL-C I've got this:

Program received signal SIGINT, Interrupt.
[Switching to Thread 1081845696 (LWP 6637)]
0x406aecd9 in _int_malloc () from /lib/tls/libc.so.6
(gdb) where
#0  0x406aecd9 in _int_malloc () from /lib/tls/libc.so.6
#1  0x406ae09d in malloc () from /lib/tls/libc.so.6
#2  0x400edfc6 in AllocateSemaphoreInfo () at semaphore.c:187
#3  0x400edf69 in AcquireSemaphoreInfo (semaphore_info=0x81219c0)
    at semaphore.c:145
#4  0x400484e3 in DestroyBlob (image=0x80d8fb8) at blob.c:488
#5  0x400be47c in DestroyImage (image=0x80d8fb8) at image.c:2014
#6  0x400c4ca3 in DestroyImageList (images=0x80ddfc0) at list.c:260
#7  0x4005e689 in ConvertImageCommand (image_info=0x8053a70, argc=5,
    argv=0x804c968, metadata=0x0, exception=0xbffff6b0) at command.c:4350
#8  0x08048c26 in main (argc=5, argv=0x804c968) at convert.c:318

Comment 1 Jan "Yenya" Kasprzak 2004-09-02 10:48:31 UTC
Created attachment 103386 [details]
example.gif

Try resizing this image using convert(1).

Comment 2 Jan "Yenya" Kasprzak 2004-09-02 10:55:12 UTC
I went to the www.imagemagick.org and downloaded their latest version
as the source RPM:

http://www.imagemagick.org/download/linux/SRPMS/ImageMagick-6.0.5-4.src.rpm

After building and installing this RPM converting layered images works
as expected. I hope the new version will be included in FC3.


Note You need to log in before you can comment on or make changes to this bug.