Julio Jerez wrote:bad data will make any porogram crash.
That may be true for the windows operating system where still lots of remote vulnerabilities are hidden in the code... just send wrong data to RPC server and you can lead the server to a crash which you might exploit to take over the machine.
Julio Jerez wrote:It is a fallacy that any application can be safe to bad data.
For a C application, there should be of course pointer consistency, but data that's read from a file into a data structure should not lead any code to crash. It was so in 1995, but nowadays, too much "users" are using computers who just input any data. You cannot teach them to always enter correct data.
Julio Jerez wrote:But not newton does no do any checking of any kind other that the assert you get from running in debug.
in Linux teh asert is defined to nothing, if you change yo the linux assert it may trigger and assertiong.
Maybe you should make your functions return a null on consistant but unreasonable input data instead of asserting and crashing.
Julio Jerez wrote:the part that say that is crashing is when building a collsion tree, that part o fteh mewton mesh is teh same collsion tree that is use for the game collsion shapes. without a tes tI can no determine what could be.
the NetwonMesh has a save function
void NewtonMeshSaveOFF(const NewtonMesh* const mesh, const char* const filename);
if you save the mesh and post I can see why is cashing.
Okay, I tried a convex shape now and here's the result:
OFF:
http://gwscript.goldenwipf.de/decomp.objInput 3ds file:
http://gwscript.goldenwipf.de/stein.3dsHow the model should look like:

What the decompositor generated; read as follows: CreateCompoundBody([PrimitiveShape, PrimitiveShape, ....]) where PrimitiveShape is CreateStdBody("hull mass x y z x y z x y z")
- Code: Select all
CreateCompoundBody([CreateStdBody("hull 100 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 -50.0000 0.0000 0.0000 "),
CreateStdBody("hull 100 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 -47.4342 0.0000 -15.8114 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 -40.8248 -20.4124 -20.4124 -50.0000 0.0000 0.0000 "),
CreateStdBody("hull 100 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 -47.4342 0.0000 -15.8114 "),
CreateStdBody("hull 100 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 -47.4342 15.8114 0.0000 "),
CreateStdBody("hull 100 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 -47.4342 0.0000 -15.8114 "),
CreateStdBody("hull 100 0.0000 0.0000 0.0000 -47.4342 0.0000 -15.8114 0.0000 0.0000 0.0000 -35.3553 35.3553 0.0000 0.0000 0.0000 0.0000 -47.4342 0.0000 15.8114 "),
CreateStdBody("hull 100 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 -35.3553 0.0000 35.3553 0.0000 0.0000 0.0000 -47.4342 0.0000 15.8114 "),
CreateStdBody("hull 100 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 -47.4342 0.0000 -15.8114 0.0000 0.0000 0.0000 -35.3553 35.3553 0.0000 0.0000 0.0000 0.0000 -40.8248 20.4124 -20.4124 "),
CreateStdBody("hull 100 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 -40.8248 -20.4124 -20.4124 "),
CreateStdBody("hull 100 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 -47.4342 0.0000 -15.8114 0.0000 0.0000 0.0000 -35.3553 35.3553 0.0000 0.0000 0.0000 0.0000 -35.3553 0.0000 35.3553 "),
CreateStdBody("hull 100 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 -35.3553 0.0000 35.3553 "),
CreateStdBody("hull 100 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 -35.3553 0.0000 -35.3553 "),
CreateStdBody("hull 100 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 -35.3553 0.0000 0.0000 35.3553 0.0000 -35.3553 -20.4124 -20.4124 -40.8248 "),
CreateStdBody("hull 100 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 -47.4342 0.0000 -15.8114 0.0000 0.0000 0.0000 -35.3553 0.0000 0.0000 0.0000 0.0000 0.0000 -20.4124 -20.4124 40.8248 "),
CreateStdBody("hull 100 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 -35.3553 0.0000 0.0000 20.4124 40.8248 -20.4124 -15.8114 0.0000 -47.4342 "),
CreateStdBody("hull 100 -40.8248 -20.4124 20.4124 -20.4124 20.4124 -40.8248 -40.8248 20.4124 -20.4124 -20.4124 -40.8248 -20.4124 -47.4342 0.0000 -15.8114 148.0000 232.0000 35.3553 0.0000 0.0000 0.0000 Nan Nan Nan 35.3553 0.0000 35.3553 0.0000 35.3553 35.3553 "),
CreateStdBody("hull 100 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 35.3553 -35.3553 0.0000 20.4124 40.8248 -20.4124 0.0000 0.0000 0.0000 "),
CreateStdBody("hull 100 -47.4342 0.0000 -15.8114 148.0000 232.0000 35.3553 0.0000 0.0000 0.0000 40.8248 -20.4124 -20.4124 35.3553 0.0000 35.3553 0.0000 0.0000 0.0000 "),
CreateStdBody("hull 100 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 "),
CreateStdBody("hull 100 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 "),
CreateStdBody("hull 100 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 "),
CreateStdBody("hull 100 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 "),
CreateStdBody("hull 100 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 -47.4342 0.0000 -15.8114 0.0000 0.0000 0.0000 Nan Nan Nan 35.3553 0.0000 35.3553 0.0000 0.0000 0.0000 ")])