[MacRuby] #951: BridgeSupport - bug dereferencing a pointer

MacRuby ruby-noreply at macosforge.org
Sun Oct 10 19:03:01 PDT 2010


#951: BridgeSupport - bug dereferencing a pointer
-------------------------------------+--------------------------------------
 Reporter:  mattaimonetti@…          |       Owner:  lsansonetti@…        
     Type:  defect                   |      Status:  new                  
 Priority:  blocker                  |   Milestone:  MacRuby 0.8          
Component:  MacRuby                  |    Keywords:  BridgeSupport        
-------------------------------------+--------------------------------------
 I'm trying to use the Chipmunk physics engine
 http://files.slembcke.net/chipmunk/release/ChipmunkLatest-Docs/ with
 MacRuby.

 I wrote a simple Cocoa framework with the C source and generated a
 BridgeSupport file using the new generator (preview 1).

 Here is the framework: http://github.com/mattetti/MacRuby-Chipmunk/
 Here is the BridgeSupport file: http://github.com/mattetti/MacRuby-
 Chipmunk/blob/master/Chipmunk/BridgeSupport/Chipmunk.bridgesupport

 You can download the framework and reproduce the problem in MacIRB:


 {{{
 $ macirb --simple-prompt
 >> framework File.expand_path('Chipmunk.framework')
 => true
 >> cpInitChipmunk()
 Initializing Chipmunk v5.3.2 (Debug Enabled)
 Compile with -DNDEBUG defined to disable debug mode and runtime assertion
 checks
 => nil
 >> space_ptr = cpSpaceNew()
 => #<Pointer:0x2002290e0>
 >> space = space_ptr[0]
 TypeError: unrecognized runtime type `{cpSpaceHash'

 }}}

 Here is a direct link to the BS's cpSpaceNew function node:
 http://github.com/mattetti/MacRuby-
 Chipmunk/blob/master/Chipmunk/BridgeSupport/Chipmunk.bridgesupport#L821-823

 Can it be that the runtime type looked up is {cpSpaceHash instead of
 cpSpaceHash?

 The BS file was generated using the new gen_bridge_metadata tool and
 MacRuby 0.8 trunk was used.

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/951>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list