![Image](http://i.imgur.com/CWHxWrv.jpg)
Crashes out loading a RUBE Json export
Crashes out loading a RUBE Json export
I instantiate an async RubeSceneLoader (https://github.com/tescott/RubeLoader) (JAVA) in libgdx and load an exported RUBE json file. I get this crash : java: /var/lib/jenkins/workspace/libgdx/extensions/gdx-box2d/gdx-box2d/jni/Box2D/Collision/Shapes/b2PolygonShape.cpp:158: void b2PolygonShape::Set(const b2Vec2*, int32): Assertion `false' failed. JSON file is here. Any indications if this is an error in the data RUBE has exported? https://gist.github.com/rileyrg/bc71e7d6b9c7fe07bb09 ![Image](http://i.imgur.com/CWHxWrv.jpg)
![Image](http://i.imgur.com/CWHxWrv.jpg)
Re: Crashes out loading a RUBE Json export
I tried the async loader with a more conventional fixture shape (n sided poly) and it loaded fine. So its that shape in my OP causing an error (link to GIST included)
Re: Crashes out loading a RUBE Json export
I'm not sure what the async loader is, but the assert you mention has come up before.
viewtopic.php?f=7&t=319
viewtopic.php?f=7&t=373
You could try replacing the existing b2PolygonShape.cpp with the one I modified in the first of those threads.
viewtopic.php?f=7&t=319
viewtopic.php?f=7&t=373
You could try replacing the existing b2PolygonShape.cpp with the one I modified in the first of those threads.
Re: Crashes out loading a RUBE Json export
I dont have any cpp files. You mean I should build my own box2d? OK, stop press. It seems this fix has been ported into some cutting edge of box2d. It should be backported into libgdx in the near future.
Re: Crashes out loading a RUBE Json export
I haven't used libgdx but since it's open source, surely there is a 'build everything' type script or some instructions that let you make the components from scratch yourself? In any case the change would be to replace the b2PolygonShape.cpp, this has apparently helped other users.
Re: Crashes out loading a RUBE Json export
Upgrading to the latest snapshot saw the box2d fix incorporated. Closed.