Assertion `it != end()' failed in message queue
Bug #1207477 reported by
cghislai
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
High
|
cghislai |
Bug Description
Trying to play empire 2, game crashed on that assertion:
src/logic/
Related branches
Changed in widelands: | |
assignee: | nobody → cghislai (charlyghislain) |
importance: | Undecided → Critical |
importance: | Critical → High |
milestone: | none → build18-rc1 |
Changed in widelands: | |
status: | In Progress → New |
status: | New → Fix Committed |
To post a comment you must log in.
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.