π Description
My worldserver is crashing with an ACCESS_VIOLATION caused by Trinity::Assert in irand (Random.cpp:42). The crash happens when PlayerBotSession::ProcessOnline (PlayerBotSession.cpp:307) calls irand(min, max) with min > max, which triggers the assert.
Using your compiled build
The crash occurs even when no player bots are visible in the world. The server automatically creates background bot sessions (e.g., PLAYERBOT81, PLAYERBOT21), and any of them can cause this crash.
I looked at the crash dump with AI assistance:
In irand, the assertion ASSERT(max >= min) fails because min is greater than max.
The references to BotGlobleSchedule and PlayerBotCharBaseInfo show "Unable to read memory", so the schedule data might be uninitialized or corrupted.
There are no schedule tables in the database (schedule or playerbot*), so the intervals are probably generated in code.
Suggested code fixes (from AI analysis):
Check how BotGlobleSchedule is initialized for auto-created bots. Some fields may be left zero or undefined.
Add a guard before calling irand, for example in PlayerBotSession::ProcessOnline:
cpp
if (min > max) {
TC_LOG_ERROR("playerbot", "Invalid irand range: min=%d, max=%d", min, max);
min = max; // or skip the action
}
Add logging in the code that calculates the min/max values to find where invalid numbers come from.
Unfortunately I can't rebuild the server myself β I don't have the technical skills for that. It would be awesome if you could send me another build, bro! Same as before β no need to include the generated maps, I already have them. We're almost there! β€οΈ
unknown_worldserver.exe_[26-5_13-44-51].txt
π Description
My worldserver is crashing with an ACCESS_VIOLATION caused by Trinity::Assert in irand (Random.cpp:42). The crash happens when PlayerBotSession::ProcessOnline (PlayerBotSession.cpp:307) calls irand(min, max) with min > max, which triggers the assert.
Using your compiled build
The crash occurs even when no player bots are visible in the world. The server automatically creates background bot sessions (e.g., PLAYERBOT81, PLAYERBOT21), and any of them can cause this crash.
I looked at the crash dump with AI assistance:
In irand, the assertion ASSERT(max >= min) fails because min is greater than max.
The references to BotGlobleSchedule and PlayerBotCharBaseInfo show "Unable to read memory", so the schedule data might be uninitialized or corrupted.
There are no schedule tables in the database (schedule or playerbot*), so the intervals are probably generated in code.
Suggested code fixes (from AI analysis):
Check how BotGlobleSchedule is initialized for auto-created bots. Some fields may be left zero or undefined.
Add a guard before calling irand, for example in PlayerBotSession::ProcessOnline:
cpp
if (min > max) {
TC_LOG_ERROR("playerbot", "Invalid irand range: min=%d, max=%d", min, max);
min = max; // or skip the action
}
Add logging in the code that calculates the min/max values to find where invalid numbers come from.
Unfortunately I can't rebuild the server myself β I don't have the technical skills for that. It would be awesome if you could send me another build, bro! Same as before β no need to include the generated maps, I already have them. We're almost there! β€οΈ
unknown_worldserver.exe_[26-5_13-44-51].txt