Crash in Vector<T>::push_back
by Ian Omroth Hardingham · in Torque Game Engine · 03/01/2010 (5:18 am) · 2 replies
Hey guys.
Very worrying crash in dRealloc when calling push_back on a vector. This is an intermittent bug. Any advice?
Thanks,
Ian
Very worrying crash in dRealloc when calling push_back on a vector. This is an intermittent bug. Any advice?
Thanks,
Ian
About the author
Designer and lead programmer on Frozen Synapse, Frozen Endzone, and Determinance. Co-owner of Mode 7 Games.
#2
03/02/2010 (8:01 pm)
The only time I've seen a problem with Vector::push_back is if the value you are pushing is already in the vector. If the vector memory is resized, the reference passed to push_back is now invalid and you get a crash when trying to assign the new value.
Torque Owner Daniel Buckmaster
T3D Steering Committee
I dunno, I've never seen crashes related to vectors unless I'm doing something silly. Any more information you can give us?