Armagetron Advanced: a Tron Clone in 3d

Object deletion in OnRoundBegin causes a crash

Reported by Luke-Jr on 2009-03-19
2
Affects Status Importance Assigned to Milestone
Armagetron Advanced
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

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  Edit
Everyone can see this information.

Other bug subscribers