jlnr/gosu — Issue #115: Window#gl does not work properly with z-index
Author: RavensKrag
Created: 2012-02-24 22:48:30+00:00
State: open

Without supplying a z-index, there are no problems that I can see. However, when a z-index is supplied, it segfaults occasionally. Other times, it just seems to call Proc#call on what it expects to be the block, but what is actually some other data.

In my particular case, it seems to be pulling data out from Chipmunk.

Here's the output from when it caused a segfault.

/home/ravenskrag/GameDev/Eternity/Code/GameStates/GameStateManager.rb:163: [BUG] Segmentation fault
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]

-- control frame ----------
c:0013 p:---- s:0035 b:0035 l:000034 d:000034 CFUNC :flush
c:0012 p:0036 s:0032 b:0032 l:000023 d:000031 BLOCK /home/ravenskrag/GameDev/Eternity/Code/GameStates/GameStateManager.rb:163
c:0011 p:---- s:0029 b:0029 l:000028 d:000028 FINISH
c:0010 p:---- s:0027 b:0027 l:000026 d:000026 CFUNC :each
c:0009 p:0043 s:0024 b:0024 l:000023 d:000023 METHOD /home/ravenskrag/GameDev/Eternity/Code/GameStates/GameStateManager.rb:160
c:0008 p:0013 s:0021 b:0021 l:000020 d:000020 METHOD ./Code/init_game.rb:90
c:0007 p:0031 s:0018 b:0018 l:001ca8 d:000017 LAMBDA /var/lib/gems/1.9.1/gems/gosu-0.7.41/lib/gosu/swig_patches.rb:15
c:0006 p:---- s:0014 b:0014 l:000013 d:000013 FINISH
c:0005 p:---- s:0012 b:0012 l:000011 d:000011 CFUNC :show
c:0004 p:0011 s:0009 b:0009 l:000008 d:000008 METHOD /var/lib/gems/1.9.1/gems/gosu-0.7.41/lib/gosu/swig_patches.rb:26
c:0003 p:0248 s:0006 b:0006 l:001948 d:001878 EVAL ./Code/init_game.rb:435
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:001948 d:001948 TOP
---------------------------
-- Ruby level backtrace information ----------------------------------------
./Code/init_game.rb:435:in `

'
/var/lib/gems/1.9.1/gems/gosu-0.7.41/lib/gosu/swig_patches.rb:26:in `show'
/var/lib/gems/1.9.1/gems/gosu-0.7.41/lib/gosu/swig_patches.rb:26:in `show'
/var/lib/gems/1.9.1/gems/gosu-0.7.41/lib/gosu/swig_patches.rb:15:in `block (2 levels) in '
./Code/init_game.rb:90:in `draw'
/home/ravenskrag/GameDev/Eternity/Code/GameStates/GameStateManager.rb:160:in `draw'
/home/ravenskrag/GameDev/Eternity/Code/GameStates/GameStateManager.rb:160:in `each'
/home/ravenskrag/GameDev/Eternity/Code/GameStates/GameStateManager.rb:163:in `block in draw'
/home/ravenskrag/GameDev/Eternity/Code/GameStates/GameStateManager.rb:163:in `flush'

-- C level backtrace information -------------------------------------------
/usr/lib/libruby-1.9.1.so.1.9(rb_vm_bugreport+0x61) [0x7f765cd87db1]
/usr/lib/libruby-1.9.1.so.1.9(+0x592fe) [0x7f765cc8f2fe]
/usr/lib/libruby-1.9.1.so.1.9(rb_bug+0xa5) [0x7f765cc8fd55]
/usr/lib/libruby-1.9.1.so.1.9(+0xf3c84) [0x7f765cd29c84]
/lib/x86_64-linux-gnu/libc.so.6(+0x36420) [0x7f765c8cd420]
/usr/lib/libruby-1.9.1.so.1.9(st_lookup+0x88) [0x7f765cd30c48]
/usr/lib/libruby-1.9.1.so.1.9(+0x13d409) [0x7f765cd73409]
/usr/lib/libruby-1.9.1.so.1.9(rb_method_entry_get_without_cache+0x11) [0x7f765cd754f1]
/usr/lib/libruby-1.9.1.so.1.9(+0x14886b) [0x7f765cd7e86b]
/usr/lib/libruby-1.9.1.so.1.9(rb_funcall+0xc9) [0x7f765cd7f159]
/var/lib/gems/1.9.1/gems/gosu-0.7.41/lib/gosu.so(_ZNSt3tr117_Function_handlerIFvvEN4Gosu12RunGLFunctorEE9_M_invokeERKNS_9_Any_dataE+0x37) [0x7f765a9844a7]
/var/lib/gems/1.9.1/gems/gosu-0.7.41/lib/gosu.so(_ZN4Gosu8Graphics5flushEv+0x3d1) [0x7f765a983411]
/var/lib/gems/1.9.1/gems/gosu-0.7.41/lib/gosu.so(+0x20102) [0x7f765a95c102]
/usr/lib/libruby-1.9.1.so.1.9(+0x14aac6) [0x7f765cd80ac6]
/usr/lib/libruby-1.9.1.so.1.9(+0x141806) [0x7f765cd77806]
/usr/lib/libruby-1.9.1.so.1.9(+0x14743d) [0x7f765cd7d43d]
/usr/lib/libruby-1.9.1.so.1.9(rb_yield+0x26e) [0x7f765cd82f2e]
/usr/lib/libruby-1.9.1.so.1.9(rb_ary_each+0x46) [0x7f765cc667d6]
/usr/lib/libruby-1.9.1.so.1.9(+0x14aac6) [0x7f765cd80ac6]
/usr/lib/libruby-1.9.1.so.1.9(+0x141806) [0x7f765cd77806]
/usr/lib/libruby-1.9.1.so.1.9(+0x14743d) [0x7f765cd7d43d]
/usr/lib/libruby-1.9.1.so.1.9(rb_vm_invoke_proc+0x362) [0x7f765cd7e152]
/usr/lib/libruby-1.9.1.so.1.9(+0x148374) [0x7f765cd7e374]
/usr/lib/libruby-1.9.1.so.1.9(rb_funcall+0xc9) [0x7f765cd7f159]
/var/lib/gems/1.9.1/gems/gosu-0.7.41/lib/gosu.so(_ZN4Gosu6Window4showEv+0x3a4) [0x7f765a997f44]
/var/lib/gems/1.9.1/gems/gosu-0.7.41/lib/gosu.so(+0x1fee2) [0x7f765a95bee2]
/usr/lib/libruby-1.9.1.so.1.9(+0x14aac6) [0x7f765cd80ac6]
/usr/lib/libruby-1.9.1.so.1.9(+0x141806) [0x7f765cd77806]
/usr/lib/libruby-1.9.1.so.1.9(+0x14743d) [0x7f765cd7d43d]
/usr/lib/libruby-1.9.1.so.1.9(rb_iseq_eval_main+0xb2) [0x7f765cd84432]
/usr/lib/libruby-1.9.1.so.1.9(+0x5d4a2) [0x7f765cc934a2]
/usr/lib/libruby-1.9.1.so.1.9(ruby_exec_node+0x1d) [0x7f765cc93f9d]
/usr/lib/libruby-1.9.1.so.1.9(ruby_run_node+0x1e) [0x7f765cc95bde]
ruby(main+0x4b) [0x4007fb]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f765c8b830d]
ruby() [0x400829]