/Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/showoff-0.4.1/lib/showoff.rb:148: [BUG] Segmentation fault #78

Open
johntdyer opened this Issue Apr 2, 2011 · 9 comments

Projects

None yet

10 participants

@johntdyer

I am constantly getting this error when I try to run showoff serve from Ruby 1.9.2

/Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/showoff-0.4.1/lib/showoff.rb:148: [BUG] Segmentation fault
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.0]

Seems to only happen when I reference an image, but the same presentation works fine if I render it as a static project, it only seems to happen when I serve.. Any idea's?


-- control frame ----------
c:0054 p:---- s:0251 b:0251 l:000250 d:000250 CFUNC :ping
c:0053 p:0042 s:0247 b:0247 l:000246 d:000246 METHOD /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/showoff-0.4.1/lib/showoff.rb:148
c:0052 p:0036 s:0242 b:0242 l:000228 d:000241 BLOCK /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/showoff-0.4.1/lib/showoff.rb:136
c:0051 p:---- s:0235 b:0235 l:000234 d:000234 FINISH
c:0050 p:---- s:0233 b:0233 l:000232 d:000232 CFUNC :gsub
c:0049 p:0097 s:0229 b:0229 l:000228 d:000228 METHOD /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/showoff-0.4.1/lib/showoff.rb:134
c:0048 p:0393 s:0221 b:0221 l:000206 d:000220 BLOCK /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/showoff-0.4.1/lib/showoff.rb:112
c:0047 p:---- s:0212 b:0212 l:000211 d:000211 FINISH
c:0046 p:---- s:0210 b:0210 l:000209 d:000209 CFUNC :each
c:0045 p:0067 s:0207 b:0207 l:000206 d:000206 METHOD /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/showoff-0.4.1/lib/showoff.rb:84
c:0044 p:0077 s:0198 b:0197 l:000187 d:000196 BLOCK /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/showoff-0.4.1/lib/showoff.rb:206
c:0043 p:---- s:0193 b:0193 l:000192 d:000192 FINISH
c:0042 p:---- s:0191 b:0191 l:000190 d:000190 CFUNC :each
c:0041 p:0099 s:0188 b:0188 l:000187 d:000187 METHOD /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/showoff-0.4.1/lib/showoff.rb:204
c:0040 p:0017 s:0181 b:0181 l:000180 d:000180 METHOD /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/showoff-0.4.1/lib/showoff.rb:291
c:0039 p:0082 s:0177 b:0177 l:002278 d:000176 LAMBDA /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/showoff-0.4.1/lib/showoff.rb:380
c:0038 p:---- s:0173 b:0173 l:000172 d:000172 FINISH
c:0037 p:---- s:0171 b:0171 l:000170 d:000170 CFUNC :call
c:0036 p:0018 s:0168 b:0168 l:0011d0 d:000167 BLOCK /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:1126
c:0035 p:---- s:0166 b:0166 l:000165 d:000165 FINISH
c:0034 p:---- s:0164 b:0164 l:000163 d:000163 CFUNC :instance_eval
c:0033 p:0016 s:0161 b:0159 l:000158 d:000158 METHOD /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:709
c:0032 p:0012 s:0155 b:0155 l:000124 d:000154 BLOCK /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:693
c:0031 p:0017 s:0153 b:0153 l:000144 d:000152 BLOCK /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:741
c:0030 p:---- s:0151 b:0151 l:000150 d:000150 FINISH
c:0029 p:---- s:0149 b:0149 l:000148 d:000148 CFUNC :catch
c:0028 p:0164 s:0145 b:0145 l:000144 d:000144 METHOD /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:738
c:0027 p:0018 s:0136 b:0136 l:000124 d:000135 BLOCK /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:692
c:0026 p:---- s:0130 b:0130 l:000129 d:000129 FINISH
c:0025 p:---- s:0128 b:0128 l:000127 d:000127 CFUNC :each
c:0024 p:0050 s:0125 b:0125 l:000124 d:000124 METHOD /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:691
c:0023 p:0078 s:0119 b:0119 l:000118 d:000118 METHOD /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:826
c:0022 p:0009 s:0115 b:0115 l:001618 d:000114 BLOCK /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:619
c:0021 p:---- s:0113 b:0113 l:000112 d:000112 FINISH
c:0020 p:---- s:0111 b:0111 l:000110 d:000110 CFUNC :instance_eval
c:0019 p:0012 s:0108 b:0108 l:000099 d:000107 BLOCK /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:791
c:0018 p:---- s:0106 b:0106 l:000105 d:000105 FINISH
c:0017 p:---- s:0104 b:0104 l:000103 d:000103 CFUNC :catch
c:0016 p:0013 s:0100 b:0100 l:000099 d:000099 METHOD /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:791
c:0015 p:0155 s:0093 b:0093 l:001618 d:001618 METHOD /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:619
c:0014 p:0019 s:0086 b:0086 l:000085 d:000085 METHOD /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:604
c:0013 p:0015 s:0082 b:0082 l:000081 d:000081 METHOD /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/showexceptions.rb:21
c:0012 p:0155 s:0074 b:0074 l:000073 d:000073 METHOD /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.2.2/lib/rack/methodoverride.rb:24
c:0011 p:0032 s:0068 b:0068 l:000067 d:000067 METHOD /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.2.2/lib/rack/commonlogger.rb:18
c:0010 p:0018 s:0060 b:0060 l:001960 d:000059 BLOCK /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:1245
c:0009 p:0032 s:0058 b:0058 l:000057 d:000057 METHOD /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:1276
c:0008 p:0011 s:0054 b:0054 l:001960 d:001960 METHOD /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:1245
c:0007 p:0015 s:0050 b:0050 l:000049 d:000049 METHOD /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.2.2/lib/rack/content_length.rb:13
c:0006 p:0338 s:0042 b:0042 l:000041 d:000041 METHOD /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.2.2/lib/rack/handler/webrick.rb:52
c:0005 p:0257 s:0030 b:0030 l:000029 d:000029 METHOD /Users/jdyer/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:111
c:0004 p:0393 s:0020 b:0020 l:000019 d:000019 METHOD /Users/jdyer/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:70
c:0003 p:0126 s:0009 b:0009 l:000678 d:000008 BLOCK /Users/jdyer/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/server.rb:183
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH

c:0001 p:---- s:0002 b:0002 l:000001 d:000001 TOP

-- Ruby level backtrace information ----------------------------------------
/Users/jdyer/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/server.rb:183:in block in start_thread' /Users/jdyer/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:70:inrun'
/Users/jdyer/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:111:in service' /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.2.2/lib/rack/handler/webrick.rb:52:inservice'
/Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.2.2/lib/rack/content_length.rb:13:in call' /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:1245:incall'
/Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:1276:in synchronize' /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:1245:inblock in call'
/Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.2.2/lib/rack/commonlogger.rb:18:in call' /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.2.2/lib/rack/methodoverride.rb:24:incall'
/Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/showexceptions.rb:21:in call' /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:604:incall'
/Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:619:in call!' /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:791:ininvoke'
/Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:791:in catch' /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:791:inblock in invoke'
/Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:791:in instance_eval' /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:619:inblock in call!'
/Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:826:in dispatch!' /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:691:inroute!'
/Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:691:in each' /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:692:inblock in route!'
/Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:738:in process_route' /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:738:incatch'
/Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:741:in block in process_route' /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:693:inblock (2 levels) in route!'
/Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:709:in route_eval' /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:709:ininstance_eval'
/Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:1126:in block in compile!' /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:1126:incall'
/Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/showoff-0.4.1/lib/showoff.rb:380:in block in <class:ShowOff>' /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/showoff-0.4.1/lib/showoff.rb:291:inslides'
/Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/showoff-0.4.1/lib/showoff.rb:204:in get_slides_html' /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/showoff-0.4.1/lib/showoff.rb:204:ineach'
/Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/showoff-0.4.1/lib/showoff.rb:206:in block in get_slides_html' /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/showoff-0.4.1/lib/showoff.rb:84:inprocess_markdown'
/Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/showoff-0.4.1/lib/showoff.rb:84:in each' /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/showoff-0.4.1/lib/showoff.rb:112:inblock in process_markdown'
/Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/showoff-0.4.1/lib/showoff.rb:134:in update_image_paths' /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/showoff-0.4.1/lib/showoff.rb:134:ingsub'
/Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/showoff-0.4.1/lib/showoff.rb:136:in block in update_image_paths' /Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/showoff-0.4.1/lib/showoff.rb:148:inget_image_size'
/Users/jdyer/.rvm/gems/ruby-1.9.2-p180/gems/showoff-0.4.1/lib/showoff.rb:148:in `ping'

-- C level backtrace information -------------------------------------------

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Abort trap

I get this in 1.9.2 as well.

I was looking into this some. It looks like it has something to do with reading the image data with rmagick. From what i can tell there is an error in the C code when showoff tries to read the images properties. I am continuing to trace this down further.

Can everyone list the version of imagemagick and rmagick?
Also how imagemagick was installed?

I know for me i am running imagemagick 6.6.9 and rmagick 2.13.1. I use brew to install imagemagick

doolin commented Sep 29, 2011

I'm getting a similar crash without rmagick installed, using 1.9.2-p180, with a minimal gemset (fresh gemset, Gemfile only gems installed).

bds commented Oct 12, 2011

Was bit by this tonight. Fortunately I had an older showoff preso that worked so I could compare the Gemfile.lock

If I wasn't so tired I could probably find the exact gem and version that is causing the problem but here are the changes I made to fix the problem (again, I am sure that I changed more than I needed, machine-gun for fly, etc. :)

diff --git a/Gemfile.lock b/Gemfile.lock
index 5473aea..3fcf4b9 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -2,11 +2,10 @@ GEM
   remote: http://rubygems.org/
   specs:
     bluecloth (2.1.0)
-    gli (1.3.4)
-    json (1.6.1)
-    nokogiri (1.5.0)
-    rack (1.3.4)
-    rmagick (2.13.1)
+    gli (1.3.1)
+    json (1.5.3)
+    nokogiri (1.4.6)
+    rack (1.3.0)
     showoff (0.4.2)
       bluecloth
       gli (>= 1.2.5)
@@ -16,15 +15,17 @@ GEM
     sinatra (1.2.6)
       rack (~> 1.1)
       tilt (< 2.0, >= 1.2.2)
-    tilt (1.3.3)
+    tilt (1.3.2)

 PLATFORMS
   ruby

 DEPENDENCIES
-  bluecloth
-  gli
-  nokogiri
-  rmagick
+  bluecloth (= 2.1.0)
+  gli (= 1.3.1)
+  json (= 1.5.3)
+  nokogiri (= 1.4.6)
+  rack (= 1.3.0)
   showoff (= 0.4.2)
   sinatra (= 1.2.6)
+  tilt (= 1.3.2)

Happening for me too. I'm mostly commenting so I'll get notified about progress on this issue, but here are my environment details:

Ξ presentations/test_preso → rvm current
ruby-1.9.2-p290@showoff
Ξ presentations/test_preso → gem list | grep rmagick
rmagick (2.13.1)
Ξ presentations/test_preso → convert --version
Version: ImageMagick 6.7.1-1 2011-07-29 Q16 http://www.imagemagick.org 
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP   
mattd commented Nov 3, 2011

Wanted to report that, like @doolin, I'm getting this error without rmagick. ruby-1.9.2-p0

Also getting this error, ruby-1.9.3-p0, no rmagick.

might try installing imagemagick with --disable-openmp

brew install -f imagemagick --disable-openmp

rgabo commented Jun 11, 2012

@brianjriddle's tip worked for me, images load up with rmagick fine now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment