Comment 1 for bug 1207477

Revision history for this message
cghislai (charlyghislain) wrote :

So this happen when a message is added with a timeout, so a CmdExpire is sent for when the timeout will run off. Then the building associated is destroyed, and a CmdExpire for that message is sent directly. When the CmdExpire for the timout will be executed, the message is not present anymore.

There are different possible fixes.
Either the destroyed signal is connected to a new slot that will remove the pending CmdExpire. That involves new method in the cmdqueue, and I need to ensure that the cmd is not sent over the network or to the replay writer before it is executed.
Either, upon object removal, I parse all command and remove any pending cmdexpire. This also involve new functionnality in the queue and extra care for game synching.
Either any pending cmd expire for the same object is removed in the command execution itself. Synching won't be an issue here.
Either i remove that assert and assume that if message is not present it was already expired. That's the easy fix but it does not sound bad to my hears.