I have recently caught the following crash in my application:
m_players[0].erase(plr); -- CRASHES HERE
m_players[1].erase(plr);
m_players
is declared as:
set<PlayerPointer> m_players[2];
Visual Studio shows that it is "0xC0000005: Access violation writing location 0x0000000000000024."
Compiler: Visual Studio 2008.
Diassembly: 000000014007AA3B mov rcx,qword ptr [this] (crashed on)
So I'm assuming we're dying because of bad "this", since its a first access to this in that function. But since I watched locals/autos, this doesn't seem to be a bad pointer.
Would be nice to get a hint.