Assertion

Report problems here (or use the built-in feedback dialog in the editor)
Post Reply
Ockonal
Posts: 4
Joined: Sat Jun 08, 2013 2:10 pm

Assertion

Post by Ockonal »

Hello!

Code: Select all

rube-lin64-1.3.1$ ./rube
rube.bin: /home/zppz/projects/rube-autobuild/rube-src/1.3.1/lin64/rube/box2d/Box2D/Box2D/Collision/Shapes/b2PolygonShape.cpp:78: b2Vec2 ComputeCentroid(const b2Vec2*, int32): Assertion `count >= 3' failed.
Aborted
Latest build (a few minutes ago). Even on the rube-files from samples folder =(
Some very-very tiny examples open fine.

Any ideas? I need it for now to continue my work.

----
Here is also the default project with images:
Image

What are the red lines/dots? And after running this scene physic becomes crazy, all the objects throw out the scene.
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: Assertion

Post by iforce2d »

It seems that this is caused by the locale setting being one that uses a comma as the decimal separator instead of a dot. I don't really know why it would make any difference, since my code is not even looking at that, but maybe Qt or jsoncpp are looking at it. I will try to find out the cause.

In the meantime, you can add this to the shell script that starts RUBE, to make the program run with the en_US locale:
export LANG=en_US

The shell script is the small file called 'rube' that was in the download, which you can edit with a text editor (the larger file 'rube.bin' is the program itself).
The LANG variable will set any other non-specified language variables, so that is usually enough, but if you have specifically set your individual locale variables to different things, you might also need to add this to be safe:
export LC_NUMERIC=en_US

I will add this to the script for future downloads.
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: Assertion

Post by iforce2d »

hmm... it might actually be necessary to use:

en_US.utf8
Post Reply