I got a segmentation fault when I attempted to upload an image to my site on Heroku using Carrierwave with Rmagick.
This is part of the error log output:
ruby: jpc_dec.c:1072: jpc_dec_tiledecode: Assertion `dec->numcomps == 3' failed.
/app/.bundle/gems/ruby/1.9.1/gems/carrierwave-0.5.4/lib/carrierwave/processing/rmagick.rb:248: [BUG] Segmentation fault
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]
After investigation, the segmentation fault occurs because I attempted to upload a JPEG2000 file with a .jpg
extension instead of the correct .jp2
extension.
Is this a bug with Rmagick?
More importantly, is it possible to prevent the users of my site from triggering this segmentation fault by sending an image with the wrong extension?
Thanks!