agathoandClaude Opus 4.5 b60bcc4c91 fix(eventbus): Fix use-after-free crash in DispatchEvent (line 741)
ROOT CAUSE: The crash occurred when dispatching events to handlers that
had been deleted between validation and dispatch. This was triggered when
Arathi Basin battleground ended - players are removed and their BotAI
objects deleted while events are still being dispatched.

The previous validation at line 730 only checked if the GUID existed in
_subscriberPointers, but did NOT validate that the pointer was still the
same. This allowed three failure modes:
1. Bot unsubscribed (GUID removed) - correctly skipped
2. Bot deleted and REPLACED with new bot at same GUID - dispatched to WRONG object!
3. Bot deleted but GUID not yet removed from map - dispatched to FREED memory! (CRASH)

SOLUTION: Store the original BotAI* pointer alongside the handler and validate
BOTH GUID existence AND pointer match during the second validation pass.
This catches cases 2 and 3 where the underlying object has changed.

Changes:
- handlersToDispatch now stores struct with {guid, botAI*, handler*}
- Validation now checks: it->second == info.botAI (pointer match)
- Added catch(...) block to catch any remaining edge cases

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-02 13:45:31 -03:00
2026-01-20 21:24:33 -03:00
2026-01-28 18:45:01 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:29:54 -03:00
2026-01-20 21:29:54 -03:00
2026-01-20 21:33:16 -03:00
2026-02-02 00:47:02 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:25:30 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:27:50 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:28:45 -03:00
2026-01-20 21:29:54 -03:00
2026-01-20 21:29:54 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:14:35 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-30 20:37:05 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:33:16 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00
2026-01-20 21:37:09 -03:00

WowCommunityProject

Blizzlike WowCommunity project

S
Description
No description provided
Readme
308 MiB
Languages
C++ 89.3%
C 10.1%
CMake 0.4%