cc9da8374447dc52d0212cd247df0b1b274c84c6
BotAI::~BotAI() was accessing _bot->GetGUID() for blackboard cleanup, but during destruction _bot may be a dangling pointer to already-freed memory. This caused ACCESS_VIOLATION crashes (C0000005) during bot session destruction. The fix uses _cachedBotGuid (captured in constructor) instead, following the same safe pattern already used in UnsubscribeFromEventBuses(). Root cause: Race condition where Player object is destroyed before BotAI destructor completes blackboard cleanup. Evidence from crash logs: - "Removed bot blackboard for Player-1-214CB312020" (hex pointer value) - "AFKSimulator::OnShutdown - Bot AFK simulator shutdown" (empty name) Co-Authored-By: Claude Opus 4.5 <[email protected]> Signed-off-by: luis <[email protected]>
WowCommunityProject
Blizzlike WowCommunity project
Languages
C++
89.3%
C
10.1%
CMake
0.4%