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.
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.
Torque Owner Josh Williams
Default Studio Name