Hello,
I'm new both to Ruby and Gosu. I tried to make my first game, following the tutorial. But as soon as I add this line to my code :
@beep = Gosu::Sample.new(window, "media/Beep.wav")
I get a seg fault. What could have gone wrong ? Should I open a ticket on google code ?
Here is the stack trace :
/dev/dsp: No such file or directory
/var/lib/gems/1.9.1/gems/gosu-0.7.27/lib/gosu/patches.rb:28: [BUG] Segmentation fault
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]
-- control frame ----------
c:0013 p:---- s:0040 b:0040 l:000039 d:000039 CFUNC :initialize
c:0012 p:0049 s:0036 b:0036 l:000035 d:000035 METHOD /var/lib/gems/1.9.1/gems/gosu-0.7.27/lib/gosu/patches.rb:28
c:0011 p:---- s:0032 b:0032 l:000031 d:000031 FINISH
c:0010 p:---- s:0030 b:0030 l:000029 d:000029 CFUNC :new
c:0009 p:0049 s:0025 b:0025 l:000024 d:000024 METHOD /home/jo/Aptana RadRails Workspace/FirstTest/player.rb:5
c:0008 p:---- s:0021 b:0021 l:000020 d:000020 FINISH
c:0007 p:---- s:0019 b:0019 l:000018 d:000018 CFUNC :new
c:0006 p:0070 s:0015 b:0015 l:000014 d:000014 METHOD /home/jo/Aptana RadRails Workspace/FirstTest/game_window.rb:7
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:0087 s:0007 b:0007 l:0004f8 d:000550 EVAL main.rb:9
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0004f8 d:0004f8 TOP
---------------------------
-- Ruby level backtrace information ----------------------------------------
main.rb:9:in
<main>'
main.rb:9:in
new'
/home/jo/Aptana RadRails Workspace/FirstTest/game_window.rb:7:in
initialize'
/home/jo/Aptana RadRails Workspace/FirstTest/game_window.rb:7:in
new'
/home/jo/Aptana RadRails Workspace/FirstTest/player.rb:5:in
initialize'
/home/jo/Aptana RadRails Workspace/FirstTest/player.rb:5:in
new'
/var/lib/gems/1.9.1/gems/gosu-0.7.27/lib/gosu/patches.rb:28:in
initialize'
/var/lib/gems/1.9.1/gems/gosu-0.7.27/lib/gosu/patches.rb:28:in
initialize'
-- C level backtrace information -------------------------------------------
/usr/lib/libruby-1.9.1.so.1.9(rb_vm_bugreport+0x5f) [0x7fecff66be8f]
/usr/lib/libruby-1.9.1.so.1.9(+0x58a56) [0x7fecff576a56]
/usr/lib/libruby-1.9.1.so.1.9(rb_bug+0xb3) [0x7fecff576bc3]
/usr/lib/libruby-1.9.1.so.1.9(+0xedde5) [0x7fecff60bde5]
/lib/libpthread.so.0(+0xfb40) [0x7fecff310b40]
/usr/lib/libstdc++.so.6(__cxa_allocate_exception+0x24) [0x7fecfaba4224]
/var/lib/gems/1.9.1/gems/gosu-0.7.27/lib/gosu.so(+0x45e26) [0x7fecfd938e26]
/var/lib/gems/1.9.1/gems/gosu-0.7.27/lib/gosu.so(_ZN4Gosu6SampleC1ERKSbIwSt11char_traitsIwESaIwEE+0x75) [0x7fecfd939a55]
/var/lib/gems/1.9.1/gems/gosu-0.7.27/lib/gosu.so(+0x2feaf) [0x7fecfd922eaf]
/usr/lib/libruby-1.9.1.so.1.9(+0x147258) [0x7fecff665258]
/usr/lib/libruby-1.9.1.so.1.9(+0x13f410) [0x7fecff65d410]
/usr/lib/libruby-1.9.1.so.1.9(+0x143e31) [0x7fecff661e31]
/usr/lib/libruby-1.9.1.so.1.9(+0x14611f) [0x7fecff66411f]
/usr/lib/libruby-1.9.1.so.1.9(rb_class_new_instance+0x30) [0x7fecff5b7e20]
/usr/lib/libruby-1.9.1.so.1.9(+0x147258) [0x7fecff665258]
/usr/lib/libruby-1.9.1.so.1.9(+0x13f410) [0x7fecff65d410]
/usr/lib/libruby-1.9.1.so.1.9(+0x143e31) [0x7fecff661e31]
/usr/lib/libruby-1.9.1.so.1.9(+0x14611f) [0x7fecff66411f]
/usr/lib/libruby-1.9.1.so.1.9(rb_class_new_instance+0x30) [0x7fecff5b7e20]
/usr/lib/libruby-1.9.1.so.1.9(+0x147258) [0x7fecff665258]
/usr/lib/libruby-1.9.1.so.1.9(+0x13f410) [0x7fecff65d410]
/usr/lib/libruby-1.9.1.so.1.9(+0x143e31) [0x7fecff661e31]
/usr/lib/libruby-1.9.1.so.1.9(+0x14611f) [0x7fecff66411f]
/usr/lib/libruby-1.9.1.so.1.9(rb_class_new_instance+0x30) [0x7fecff5b7e20]
/usr/lib/libruby-1.9.1.so.1.9(+0x147258) [0x7fecff665258]
/usr/lib/libruby-1.9.1.so.1.9(+0x13f410) [0x7fecff65d410]
/usr/lib/libruby-1.9.1.so.1.9(+0x143e31) [0x7fecff661e31]
/usr/lib/libruby-1.9.1.so.1.9(rb_iseq_eval_main+0xb2) [0x7fecff662082]
/usr/lib/libruby-1.9.1.so.1.9(+0x5bd52) [0x7fecff579d52]
/usr/lib/libruby-1.9.1.so.1.9(ruby_exec_node+0x1d) [0x7fecff579d7d]
/usr/lib/libruby-1.9.1.so.1.9(ruby_run_node+0x1e) [0x7fecff57b63e]
/usr/bin/ruby1.9.1(main+0x4b) [0x40092b]
/lib/libc.so.6(__libc_start_main+0xfe) [0x7fecfe6d4d8e]
/usr/bin/ruby1.9.1() [0x400819]
[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