Search code examples
rubyrackrmagick

Bus Error in RMagick when using Rack?


Running either alone works fine, but when running both together, it crashes hard, at what seems like Magick::Image#new (the first call I make to it).

Edit: Request for code fulfilled below:

Under Ramaze, the issue can be reproduced like this

require 'ramaze'
require 'rmagick'

class ExceptionCauser < Ramaze::Controller
map '/'

  def index
    img = Magick::Image.new(64, 64)
  end

end

Ramaze.start :port => 7004

and then visiting 0.0.0.0:7004 will crash.


Solution

  • Can be fixed by recompiling Imagemagick using the --disable-openmp flag, as in Why is this RMagick call generating a segmentation fault? .