Amnuriak
15-04-2010 08:44:07
Would someone please check if attached file is a valid .nxs file ? I don't have flour and no other means of checking it. My app keeps breaking over this mesh but not everytime. Actually, I can't reproduce the error systematically, meaning I can only cause the error by chance - which is driving me N U T S ! ! !
Amnuriak
15-04-2010 09:26:35
I've finally found the bug and it's not with the file. It's about deleting shape descriptions after use. Due to architectural reasons for my app I have
ShapeDescription* pShapeDesc = ... // actually there's a ConvexDescriptoin* inside
(ConvexDescription*)pShapeDesc->mMesh = ...
mScene->createActor(*pShapeDesc);
delete pShapeDesc; // <- this breaks it but only sometimes !!
Going to search for more hints on this, still driving me insane it's happening randomly.
betajaen
15-04-2010 10:04:22
That doesn't even look valid C++.
What's wrong with?
ConvexDescription shapeDesc;
shapeDesc->mMesh = ....
mScene->createActor(shapeDesc);
[Edit]
Your NXS file seems to be fine:
N:\projects\nxogre.org\Flour\application>flourdebug test test.nxs
Results of 'test.nxs' as follows:
- Loading in mesh.
- Mesh type is: convex
- Creating actor.
- Simulating ..............
- Destroying actor.
OK.
Amnuriak
15-04-2010 13:32:13
It is valid C++ code, well at least what's on my screen. I shortened it considerably when posting but it should get the idea across. I do need the pointer there since a simple local call will not suffice. I eventually found the error which was of course in my own code. This thing is becoming a cross-referencing jungle. Good to know the mesh is fine which means my format conversions are working propperly - YEAH !