Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite loop Reading an SVG with MSVG #96

Closed
edman007 opened this issue Sep 2, 2020 · 2 comments
Closed

Infinite loop Reading an SVG with MSVG #96

edman007 opened this issue Sep 2, 2020 · 2 comments

Comments

@edman007
Copy link

edman007 commented Sep 2, 2020

Prerequisites

  • [ x] I have written a descriptive issue title
  • [ x] I have verified that I am using the latest version of ImageMagick
  • [ x] I have searched open and closed issues to ensure it has not already been reported

Description

When I try to convert some SVGs to PNG (or any other format, like jpg), convert enters an infinite loop. Tested on two seperate debian buster systems running ImageMagick 6.9.10-23, I confirmed it on git master (ImageMagick6), my slackware system running 7.0.10-24 does NOT have this problem. The loop appears to be in RenderMVGContent, and best I can tell it's doing a push/pop and then see's a class from the svg and puts the same push/pop back on the stack. I git bisected this and it appears to be f6bf2ee, I have no idea how that causes this

Steps to Reproduce

I was converting many of the SVGs in KDE breeze-icons to PNGs, this bug happens on many of their SVGs

git clone https://github.com/KDE/breeze-icons.git
git clone https://github.com/ImageMagick/ImageMagick6.git
cd ImageMagick6
./bisect-script.sh # see below

This is my bisect script:

#!/bin/bash
autoconf
if ! ./configure --disable-deprecated  --with-quantum-depth=16  --with-jemalloc=no  --with-umem=no  --with-autotrace=no  --with-dps=no  --with-fpx=no  --with-gslib=no  --with-fontpath=  --with-gs-font-dir=/usr/share/fonts/type1/gsfonts  --with-gvc=no  --with-rsvg=no ; then
    exit 125
fi
if ! make -j15 ; then
    rm configure
    exit 125
fi    
./utilities/convert -verbose  msvg:../breeze-icons/icons/actions/16/media-playback-start.svg /tmp/start.png &
PID=$!
sleep 15
if kill $PID ; then
    echo bug
    RET=1
else
    echo no bug
    RET=0
fi
make clean
rm configure
exit $RET

System Configuration

  • ImageMagick version: 6.9.10-23, git master
  • Environment: x86_64 debian buster
  • Additional information: See Above
@urban-warrior
Copy link
Member

Thanks for the problem report. We can reproduce it and will have a patch to fix it in the GIT master branch @ https://github.com/ImageMagick/ImageMagick within a few days. The patch will be available in the beta releases of ImageMagick @ https://www.imagemagick.org/download/beta/ shortly after we commit a patch.

urban-warrior pushed a commit to ImageMagick/ImageMagick that referenced this issue Sep 5, 2020
@edman007
Copy link
Author

edman007 commented Sep 7, 2020

I just ran the updated version and tested it against the full breeze-icons set that was giving me trouble, and the patch seems to work. Thank you!

edman007 added a commit to edman007/chiton that referenced this issue Sep 7, 2020
* Build found a bug in imagemagick, inkscape is a build dep for
  all current versions of imagemagick 6 & 7, will update deps when
  the bug is resolved
    See: ImageMagick/ImageMagick6#96
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Sep 13, 2020
2020-09-05  7.0.10-29  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.10-29 GIT revision 17580:fc52fa0a9:20200905

2020-09-05  7.0.10-28  <quetzlzacatenango@image...>
  * Eliminate infinite loop for certain SVG styles (reference
    ImageMagick/ImageMagick6#96).
  * Add version element to JSON file format (reference
    ImageMagick/ImageMagick6#91).

2020-09-01  7.0.10-29 Dirk Lemstra <dirk@lem.....org>
  * Enabled support for AVIF encoding on Windows.
  * Clip path in 8bim profile is updated when the image is extended. (reference
    ImageMagick/ImageMagick#2414)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants