jlnr/gosu — Issue #111: Weird segfaults when running the tutorial code on Linux
Author: icco
Created: 2011-12-23 05:58:54+00:00
State: open

Specifically Ubuntu Maverick (10.10 I think...).

Executing [the tutorial](https://github.com/jlnr/gosu/blob/master/examples/Tutorial.rb) or [the chipmunk tutorial](https://github.com/jlnr/gosu/blob/master/examples/ChipmunkIntegration.rb) both end in similar segfaults.

Ruby 1.9.2

This is the output from ChipmunkIntegration.rb

game.rb:134: [BUG] Segmentation fault
ruby 1.9.2p136 (2010-12-25 revision 30365) [i686-linux]

-- control frame ----------
c:0008 p:---- s:0026 b:0026 l:000025 d:000025 CFUNC :initialize
c:0007 p:---- s:0024 b:0024 l:000023 d:000023 CFUNC :new
c:0006 p:0063 s:0018 b:0018 l:000017 d:000017 METHOD game.rb:134
c:0005 p:---- s:0012 b:0012 l:000011 d:000011 FINISH
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :new
c:0003 p:0133 s:0007 b:0007 l:0005b4 d:0021c8 EVAL game.rb:277
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0005b4 d:0005b4 TOP
---------------------------
-- Ruby level backtrace information ----------------------------------------
game.rb:277:in `

'
game.rb:277:in `new'
game.rb:134:in `initialize'
game.rb:134:in `new'
game.rb:134:in `initialize'

-- C level backtrace information -------------------------------------------
/home/nat/.rvm/rubies/ruby-1.9.2-p136/lib/libruby.so.1.9(rb_vm_bugreport+0x72) [0x289a22]
/home/nat/.rvm/rubies/ruby-1.9.2-p136/lib/libruby.so.1.9(+0x53637) [0x163637]
/home/nat/.rvm/rubies/ruby-1.9.2-p136/lib/libruby.so.1.9(rb_bug+0x3a) [0x16372a]
/home/nat/.rvm/rubies/ruby-1.9.2-p136/lib/libruby.so.1.9(+0x106ae4) [0x216ae4]
[0xd0540c]
/home/nat/.rvm/gems/ruby-1.9.2-p136/gems/gosu-0.7.41/lib/gosu.so(+0x5ff5e) [0x4d3f5e]
/home/nat/.rvm/gems/ruby-1.9.2-p136/gems/gosu-0.7.41/lib/gosu.so(_ZN4Gosu13loadImageFileERNS_6BitmapERKSbIwSt11char_traitsIwESaIwEE+0x6f) [0x4d415f]
/home/nat/.rvm/gems/ruby-1.9.2-p136/gems/gosu-0.7.41/lib/gosu.so(_ZN4Gosu10loadBitmapERNS_6BitmapEm+0xac) [0x49814c]
/home/nat/.rvm/gems/ruby-1.9.2-p136/gems/gosu-0.7.41/lib/gosu.so(+0x2487a) [0x49887a]
/home/nat/.rvm/gems/ruby-1.9.2-p136/gems/gosu-0.7.41/lib/gosu.so(+0x24c11) [0x498c11]
/home/nat/.rvm/rubies/ruby-1.9.2-p136/lib/libruby.so.1.9(+0x163d58) [0x273d58]
/home/nat/.rvm/rubies/ruby-1.9.2-p136/lib/libruby.so.1.9(+0x17031f) [0x28031f]
/home/nat/.rvm/rubies/ruby-1.9.2-p136/lib/libruby.so.1.9(rb_obj_call_init+0x50) [0x165870]
/home/nat/.rvm/rubies/ruby-1.9.2-p136/lib/libruby.so.1.9(rb_class_new_instance+0x3a) [0x1b403a]
/home/nat/.rvm/rubies/ruby-1.9.2-p136/lib/libruby.so.1.9(+0x163d58) [0x273d58]
/home/nat/.rvm/rubies/ruby-1.9.2-p136/lib/libruby.so.1.9(+0x17474e) [0x28474e]
/home/nat/.rvm/rubies/ruby-1.9.2-p136/lib/libruby.so.1.9(+0x169692) [0x279692]
/home/nat/.rvm/rubies/ruby-1.9.2-p136/lib/libruby.so.1.9(+0x16eac8) [0x27eac8]
/home/nat/.rvm/rubies/ruby-1.9.2-p136/lib/libruby.so.1.9(+0x170262) [0x280262]
/home/nat/.rvm/rubies/ruby-1.9.2-p136/lib/libruby.so.1.9(rb_obj_call_init+0x50) [0x165870]
/home/nat/.rvm/rubies/ruby-1.9.2-p136/lib/libruby.so.1.9(rb_class_new_instance+0x3a) [0x1b403a]
/home/nat/.rvm/rubies/ruby-1.9.2-p136/lib/libruby.so.1.9(+0x163d58) [0x273d58]
/home/nat/.rvm/rubies/ruby-1.9.2-p136/lib/libruby.so.1.9(+0x17474e) [0x28474e]
/home/nat/.rvm/rubies/ruby-1.9.2-p136/lib/libruby.so.1.9(+0x169692) [0x279692]
/home/nat/.rvm/rubies/ruby-1.9.2-p136/lib/libruby.so.1.9(+0x16eac8) [0x27eac8]
/home/nat/.rvm/rubies/ruby-1.9.2-p136/lib/libruby.so.1.9(rb_iseq_eval_main+0x1f5) [0x27eef5]
/home/nat/.rvm/rubies/ruby-1.9.2-p136/lib/libruby.so.1.9(+0x55efa) [0x165efa]
/home/nat/.rvm/rubies/ruby-1.9.2-p136/lib/libruby.so.1.9(ruby_exec_node+0x25) [0x165f35]
/home/nat/.rvm/rubies/ruby-1.9.2-p136/lib/libruby.so.1.9(ruby_run_node+0x35) [0x167745]
ruby(main+0x68) [0x8048748]
/lib/libc.so.6(__libc_start_main+0xe7) [0x32dce7]
ruby() [0x8048641]

[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

borted