Runtime exception when creating a fixture from a shape

I have a very nasty issue and not sure at all where it comes from ..
I'm using AIR 3.2 , targeting iOS , within Flash Builder 4.6. I'm not using flash authoring..

This is the RTE I'm getting when creating a b2Fixture from a shape or from the body. Here the stack:
TypeError: Error #1006: value is not a function.
at cmodule.Box2D::FSM__Z20b2Body_CreateFixturePvP8_AS3_Val/work()
at Function/()
at Function/()
at Box2DAS.Dynamics::b2Fixture()[/Developer/Repositories/app/app-client/src/main/air/Box2DAS/Dynamics/b2Fixture.as:25]
at Box2DAS.Collision.Shapes::b2Shape/create()[/Developer/Repositories/app/app-client/src/main/air/Box2DAS/Collision/Shapes/b2Shape.as:26]


This is what i'm doing:

in Main constructor I call:

Code:
b2Base.initialize()


This is the part that cause the RTE:

Code:
body = world.CreateBody(new b2BodyDef());
var circle:b2CircleShape = new b2CircleShape(radius*scale);
var fixture:b2Fixture= shape.create(body);


Please help 😉
Ok so here a simple actionscript test case that demonstrate the RTE:

Code:
package
{
   import Box2DAS.Collision.Shapes.b2CircleShape;
   import Box2DAS.Common.V2;
   import Box2DAS.Common.b2Base;
   import Box2DAS.Common.b2Def;
   import Box2DAS.Dynamics.b2Body;
   import Box2DAS.Dynamics.b2Fixture;
   import Box2DAS.Dynamics.b2World;
   
   import flash.display.Sprite;
   import flash.events.Event;
   
   public class b2dAlchemy extends Sprite
   {
      private var world:b2World;
      private var body:b2Body;
      
      public function b2dAlchemy()
      {
         if(stage)
            initB2d();
         else
            addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
         
      }
      
      private function initB2d():void
      {
         b2Base.initialize();
         
         world = new b2World(new V2(0,0),true);
         body = world.CreateBody(b2Def.body);
         var circle:b2CircleShape = new b2CircleShape(160);
         var fixture:b2Fixture= circle.create(body);
      }
      
      protected function addedToStageHandler(event:Event):void
      {
         removeEventListener(Event.ADDED_TO_STAGE,addedToStageHandler);
         
         initB2d();
      }
      
      
   }
}
I also rebuilt the SWC with alchemy .. same thing ...
I'm really wondering whats wrong .. maybe i do something wrong or not. Is there someone who can help me on this please ?

Thanks in advance
Ok finally figured this one out. The first parameter to the circle constructor function is a pointer to a C++ circle object, not radius which I assume you assumed it was. This works:

Code:
world = new b2World(new V2(0,0),true);
body = world.CreateBody(b2Def.body);
var circle:b2CircleShape = new b2CircleShape();
circle.m_radius = 160;
var fixture:b2Fixture= circle.create(body);


So it was trying to dereference 160 in memory and didn't find a circle shape there.
Thanks a lot for your help. At the end it seems it is my mistake .. sorry for that 🙂

Original thread: https://box2d.org/forum/viewtopic.php?t=8178