All of our buildable objects - detpack, dispenser, sg - run the code below
when they explode. The detpack is a "real" physics object (as in it uses
VPhysicsInitNormal()) and I'm assuming your hat you describe is vphysics as
well.
void CFFBuildableObject::Explode( void )
{
VPROF_BUDGET( "CFFBuildableObject::Explode",
VPROF_BUDGETGROUP_FF_BUILDABLE );
// MUST DO THIS or CreateExplosion crashes HL2
m_takedamage = DAMAGE_NO;
// Remove bounding box (other models follow this pattern...)
SetSolid( SOLID_NONE );
// Do the explosion
DoExplosion();
// Notify player to tell them they can build
// again and remove current owner
m_hOwner = NULL;
// Remove entity from game
UTIL_Remove( this );
}
And that's it. There's also a method for 'quietly' removing a buildable
object (like when dismantling) but it's the same code minus the
DoExplosion() call.
Anyway, we've never experienced/received minidumps from people w/ weird
physics related errors so perhaps you need some other steps in addition to
using UTIL_Remove().
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of A.Oliver
Sent: Monday, December 24, 2007 08:09
To: [email protected]
Subject: [hlcoders] Physics crash related (urgent).
This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
Our recently released modification (Fistful of Frags) is suffering some
stability issues. Hope someone can bring some light to these serious servers
crashes. I posted another similar issue in this list, and as I said before,
I never modified any part of the physics code. Now I'm starting to
understand what's going on, seems like a physic entity was removed, but
server is still trying to use it so finds a null pointer and crashes. Is
that rigth?
These issues were noticed only during maximum stress, once the mod was
released. They may happen rarely or not, depends the way physics are
stressed I guess.
I'm using UTIL_Remove in several parts of the game, example: a cowboy hat is
created (falls to ground), and after some seconds is deleted. There are
other items deleted in a similar way. Should I use other method different
from UTIL_Remove?
And a last question. Can server performance ( low FPS) make these issues
worse? Because they tend to happen more in our own server, which sometimes
is even below 10 FPS.
Hope this helps, these are 3 different call stacks we are seeing repitedly.
If you need any other info plz let me know.
> server.dll!AllocTouchLink() Line 361 + 0x41 bytes C++
server.dll!CBaseEntity::PhysicsMarkEntityAsTouched(CBaseEntity *
other=0x0d21e300) Line 850 + 0x5 bytes C++
server.dll!CBaseEntity::PhysicsMarkEntitiesAsTouchingEventDriven(CBaseEntity
* other=0x00000000, CGameTrace & trace={...}) Line 908 C++
server.dll!CCollisionEvent::DispatchStartTouch(CBaseEntity *
pEntity0=0x0d21e300, CBaseEntity * pEntity1=0x0fdf0dd8, const Vector &
point={...}, const Vector & normal={...}) Line 1567 + 0x8c bytes C++
server.dll!CCollisionEvent::UpdateTouchEvents() Line 1590 C++
server.dll!PhysFrame(float deltaTime=0.015000000) Line 1262 + 0xa bytes
C++
server.dll!CPhysicsHook::FrameUpdatePostEntityThink() Line 271 C++
server.dll!InvokePerFrameMethod(void (void)* f=0x22198170, const char *
timed=0x2217be3f) Line 431 C++
server.dll!CServerGameDLL::GameFrame(bool simulating=true) Line 1001 +
0x14 bytes C++
---------
> server.dll!CCollisionEvent::UpdateDamageEvents() Line 1624 + 0x8 bytes
C++
server.dll!CCollisionEvent::PostSimulationFrame() Line 1499 C++
server.dll!PhysFrame(float deltaTime=0.015000000) Line 1206 C++
server.dll!CPhysicsHook::FrameUpdatePostEntityThink() Line 271 C++
server.dll!InvokePerFrameMethod(void (void)* f=0x22198170, const char *
timed=0x2217be3f) Line 431 C++
server.dll!CServerGameDLL::GameFrame(bool simulating=true) Line 1001 +
0x14 bytes C++
---------
server.dll!CBaseEntity::TakeDamage(const CTakeDamageInfo &
inputInfo={...}) Line 1204 + 0xd bytes C++
server.dll!CCollisionEvent::UpdateDamageEvents() Line 1642 C++
server.dll!CCollisionEvent::PostSimulationFrame() Line 1499 C++
server.dll!PhysFrame(float deltaTime=0.015000000) Line 1206 C++
> server.dll!CPhysicsHook::FrameUpdatePostEntityThink() Line 271 C++
server.dll!InvokePerFrameMethod(void (void)* f=0x22198420, const char *
timed=0x2217bddf) Line 431 C++
server.dll!CServerGameDLL::GameFrame(bool simulating=true) Line 1001 +
0x14 bytes C++
--
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders