Object deletion in OnRoundBegin causes a crash
Bug #345527 reported by
Luke-Jr
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Armagetron Advanced |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
This occurs when fortress zones are "extra"
It is a result of my adding OnBorn (via EnsureBorn) events. Not sure how to detect the object having been deleted :(
See gGame.cpp line 2761
Related branches
To post a comment you must log in.
Three ways around it:
1. store the eGameObject in question in a smart pointer, not a plain pointer. Then it won't get deleted in between. That's what I'll commit.
2. Iterate twice, first calling OnRoundBegin, then EnsureBorn
3. Get rid of OnRoundBegin. It was only added for the fortress teamfinding step which can just as well happen in OnBirth.