Writelock error in release !?

tsky

18-12-2006 15:06:36

Hi,

anyone can help me to understand the error message i got in release mode and not in debug mode:


** Warning **
PhysicsSDK: NpActor::moveGlobalPosition: WriteLock is still acquired. Procedure call skipped to avoid a deadlock!

E:\p4\release\PhysX_2.6.2\novodex\SDKs\Physics\src\NpActor.cpp:959 : PhysXSDK(RE)


this seems happened when i try to globalmove a kinetic object to an other position.
In debug mode the program runs... means i got not this message.

Correction: i got that message... only later.

thnx tom

betajaen

18-12-2006 15:33:23

Odd.

Got some code to share, else I can't work it out. But I know kinetic actors are quite particular on what you do to them.

Oh, I shouldn't print out debug messages in release anyway, because thats what it doesn't do ;)

tsky

19-12-2006 06:15:42

Odd.

Got some code to share, else I can't work it out. But I know kinetic actors are quite particular on what you do to them.


Hi,

i want to use them to move my objects representing our trackingsystem. This should act as an manipulator in the scene.



(CREATION)
nxOgre::body *erc1 = nxScene->createBody(
"ERC_Sensor1",
"ERC_Sensor1.mesh",
new nxOgre::cubeShape(0.2f),
20.0f,
Ogre::Vector3(10,2,0)
);
erc1->mNode->showBoundingBox(true);
erc1->setKinematic(true);

(USING)
nxOgre::body *body = m_pSceneRef->findBody(strDeviceName);
if (body != NULL) {
vec.x = packet->tm_Pos[0];
vec.y = packet->tm_Pos[1];
vec.z = packet->tm_Pos[2];

quat.x = packet->tm_Quat[0];
quat.y = packet->tm_Quat[1];
quat.z = packet->tm_Quat[2];
quat.w = packet->tm_Quat[3];
#ifdef _DEBUG
deBug.log(DEBUG_DATA, "\tprocessTracker: Pos X:%f Y:%f Z:%f", vec.x, vec.y, vec.z);
deBug.log(DEBUG_DATA, "\tprocessTracker: Quat X:%f Y:%f Z:%f W:%f", quat.x, quat.y, quat.z, quat.w);
#endif

if (!body->isKinematic()) {
body->setKinematic(true);
}
body->moveGlobalPosition(vec);
body->moveGlobalOrientationQuat(quat);
}


I got my data from an datapacket. All of this works nice, only that if i want to move the body. A couple of time the objects act in the right way, with the error message in background, than it does what the warning is for ->deadlock....the scene (renderer) works til i close the app.

A compareable application which works like the tutorials from ageia seems to work correct.

Perhaps you know a better way to create and move objects that are able to act as an rigid body !?

thnx tom

betajaen

19-12-2006 10:11:35

Quite odd. That should work, theoretically.

Have you tried anything similar in the tutorial framework?