trickerer / Trinity-Bots

NPCBots for TrinityCore and AzerothCore 3.3.5
https://github.com/trickerer/TrinityCore-3.3.5-with-NPCBots/
472 stars 157 forks source link

[AC] [Crash] [Core] World Server crash when logging out with a hidden bot with a pet/minion #859

Closed Zerkenn closed 3 months ago

Zerkenn commented 3 months ago

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

Current behaviour

The world server crashes with a segfault/Assertion Failed when you logout while having a hired bot with a pet and then using the command '.npcbot hide' command.

image

Expected behaviour

No response

Crashlog

No response

Steps to reproduce the problem

1) Hire a hunter bot or warlock bot and wait for it to summon a pet 2) Hide the bot using .npcbot hide 3) Logout and server will segfault/crash

TrinityCore or AzerothCore

AzerothCore

Core rev. hash/commit

AzerothCore rev. 3d00d05f4972+ 2024-08-09 21:27:36 +0000

Operating system

Debian 12

Zerkenn commented 3 months ago

I was able to figure out the issue exist within this function. It seems this gets called on pets/minions when you hide the bots and again on logout.

For a temporary fix on my server I just made it so creature->ToTempSummon())->UnSummon() is always called. This stops the segfault on logout.

image

Thanks for all the work on NPCbots. I hope these details help.

trickerer commented 3 months ago

https://github.com/trickerer/AzerothCore-wotlk-with-NPCBots/commit/b252afc60354319271993a1620e13dcc06011202

trickerer commented 3 months ago

The issue must stay open until main repo receives the changes

trickerer commented 3 months ago

https://github.com/trickerer/Trinity-Bots/commit/dd5e5cf59b39d8254edbf1417a5166251eaa9547