Havok acting different among different Os's

Havok acting different among different Os's

I have been having an extreamly obscure bug i just cant get my finger behind.

I create a hkpExtendedMeshShape and generate a moppCode from it. I then use a hkpMoppBvTreeShape as shape input for a rigid body. This rigid body is then added to the world just like in the examples given by havok. This all works great.

It is important also to mention that i have 2 applications a server and a client. They both make use of a shared library (a hybrid). This hybrid code generates the rigid body i just described above. Therefore both client and server use identical code to generate the mesh.

It turns out that only in RELEASE on the client i always tunnel through the first 2 objects created in any level. To make it even more obscure, it only happens on certain machines on windows7. When i run the client in compatibiilty mode (XP + sp3) it works correct for the first 2 objects as well. Do note, it only happens for the first 2 objects created in any level, also only happens in release and only on certain machines in windows 7.

The code is compiled on a windows 7 xp64 bit machine.

I have verified that my application does not contain any memory faults by using visual leak debugger, gdebugger, ggcdebugger and also used hkMemoryInitUtil::initChecking(..) to make sure Havok has no memory faults.

Also, the compiler settings between client and release are exactly equal.

Do also note, that the graphical display in the game of the mesh is correct, but not only my own, also the visual dbugger of havok of both the server and the client shows correct mesh. Yet it just tunnels through the first 2 objects of ANY level (client only).

Im really breaking my mind around this problem. only reasons i could think of was different compiler settings or intrinsic functions which are not used by the server which causes the bug to only appear in release on the client. But honestly i dont know.

Above, a screenshot of server, and below the client. Do note, i repeate it only occurs for the first 2 objects in release on certain machines in window 7.

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

bump, im clueless for weeks..

From the look of it, it seems to be something not initialized somewhere.Does the issue only appears with the character controller, or do you have the same problem with other rigid bodies?You could also try adding a character proxy listener to see if you get the object interaction callback called when colliding with the rigid bodies.-Vincent

I found the problem.hkpMeshMaterial has 1 member: "m_filterInfo"This value is never set to 0 on initialisation. As far as i know this m_filterInfo is not used for collision detection.But appearently it sometimes somehow is according to havok since only some materials fail to detect the collision.Anyway, i put the m_filterInfo on 0 in the constructor of my derived class fromhkpMeshMaterial and that solves the problem.For your info, it actually happens only when a secondary class inherits from the already derived class thus:gameMaterial -> derives from -> uniformMaterial -> derives fromhkpMeshMaterialAnyway, the gameMaterial is completely empty class so it cannot be an application error. It probably has to do with how havok handles virtual tables or its memory.reagards, bk

Leave a Comment

Please sign in to add a comment. Not a member? Join today