5eeaa84d8c49d1c0ad0b7f63805271503bbf04bb
Previous implementation validated handlers with lock held, then released the lock before dispatching. This created a race window where another thread could delete the BotAI between validation and dispatch, causing ACCESS_VIOLATION crash. Windows SEH exceptions (like access violations) are NOT caught by C++ catch(...), so the server crashes immediately. Fix: Hold the recursive mutex during dispatch. This is safe because: 1. _subscriptionMutex is recursive - handlers can call Unsubscribe() 2. Single lock acquisition for entire dispatch phase 3. No race window between validation and dispatch 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%