Bug 2732 - ClientSpawn: spawn is NULL
Status: RESOLVED FIXED
Alias: None
Product: Tremulous
Classification: Unclassified
Component: Misc
Version: unspecified
Hardware: All All
: P2 normal
Assignee: Tim Angus
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2006-06-04 14:17 EDT by Tony J. White
Modified: 2006-07-31 17:41:58 EDT
0 users

See Also:


Attachments
reset class before calling ClientSpawn() in respawn() (377 bytes, patch)
2006-06-17 16:20 EDT, Tony J. White

Description Tony J. White 2006-06-04 14:17:37 EDT
After about a week of uptime, my server crashed with this message.  I don't know how to reproduce yet.

ClientSpawn() is often called with spawn as NULL, but will only die with this error if the entity spawning has sessionTeam != TEAM_SPECTATOR.
Comment 1 Tony J. White 2006-06-17 16:20:53 EDT
Created attachment 939 [details]
reset class before calling ClientSpawn() in respawn()


I'm currently testing this patch.  It just set's the classSelection to PCL_NONE 
in the respawn() function.  There are apperantly certain cases that can cause 
respawn() to be called either from ClientThink_real() and/or BeginIntermission() 
while the client has a class selected, which causes this crash.

I haven't yet found the exact case that causes this, but as far as I can tell, 
when respawn() is called the client is not supposed to have a class selected
so this patch should be OK.  I'll report back after a couple weeks of testing.

(see also bug 2750 )
Comment 2 Tim Angus 2006-07-10 08:35:18 EDT
With the absence of any further cursing and so on, should I assume that this patch fixes the bug?

AKKA's recent downtime was due to this bug, and nobody noticing it had crashed.
Comment 3 Tony J. White 2006-07-10 12:53:47 EDT
(In reply to comment #2)
> With the absence of any further cursing and so on, should I assume that this
> patch fixes the bug?
> 
> AKKA's recent downtime was due to this bug, and nobody noticing it had crashed.
> 

Yes, the proposed patch seems to prevent the crash.