ffi-opengl icon indicating copy to clipboard operation
ffi-opengl copied to clipboard

Gears example segfaults with Ubuntu 10.04 and Ruby 1.9.1-429

Open Quintus opened this issue 14 years ago • 2 comments

The "gears.rb" example results in a Segmentation Fault after running for approx. 5 seconds (The "spinning_cube.rb" works fine). Here's the output of running the script with ruby -dw:

Exception `LoadError' at /opt/rubies/ruby-1.9.1-p429/lib/ruby/gems/1.9.1/gems/ffi-0.6.3/lib/ffi.rb:5 - no such file to load -- 1.9/ffi_c
gears.rb:323: [BUG] Segmentation fault
ruby 1.9.1p429 (2010-07-02 revision 28523) [x86_64-linux]

-- control frame ----------
c:0005 p:---- s:0012 b:0012 l:000011 d:000011 CFUNC  :glutMainLoop
c:0004 p:0011 s:0009 b:0009 l:000008 d:000008 METHOD gears.rb:323
c:0003 p:0099 s:0006 b:0006 l:002168 d:000da8 EVAL   gears.rb:328
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:002168 d:002168 TOP   
---------------------------
-- Ruby level backtrace information-----------------------------------------
gears.rb:323:in `glutMainLoop'
gears.rb:323:in `start'
gears.rb:328:in `<main>'

-- C level backtrace information -------------------------------------------
0x7fe7187f65d1 /opt/rubies/ruby-1.9.1-p429/lib/libruby.so.1.9(rb_vm_bugreport+0x51) [0x7fe7187f65d1]
0x7fe71871c2a6 /opt/rubies/ruby-1.9.1-p429/lib/libruby.so.1.9(+0x512a6) [0x7fe71871c2a6]
0x7fe71871c413 /opt/rubies/ruby-1.9.1-p429/lib/libruby.so.1.9(rb_bug+0xb3) [0x7fe71871c413]
0x7fe71879ff25 /opt/rubies/ruby-1.9.1-p429/lib/libruby.so.1.9(+0xd4f25) [0x7fe71879ff25]
0x7fe7184bd8f0 /lib/libpthread.so.0(+0xf8f0) [0x7fe7184bd8f0]
0x7fe7187a63f8 /opt/rubies/ruby-1.9.1-p429/lib/libruby.so.1.9(st_lookup+0x28) [0x7fe7187a63f8]
0x7fe7187e2f7f /opt/rubies/ruby-1.9.1-p429/lib/libruby.so.1.9(+0x117f7f) [0x7fe7187e2f7f]
0x7fe7187e2fe3 /opt/rubies/ruby-1.9.1-p429/lib/libruby.so.1.9(rb_get_method_body+0x23) [0x7fe7187e2fe3]
0x7fe7187e6c34 /opt/rubies/ruby-1.9.1-p429/lib/libruby.so.1.9(+0x11bc34) [0x7fe7187e6c34]
0x7fe7187e7644 /opt/rubies/ruby-1.9.1-p429/lib/libruby.so.1.9(rb_funcall2+0x44) [0x7fe7187e7644]
0x7fe717250eb7 /opt/rubies/ruby-1.9.1-p429/lib/ruby/gems/1.9.1/gems/ffi-0.6.3/lib/ffi_c.so(+0x11eb7) [0x7fe717250eb7]
0x7fe717255e71 /opt/rubies/ruby-1.9.1-p429/lib/ruby/gems/1.9.1/gems/ffi-0.6.3/lib/ffi_c.so(ffi_closure_unix64_inner+0x448) [0x7fe717255e71]
0x7fe717256044 /opt/rubies/ruby-1.9.1-p429/lib/ruby/gems/1.9.1/gems/ffi-0.6.3/lib/ffi_c.so(ffi_closure_unix64+0x46) [0x7fe717256044]
0x7fe713d78c4f /usr/lib/libglut.so.3(glutMainLoop+0x9f) [0x7fe713d78c4f]
0x7fe71725210e /opt/rubies/ruby-1.9.1-p429/lib/ruby/gems/1.9.1/gems/ffi-0.6.3/lib/ffi_c.so(+0x1310e) [0x7fe71725210e]
0x7fe7187e46a2 /opt/rubies/ruby-1.9.1-p429/lib/libruby.so.1.9(+0x1196a2) [0x7fe7187e46a2]
0x7fe7187ef739 /opt/rubies/ruby-1.9.1-p429/lib/libruby.so.1.9(+0x124739) [0x7fe7187ef739]
0x7fe7187eaa30 /opt/rubies/ruby-1.9.1-p429/lib/libruby.so.1.9(+0x11fa30) [0x7fe7187eaa30]
0x7fe7187edc4f /opt/rubies/ruby-1.9.1-p429/lib/libruby.so.1.9(+0x122c4f) [0x7fe7187edc4f]
0x7fe7187ede71 /opt/rubies/ruby-1.9.1-p429/lib/libruby.so.1.9(rb_iseq_eval_main+0xb1) [0x7fe7187ede71]
0x7fe71871e6ec /opt/rubies/ruby-1.9.1-p429/lib/libruby.so.1.9(ruby_exec_node+0xac) [0x7fe71871e6ec]
0x7fe71871fd67 /opt/rubies/ruby-1.9.1-p429/lib/libruby.so.1.9(ruby_run_node+0x37) [0x7fe71871fd67]
0x4009eb ruby(main+0x4b) [0x4009eb]
0x7fe717881c4d /lib/libc.so.6(__libc_start_main+0xfd) [0x7fe717881c4d]
0x4008d9 ruby() [0x4008d9]

[NOTE]
You may encounter a bug of Ruby interpreter. Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Aborted

ruby -v: ruby 1.9.1p429 (2010-07-02 revision 28523) [x86_64-linux] uname -a: Linux kerberos 2.6.32-23-generic #37-Ubuntu SMP Fri Jun 11 08:03:28 UTC 2010 x86_64 GNU/Linux

Marvin

Quintus avatar Jul 11 '10 08:07 Quintus

I had same issue (v. similar setup) interestingly seems to run OK with jruby 1.5.2.

monkstone avatar Sep 16 '10 13:09 monkstone

Similar problem on Mac OS X 10.6.8 with Ruby 1.9.3-p0, but a perhaps more informative error. spinning_cube.rb works fine for me as well.

/Users/cjh/.rvm/gems/ruby-1.9.3-p0/gems/ffi-opengl-0.2.1/lib/ffi-opengl/platform.rb:4: Use RbConfig instead of obsolete and deprecated Config.
gears.rb:323:in `glutMainLoop': method `call' called on terminated object (0x0000010085e070 flags=0x0 klass=0x0) (NotImplementedError)
    from gears.rb:323:in `start'
    from gears.rb:328:in `<main>'

cjameshuff avatar Nov 13 '11 03:11 cjameshuff