chipmunk-rb / chipmunk-ffi

chipmunk ruby bindings using ffi
26 stars 6 forks source link

Adding GrooveJoint to space causes segfault #14

Closed RavensKrag closed 13 years ago

RavensKrag commented 13 years ago
/var/lib/gems/1.9.1/gems/chipmunk-ffi-1.1.0/lib/chipmunk-ffi/space.rb:261: [BUG] Segmentation fault
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]

-- control frame ----------
c:0018 p:---- s:0090 b:0090 l:000089 d:000089 CFUNC  :cpSpaceAddConstraint
c:0017 p:0040 s:0085 b:0085 l:000084 d:000084 METHOD /var/lib/gems/1.9.1/gems/chipmunk-ffi-1.1.0/lib/chipmunk-ffi/space.rb:261
c:0016 p:0083 s:0081 b:0081 l:000080 d:000080 METHOD /home/ravenskrag/Code/Source/eternity/Physics/Physics.rb:106
c:0015 p:0026 s:0077 b:0077 l:000076 d:000076 METHOD /home/ravenskrag/Code/Source/eternity/Physics/Physics.rb:86
c:0014 p:0136 s:0071 b:0071 l:000070 d:000070 METHOD /home/ravenskrag/Code/Source/eternity/Physics/Physics.rb:161
c:0013 p:---- s:0061 b:0061 l:000060 d:000060 FINISH
c:0012 p:---- s:0059 b:0059 l:000058 d:000058 CFUNC  :new
c:0011 p:0124 s:0051 b:0051 l:000050 d:000050 METHOD /home/ravenskrag/Code/Source/eternity/GameObjects/Entity.rb:30
c:0010 p:0114 s:0039 b:0039 l:000038 d:000038 METHOD /home/ravenskrag/Code/Source/eternity/GameObjects/Character.rb:23
c:0009 p:0060 s:0030 b:0030 l:000029 d:000029 METHOD /home/ravenskrag/Code/Source/eternity/GameObjects/Player.rb:22
c:0008 p:---- s:0022 b:0022 l:000021 d:000021 FINISH
c:0007 p:---- s:0020 b:0020 l:000019 d:000019 CFUNC  :new
c:0006 p:0206 s:0015 b:0015 l:000660 d:000660 METHOD ./init_game.rb:79
c:0005 p:---- s:0011 b:0011 l:000010 d:000010 FINISH
c:0004 p:---- s:0009 b:0009 l:000008 d:000008 CFUNC  :new
c:0003 p:0179 s:0006 b:0006 l:001128 d:0001f8 EVAL   ./init_game.rb:276
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:001128 d:001128 TOP   
---------------------------
-- Ruby level backtrace information ----------------------------------------
./init_game.rb:276:in `<main>'
./init_game.rb:276:in `new'
./init_game.rb:79:in `initialize'
./init_game.rb:79:in `new'
/home/ravenskrag/Code/Source/eternity/GameObjects/Player.rb:22:in `initialize'
/home/ravenskrag/Code/Source/eternity/GameObjects/Character.rb:23:in `initialize'
/home/ravenskrag/Code/Source/eternity/GameObjects/Entity.rb:30:in `initialize'
/home/ravenskrag/Code/Source/eternity/GameObjects/Entity.rb:30:in `new'
/home/ravenskrag/Code/Source/eternity/Physics/Physics.rb:161:in `initialize'
/home/ravenskrag/Code/Source/eternity/Physics/Physics.rb:86:in `initialize'
/home/ravenskrag/Code/Source/eternity/Physics/Physics.rb:106:in `link_side_and_bottom'
/var/lib/gems/1.9.1/gems/chipmunk-ffi-1.1.0/lib/chipmunk-ffi/space.rb:261:in `add_constraint'
/var/lib/gems/1.9.1/gems/chipmunk-ffi-1.1.0/lib/chipmunk-ffi/space.rb:261:in `cpSpaceAddConstraint'

-- C level backtrace information -------------------------------------------
/usr/lib/libruby-1.9.1.so.1.9(rb_vm_bugreport+0x5f) [0x7f52ff9bae8f]
/usr/lib/libruby-1.9.1.so.1.9(+0x58a56) [0x7f52ff8c5a56]
/usr/lib/libruby-1.9.1.so.1.9(rb_bug+0xb3) [0x7f52ff8c5bc3]
/usr/lib/libruby-1.9.1.so.1.9(+0xedde5) [0x7f52ff95ade5]
/lib/libpthread.so.0(+0xfb40) [0x7f52ff65fb40]
/usr/local/lib/libchipmunk.so.5.3.4(+0x63d5) [0x7f52f55363d5]
/usr/local/lib/libchipmunk.so.5.3.4(cpBodyActivate+0x18) [0x7f52f55367e8]
/usr/local/lib/libchipmunk.so.5.3.4(cpSpaceAddConstraint+0x29) [0x7f52f5537f99]
/var/lib/gems/1.9.1/gems/ffi-1.0.6/lib/ffi_c.so(ffi_call_unix64+0x4c) [0x7f52f5761a74]
/var/lib/gems/1.9.1/gems/ffi-1.0.6/lib/ffi_c.so(ffi_call+0x3ef) [0x7f52f57614e4]
/var/lib/gems/1.9.1/gems/ffi-1.0.6/lib/ffi_c.so(rbffi_CallFunction+0x100) [0x7f52f57503c0]
/usr/lib/libruby-1.9.1.so.1.9(+0x147258) [0x7f52ff9b4258]
/usr/lib/libruby-1.9.1.so.1.9(+0x13f410) [0x7f52ff9ac410]
/usr/lib/libruby-1.9.1.so.1.9(+0x143e31) [0x7f52ff9b0e31]
/usr/lib/libruby-1.9.1.so.1.9(+0x14611f) [0x7f52ff9b311f]
/usr/lib/libruby-1.9.1.so.1.9(rb_class_new_instance+0x30) [0x7f52ff906e20]
/usr/lib/libruby-1.9.1.so.1.9(+0x147258) [0x7f52ff9b4258]
/usr/lib/libruby-1.9.1.so.1.9(+0x13f410) [0x7f52ff9ac410]
/usr/lib/libruby-1.9.1.so.1.9(+0x143e31) [0x7f52ff9b0e31]
/usr/lib/libruby-1.9.1.so.1.9(+0x14611f) [0x7f52ff9b311f]
/usr/lib/libruby-1.9.1.so.1.9(rb_class_new_instance+0x30) [0x7f52ff906e20]
/usr/lib/libruby-1.9.1.so.1.9(+0x147258) [0x7f52ff9b4258]
/usr/lib/libruby-1.9.1.so.1.9(+0x13f410) [0x7f52ff9ac410]
/usr/lib/libruby-1.9.1.so.1.9(+0x143e31) [0x7f52ff9b0e31]
/usr/lib/libruby-1.9.1.so.1.9(+0x14611f) [0x7f52ff9b311f]
/usr/lib/libruby-1.9.1.so.1.9(rb_class_new_instance+0x30) [0x7f52ff906e20]
/usr/lib/libruby-1.9.1.so.1.9(+0x147258) [0x7f52ff9b4258]
/usr/lib/libruby-1.9.1.so.1.9(+0x13f410) [0x7f52ff9ac410]
/usr/lib/libruby-1.9.1.so.1.9(+0x143e31) [0x7f52ff9b0e31]
/usr/lib/libruby-1.9.1.so.1.9(rb_iseq_eval_main+0xb2) [0x7f52ff9b1082]
/usr/lib/libruby-1.9.1.so.1.9(+0x5bd52) [0x7f52ff8c8d52]
/usr/lib/libruby-1.9.1.so.1.9(ruby_exec_node+0x1d) [0x7f52ff8c8d7d]
/usr/lib/libruby-1.9.1.so.1.9(ruby_run_node+0x1e) [0x7f52ff8ca63e]
ruby(main+0x4b) [0x40092b]
/lib/libc.so.6(__libc_start_main+0xfe) [0x7f52fea23d8e]
ruby() [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

Aborted
RavensKrag commented 13 years ago

Thought I had isolated this to a chipmunk-ffi error for sure. Just ran it in IRB to make sure, and now it seems to be related to my code.

Sorry about that.

shawn42 commented 13 years ago

Oh, no problem. Thanks for the update so I didn't go chase this. I'd like to see what you're building w/ chipmunk-ffi. Is your code public somewhere?

RavensKrag commented 13 years ago

Yeah, check out my eternity repo here on github. Here's the link for you.

https://github.com/RavensKrag/eternity

Hopefully I'll get some stuff rolled out for chipmunk-ffi soon as well.