Object deletion in OnRoundBegin causes a crash

Bug #345527 reported by Luke-Jr
2
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

Revision history for this message
Manuel Moos (z-man) wrote :

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.

Changed in armagetronad:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.