liyunfan1223 / mod-playerbots

AzerothCore Playerbots Module
https://discord.gg/NQm5QShwf9
GNU Affero General Public License v3.0
245 stars 139 forks source link

worldserver crash, can't set random bot accounts to 0 #529

Open Grimfeather opened 3 weeks ago

Grimfeather commented 3 weeks ago

Describe the bug

AiPlayerbot.RandomBotAccountCount = 0 AiPlayerbot.MinRandomBots = 0 AiPlayerbot.MaxRandomBots = 0

With these settings the worldserver doesn't start up anymore. I used to be able to set random bots to zero. but a recent update made this impossible. I was playing with no random bots and only used the alt bots. This should still be possible.

Commit hash AzerothCore rev. af776520dbd5 2024-09-13 17:45:21 +0800 (Playerbot branch) (Win64, Release, Static)

To Reproduce Steps to reproduce the behavior:

  1. set: AiPlayerbot.RandomBotAccountCount = 0 AiPlayerbot.MinRandomBots = 0 AiPlayerbot.MaxRandomBots = 0

  2. start up the server

  3. worldserver will crash after: https://i.gyazo.com/cc39a33fc0e3d983aead7f2cf2003ad1.png

Expected behavior be able to play with 0 random bots, only alt bots.

Desktop (please complete the following information):

noisiver commented 3 weeks ago

Yep, I can confirm this, noticed it a few weeks ago as well.

liyunfan1223 commented 3 weeks ago

Something broken in https://github.com/liyunfan1223/mod-playerbots/pull/500.

JeffreyD68 commented 2 weeks ago

May not be helpful to this thread but anyway, I set the following to 1 and remainder in the playerbot.conf to 0 and the game loads without crashing and I can log into game normally with my characters. I executed Revision's sql that deletes all randombot accounts and confirmed the bots and accounts were gone. I then launched the game. One randombot account is created and populated with randombots and game does not crash.

AiPlayerbot.RandomBotAutologin = 0 AiPlayerbot.RandomBotAccountCount = 1 AiPlayerbot.MinRandomBots = 0 AiPlayerbot.MaxRandomBots = 0

Grimfeather commented 6 days ago

On discord someone provided me with a config file that does start up with the earlier mentioned settings set to 0.

https://www.mediafire.com/file/msc42o6mghb0kup/playerbots.conf/file

I been going over the differences in the config files but haven't yet figured out what exactly is causing the issue.

JeffreyD68 commented 6 days ago

After disabling Randombots by changing the following in Playerbots.conf: AiPlayerbot.RandomBotAutologin = 0 AiPlayerbot.RandomBotAccountCount = 0 AiPlayerbot.MinRandomBots = 0 AiPlayerbot.MaxRandomBots = 0

And changing 1 to 0 in AiPlayerbot.AddClassCommand = 0

My game will load without crashing. Still testing to see if this change causes any other issues. The error I receive before making this change is : Shutdown Code is -1073741819 I searched for what this error might mean and what I found was that this typically indicates an access violation.

Grimfeather commented 3 days ago

that's it Jeffrey found it.

With AddClassCommand set to 1 the worldserver does not start up. with it set to 0 everything is fine.