alex88 / heroku-buildpack-vips

Heroku buildpack with vips
MIT License
33 stars 58 forks source link

ImageMagick core dumped #12

Open automata opened 9 years ago

automata commented 9 years ago

While using sharp to resize a GIF file, it uses ImageMagick that unexpectedly breaks with a Illegal instruction (core dumped) while trying to read the GIF and extract metadata.

We debugged and the backtrace is available here.

It seems the bundled ImageMagick uses AVX instructions that aren't available at Heroku cedar-14. We will try to rebuild ImageMagick without AVX support.

automata commented 9 years ago

It's possible to reproduce the same error just using ImageMagick's convert:

~ $ ./vendor/vips/bin/convert foo.gif
Illegal instruction (core dumped)
automata commented 9 years ago

We rebuilt ImageMagick without AVX support (./configure --prefix=$OUTPUT_PATH --with-gcc-arch) and both convert and sharp works.

alex88 commented 9 years ago

Thanks a lot for this, I'm going to rebuild our image with that flag so it works fine on cedar 14 ;)

alex88 commented 9 years ago

@automata can you please provide a sample app in which convert is broken? I've tried to use my latest buildpack version (the last tag) and it works fine, no core dump