Bug 3585 - recursive error after server disconnect
Status: RESOLVED FIXED
Alias: None
Product: ioquake3
Classification: Unclassified
Component: Misc
Version: GIT MASTER
Hardware: All All
: P3 normal
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL:
: 3706
Depends on:
Blocks:
 
Reported: 2008-03-30 11:18 EDT by /dev/humancontroller
Modified: 2008-07-01 16:36:52 EDT
1 user (show)

See Also:



Description /dev/humancontroller 2008-03-30 11:18:43 EDT
There's some bad behaviour introduced in r1274. When a server stops serving, all r1274+ clients will suffer a recursive error, a soft crash. Here's a technical description:

- ioq3, svn head, etc. is connected to a remote server
- the server decides to do a /disconnect or a /quit

- inside a normal VM_Call() to cgame...
- in the snapshot functions, CG_ExecuteNewServerCommands() handles every reliable server command
- for each, trap_GetServerCommand() is called
- which, through the syscall callback code, turns into a call to CL_GetServerCommand()
- that function recognizes the "disconnect" server command, and executes Com_Error() with ERR_SERVERDISCONNECT (note: com_errorEntered is set to true)
- in that sutiation, CL_FlushMemory() is called
- we don't have a server running, so we do a Hunk_Clear()
- there, VM_Clear() clears all the VMs via VM_Free()
- since the cgame is still running (vm->callLevel > 0), Com_Error() is called again, this time with ERR_FATAL
- that's our second error so far (com_errorEntered is true), so Sys_Error() shuts down the program
Comment 1 Ludwig Nussel 2008-03-30 14:38:11 EDT
Hmm, I feared that something like that would happen. I guess it's ok to reset vm->callLevel in this case as the program flow doesn't return into the destroyed vm but instead longjmp jumps to a safe place.
Comment 2 Ludwig Nussel 2008-04-06 09:01:31 EDT
fixed in svn 1300
Comment 3 Amanieu d'Antras 2008-07-01 16:36:52 EDT
*** Bug 3706 has been marked as a duplicate of this bug. ***