Excellent!  This was frustrating me to no end.  I've simply been trying to
tell if a player is connected or not.  As you have indicated, when a player
disconnects, the pointer is still valid or not null.  I'll stick the
FREE_PRIVATE(pClient) in the clientDisconnect function and see if it doesn't
clear things up.

---
James Couzens
ClanMod Dev Team
WWW: http://unitedadmins.com/clanmod.php
UA LISTS: http://list.unitedadmins.com/mailman/listinfo

----- Original Message -----
From: "matthew lewis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, June 08, 2003 7:58 PM
Subject: [hlcoders] SDK line crashing linux servers


This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
The problem is that the CBasePlayerClass memory has been released, but the
pointer is still around. This typically happens when you have entities owned
by a player that disconnects unexpectantly. The entity then tries to
reference the now invalid player using the old pointer and the result is a
core dump.

This is an old pet peave I've had with Valve for a long time in that there
is no definitive call to the engine to ask if a player is fully connected.

There is one other thing that will cause problems that you shoud be aware
of. I'm assuming that since your asking if the player is a net client that
you're trying to tell a player from a bot. You should know that the bot's
private data is a different size than a normal player. But the engine fails
to free the private data when a bot or player disconnects and instead tries
to reuse it. This causes all sorts of strange behaviour and mysterious
crashing when running bots. Make sure you call "FREE_PRIVATE(pClient)" at
the end of  the CHalflifeMultiplay::ClientDisconnect() routine to prevent
this from happening.
--

_______________________________________________
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

Reply via email to