Game Development Community

Update: Fixed! RTSConnection::onDisconnect() never called

by Stephen Zepp · in RTS Starter Kit · 12/03/2004 (3:26 am) · 3 replies

Priority: High
Category: Improper functionality in all configurations, Crash to desktop with some modifications
Reproducable: Yes

Summary: The RTS specific onDisconnect method is never called when a player disconnects from game (in all configurations). In stock RTS SK, this can cause several issues with cleaning up the server, from missing objects for script function calls to possible memory leaks. Please refer to the ongoing discussion Here. To summarize that discussion as it stands currently, tracing the call sequence for a player disconnect is implying that the server code does not recognize the connection as an RTSConnection during the sequence, and therefore never executes the inherited version of the code, but executes the GameConnection::onDisconnect() directly.

In slightly modified code, this can cause a crash with any implementation that relies on the actions performed during client disconnect, namely visManager::handleConnectionDrop(), which is called by RTSConnection::onDisconnect(). This follow up method handles cleaning up the visManager's units (including setting their controlling connections to NULL)

Fix: No known fix is available at this time. Since this is "new territory" ((inheriting from GameConnection), most of the community is unsure how to properly have this portion of the player disconnect sequence occur properly.

Status: Awaiting further community research (I'm stuck at this point myself), and hopefully GG review.

#1
12/06/2004 (4:19 pm)
Thanks for the detailed report(s) Stephen. We are exceptionally pressed-for-time right now and in the coming couple weeks. So, I know we'll all appreciate your patience, and we can take a look at this as soon as possible. Thank you again for the report. Again, I wish we could clone ourselves so that we could offer more attention to reports like this immediately upon receiving. But, we'll do our best, given the current state of genetic science and legalities.
#2
12/07/2004 (11:20 am)
Bug fixed: see Pat Wilson's explanation in This Thread (near the bottom).
#3
12/10/2004 (3:32 am)
Pat rocks. And thanks for sync'ing the threads Stephen.