trickerer / Trinity-Bots

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

[AC] [Crash] [Core] Server Crash #487

Closed EvilCalf closed 1 year ago

EvilCalf commented 1 year ago

Thank you helps. Now i change NpcBot.WanderingBots.Continents.Count = 0, and the server is ok. The previous count is 50.

gdb.txt is as follow:

Thread 1 "worldserver" received signal SIGSEGV, Segmentation fault. 0x000000000142db4c in Acore::Assert (file=..., line=, function=..., debugInfo="", message="!level_nodes.empty()", fmtMessage="") at /opt/1/AzerothCore-wotlk-with-NPCBots/src/common/Debugging/Errors.cpp:112 112 Crash(formattedMessage.c_str());

0 0x000000000142db4c in Acore::Assert (file=..., line=, function=..., debugInfo="", message="!level_nodes.empty()", fmtMessage="") at /opt/1/AzerothCore-wotlk-with-NPCBots/src/common/Debugging/Errors.cpp:112

1 0x00000000012c10bf in WanderingBotsGenerator::GenerateWanderingBotToSpawn (this=, spareBotIdsPerClass=std::map with 18 elements = {...}, desired_bracket=, spawns_a=..., spawns_h=..., spawns_n=..., immediate=, bracketEntry=0x0, registry=0x0) at /opt/1/AzerothCore-wotlk-with-NPCBots/src/server/game/AI/NpcBots/botdatamgr.cpp:283

2 0x00000000012be6dd in WanderingBotsGenerator::GenerateWanderingBotsToSpawn (this=, count=, map_id=, team=, immediate=, bracketEntry=, registry=, spawned=) at /opt/1/AzerothCore-wotlk-with-NPCBots/src/server/game/AI/NpcBots/botdatamgr.cpp:521

3 0x000000000129ad8c in BotDataMgr::GenerateWanderingBots () at /opt/1/AzerothCore-wotlk-with-NPCBots/src/server/game/AI/NpcBots/botdatamgr.cpp:1219

4 0x00000000012996a8 in BotDataMgr::LoadNpcBots (spawn=) at /opt/1/AzerothCore-wotlk-with-NPCBots/src/server/game/AI/NpcBots/botdatamgr.cpp:868

5 0x00000000009e08c2 in BotMgr::Initialize () at /opt/1/AzerothCore-wotlk-with-NPCBots/src/server/game/AI/NpcBots/botmgr.cpp:249

6 0x000000000114dbda in World::SetInitialWorldSettings (this=) at /opt/1/AzerothCore-wotlk-with-NPCBots/src/server/game/World/World.cpp:2072

7 0x00000000004423dc in main (argc=, argv=) at /opt/1/AzerothCore-wotlk-with-NPCBots/src/server/apps/worldserver/Main.cpp:309

0 0x000000000142db4c in Acore::Assert (file=..., line=, function=..., debugInfo="", message="!level_nodes.empty()", fmtMessage="") at /opt/1/AzerothCore-wotlk-with-NPCBots/src/common/Debugging/Errors.cpp:112

    formattedMessage = "#", '-' <repeats 70 times>, "#\n \n>> ASSERTION FAILED\n\n# Location '/opt/1/AzerothCore-wotlk-with-NPCBots/src/server/game/AI/NpcBots/botdatamgr.cpp:283'\n# Funct"...

1 0x00000000012c10bf in WanderingBotsGenerator::GenerateWanderingBotToSpawn (this=, spareBotIdsPerClass=std::map with 18 elements = {...}, desired_bracket=, spawns_a=..., spawns_h=..., spawns_n=..., immediate=, bracketEntry=0x0, registry=0x0) at /opt/1/AzerothCore-wotlk-with-NPCBots/src/server/game/AI/NpcBots/botdatamgr.cpp:283

    all_templates = <optimized out>
    spareBotPair = <optimized out>
    cSet = <optimized out>
    bot_class = 16 '\020'
    orig_entry = 70567
    orig_template = <optimized out>
    orig_extras = 0x7fffa97d4128
    bot_faction = 1610
    bot_team = <optimized out>
    bot_spawn_nodes = <optimized out>
    level_nodes = std::vector of length 0, capacity -17591942967488
    spawnLoc = <optimized out>
    bot_template = <optimized out>
    bot_spec = <optimized out>
    bot_data = <optimized out>
    bot_extras = <optimized out>
    beqId = <optimized out>
    g = <optimized out>
    c = <optimized out>
    map = <optimized out>

2 0x00000000012be6dd in WanderingBotsGenerator::GenerateWanderingBotsToSpawn (this=, count=, map_id=, team=, immediate=, bracketEntry=, registry=, spawned=) at /opt/1/AzerothCore-wotlk-with-NPCBots/src/server/game/AI/NpcBots/botdatamgr.cpp:521

    bracket = 8 '\b'
    tries = <optimized out>
    i = <optimized out>
    spawns_a = std::vector of length 53, capacity 80 = {0x7fff8f72a020, 0x7fff8f72a100, 0x7fff8f72a5d0, 0x7fff8f72a640, 0x7fff8f72a790, 0x7fff8f72a870, 0x7fff8f72a8e0, 0x7fff8f72aa30, 0x7fff8f729ed0, 0x7fff8f72b750, 0x7fff8f72b980, 0x7fff8f72bf30, 0x7fff8f72d040, 0x7fff8f72d4a0, 0x7fff8fcc7500, 0x7fff8fcca3d0, 0x7fff8ff82af0, 0x7fff8ff853a0, 0x7fff8ff87240, 0x7fff90064a10, 0x7fff900651f0, 0x7fff90067cd0, 0x7fff90068210, 0x7fff90068280, 0x7fff900682f0, 0x7fff90068360, 0x7fff900683d0, 0x7fff90068520, 0x7fff90068600, 0x7fff90068c90, 0x7fff900697f0, 0x7fff9006a580, 0x7fff9006a900, 0x7fff9006ae40, 0x7fff9006aeb0, 0x7fff9006b070, 0x7fff9006b310, 0x7fff9006f590, 0x7fff90071660, 0x7fff9007c8c0, 0x7fff9007d340, 0x7fff9007dc70, 0x7fff90098e20, 0x7fff900997c0, 0x7fff9009a1d0, 0x7fff900c0330, 0x7fff900e3380, 0x7fff900e6330, 0x7fff900e7440, 0x7fff900e7590, 0x7fff90100b90, 0x7fff90100c00, 0x7fff90102640}
    spawns_h = std::vector of length 18, capacity 80 = {0x7fff8f72bf30, 0x7fff8f72d4a0, 0x7fff8ff82af0, 0x7fff8ff853a0, 0x7fff8ff87240, 0x7fff90064a10, 0x7fff900651f0, 0x7fff90067cd0, 0x7fff90068210, 0x7fff90068280, 0x7fff900697f0, 0x7fff9006b310, 0x7fff9006f590, 0x7fff9007d340, 0x7fff90098e20, 0x7fff900e7590, 0x7fff90100c00, 0x7fff90102640}
    spawns_n = std::vector of length 0, capacity 0
    teamSpareBotIdsPerClass = std::map with 140733193388032 elements<error reading variable: Cannot access memory at address 0x18>
    bracketPcts = {_M_elems = {2349018560, 32767, 18, 0, 0, 0, 0, 50, 0}}
    bots_per_bracket = {_M_elems = {0, 0, 19654236, 0, 4294953493, 4294967295, 20522082, 0, 0}}
    found_maxlevel_node_a = <optimized out>
    found_maxlevel_node_h = <optimized out>
    found_maxlevel_node_n = <optimized out>
    maxof_minclasslvl_nor = 55 '7'
    maxof_minclasslvl_ex = 60 '<'
    total_bots_in_brackets = <optimized out>
    brackets_shuffled = std::vector of length -140736062072896, capacity -140736062072896 = {8 '\b', 5 '\005', 8 '\b', 3 '\003', 7 '\a', 8 '\b', 8 '\b', 5 '\005', 4 '\004', 4 '\004', 8 '\b', 7 '\a', 8 '\b', 2 '\002', 8 '\b', 4 '\004', 8 '\b', 6 '\006', 5 '\005', 4 '\004', 2 '\002', 8 '\b', 2 '\002', 6 '\006', 7 '\a', 8 '\b', 6 '\006', 3 '\003', 3 '\003', 8 '\b', 8 '\b', 7 '\a', 8 '\b', 8 '\b', 8 '\b', 5 '\005', 2 '\002', 6 '\006', 8 '\b', 8 '\b', 8 '\b', 7 '\a', 8 '\b', 5 '\005', 3 '\003', 2 '\002', 8 '\b', 6 '\006', 3 '\003', 4 '\004', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 48 '0', 183 '\267', 193 '\301', 139 '\213', 255 '\377', 127 '\177', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 173 '\255', 222 '\336', 0 '\000', 0 '\000', 24 '\030', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 1 '\001', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 192 '\300', 49 '1', 90 'Z', 173 '\255', 255 '\377', 127 '\177', 0 '\000', 0 '\000', 184 '\270', 168 '\250', 252 '\374', 170 '\252', 255 '\377', 127 '\177', 0 '\000', 0 '\000', 100 'd', 101 'e', 102 'f', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 112 'p', 228 '\344', 158 '\236', 244 '\364', 255 '\377', 127 '\177', 0 '\000', 0 '\000', 192 '\300', 15 '\017', 94 '^', 62 '>', 126 '~', 57 '9', 189 '\275', 190 '\276', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 155 '\233', 185 '\271', 142 '\216', 190 '\276', 126 '~', 57 '9', 189 '\275', 190 '\276', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 155 '\233', 185 '\271', 142 '\216', 190 '\276', 237 '\355', 180 '\264', 177 '\261', 61 '=', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 192 '\300', 15 '\017', 94 '^', 62 '>', 237 '\355', 180 '\264', 177 '\261', 61 '=', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 210 '\322', 141 '\215', 253 '\375', 188 '\274', 67 'C', 204 '\314', 16 '\020', 190 '\276', 81 'Q', 74 'J', 52 '4', 64 '@', 0 '\000', 0 '\000', 0 '\000', 0 '\000', 3 '\003', 0 '\000', 0 '\000', 128 '\200', 0 '\000', 0 '\000', 0 '\000', 0 '\000'...}

3 0x000000000129ad8c in BotDataMgr::GenerateWanderingBots () at /opt/1/AzerothCore-wotlk-with-NPCBots/src/server/game/AI/NpcBots/botdatamgr.cpp:1219

    wandering_bots_desired = 50
    oldMSTime = <optimized out>
    maxbots = 949
    enabledbots = <optimized out>
    spawned_count = <optimized out>

4 0x00000000012996a8 in BotDataMgr::LoadNpcBots (spawn=) at /opt/1/AzerothCore-wotlk-with-NPCBots/src/server/game/AI/NpcBots/botdatamgr.cpp:868

    result = warning: 8143795.209751 RTTI symbol not found for class 'std::_Sp_counted_ptr<ResultSet*, (__gnu_cxx::_Lock_policy)2>'

8143795.209781 warning: 8143795.210072 RTTI symbol not found for class 'std::_Sp_counted_ptr<ResultSet*, (__gnu_cxx::_Lock_policy)2>' 8143795.210104 std::shared_ptr (use count 1, weak count 0) = {get() = 0x7fffa96aeec0} botoldMSTime = index = field =

5 0x00000000009e08c2 in BotMgr::Initialize () at /opt/1/AzerothCore-wotlk-with-NPCBots/src/server/game/AI/NpcBots/botmgr.cpp:249

No locals.

6 0x000000000114dbda in World::SetInitialWorldSettings (this=) at /opt/1/AzerothCore-wotlk-with-NPCBots/src/server/game/World/World.cpp:2072

    mapIds = std::vector of length 135, capacity 256 = {0, 1, 13, 25, 30, 33, 34, 35, 36, 37, 42, 43, 44, 47, 48, 70, 90, 109, 129, 169, 189, 209, 229, 230, 249, 269, 289, 309, 329, 349, 369, 389, 409, 429, 449, 450, 451, 469, 489, 509, 529, 530, 531, 532, 533, 534, 540, 542, 543, 544, 545, 546, 547, 548, 550, 552, 553, 554, 555, 556, 557, 558, 559, 560, 562, 564, 565, 566, 568, 571, 572, 573, 574, 575, 576, 578, 580, 582, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 628, 631, 632, 641, 642, 647, 649, 650, 658, 668, 672, 673, 712, 713, 718, 723, 724}
    startupBegin = <optimized out>
    vmmgr2 = <optimized out>
    server_type = <optimized out>
    realm_zone = <optimized out>
    mmmgr = <optimized out>
    oldMSTime = <optimized out>
    nextGameEvent = <optimized out>
    startupDuration = <optimized out>

7 0x00000000004423dc in main (argc=, argv=) at /opt/1/AzerothCore-wotlk-with-NPCBots/src/server/apps/worldserver/Main.cpp:309

    configFile = filesystem::path "../etc/worldserver.conf" = {[0] = "..", [1] = "etc", [2] = "worldserver.conf"}
    configService = ""
    vm = <incomplete type>
    seed = {_bn = 0x7ffff48d0ae0}
    pidFile = ""
    signals = {impl_ = {service_ = 0x7ffff4887500, implementation_ = {queue_ = {<boost::asio::detail::noncopyable> = {<No data fields>}, front_ = 0x7ffff48d1c30, back_ = 0x7ffff48d1c30}, signals_ = 0x7ffff481f410}, implementation_executor_ = {executor_ = {impl_ = 0x7ffff481f2f0}, has_native_impl_ = false}}}
    worldListener = "death_knight_bot\000ipts\000."
    freezeDetector = std::shared_ptr<FreezeDetector> (empty) = {get() = 0x0}
    cliThread = std::shared_ptr<std::thread> (empty) = {get() = 0x0}
    ioContext = <optimized out>
    opensslHandle = std::shared_ptr<void> (empty) = {get() = 0x0}
    numThreads = <optimized out>
    threadPool = <optimized out>
    sScriptMgrHandle = std::shared_ptr<void> (empty) = {get() = 0x0}
    dbHandle = warning: 8143796.018895 RTTI symbol not found for class 'std::_Sp_counted_deleter<decltype(nullptr), main::$_8, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>'

8143796.018926 warning: 8143796.019160 RTTI symbol not found for class 'std::_Sp_counted_deleter<decltype(nullptr), main::$_8, std::allocator, (gnu_cxx::_Lock_policy)2>' 8143796.019203 std::shared_ptr (use count 1, weak count 0) = {get() = 0x0} sMetricHandle = warning: 8143796.224962 RTTI symbol not found for class 'std::_Sp_counted_deleter<decltype(nullptr), main::$_10, std::allocator, (gnu_cxx::_Lock_policy)2>' 8143796.224989 Python Exception <class 'KeyboardInterrupt'> <class 'KeyboardInterrupt'>:

    mapManagementHandle = <optimized out>
    raAcceptor = <optimized out>
    soapThread = <optimized out>
    worldPort = <optimized out>
    networkThreads = <optimized out>
    sWorldSocketMgrHandle = <optimized out>
    auctionLisingThread = <optimized out>

Id Target Id Frame

Thread 7 (Thread 0x7fffa6fff700 (LWP 2960685)):

0 futex_wait_cancelable (private=, expected=0, futex_word=0x1cb6cd0 <MapMgr::instance()::instance+376>) at ../sysdeps/nptl/futex-internal.h:183

    __ret = -512
    oldtype = 0
    err = <optimized out>
    oldtype = <optimized out>
    err = <optimized out>
    __ret = <optimized out>
    resultvar = <optimized out>
    __arg4 = <optimized out>
    __arg3 = <optimized out>
    __arg2 = <optimized out>
    __arg1 = <optimized out>
    _a4 = <optimized out>
    _a3 = <optimized out>
    _a2 = <optimized out>
    _a1 = <optimized out>

1 __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x1cb6c30 <MapMgr::instance()::instance+216>, cond=0x1cb6ca8 <MapMgr::instance()::instance+336>) at pthread_cond_wait.c:508

    spin = 0
    buffer = {__routine = 0x7ffff726c050 <__condvar_cleanup_waiting>, __arg = 0x7fffa6ffd580, __canceltype = 0, __prev = 0x0}
    cbuffer = {wseq = 0, cond = 0x1cb6ca8 <MapMgr::instance()::instance+336>, mutex = 0x1cb6c30 <MapMgr::instance()::instance+216>, private = 0}
    err = <optimized out>
    g = 0
    flags = <optimized out>
    g1_start = <optimized out>
    signals = <optimized out>
    result = 0
    wseq = 0
    seq = 0
    private = <optimized out>
    maxspin = <optimized out>
    err = <optimized out>
    result = <optimized out>
    wseq = <optimized out>
    g = <optimized out>
    seq = <optimized out>
    flags = <optimized out>
    private = <optimized out>
    signals = <optimized out>
    g1_start = <optimized out>
    spin = <optimized out>
    buffer = <optimized out>
    cbuffer = <optimized out>
    s = <optimized out>

2 __pthread_cond_wait (cond=0x1cb6ca8 <MapMgr::instance()::instance+336>, mutex=0x1cb6c30 <MapMgr::instance()::instance+216>) at pthread_cond_wait.c:647

No locals.

3 0x00007ffff712fe30 in std::condition_variable::wait(std::unique_lock&) () from /lib/x86_64-linux-gnu/libstdc++.so.6

No symbol table info available.

4 0x0000000000ec8546 in ProducerConsumerQueue<UpdateRequest*>::WaitAndPop (this=0x1cb6c30 <MapMgr::instance()::instance+216>, value=@0x7fffa6ffd640: 0x0) at /opt/1/AzerothCore-wotlk-with-NPCBots/src/common/Threading/PCQueue.h:83

    lock = {_M_device = 0x1cb6c30 <MapMgr::instance()::instance+216>, _M_owns = true}

5 0x0000000000ec7fc7 in MapUpdater::WorkerThread (this=0x1cb6c30 <MapMgr::instance()::instance+216>) at /opt/1/AzerothCore-wotlk-with-NPCBots/src/server/game/Maps/MapUpdater.cpp:152

    request = 0x0

6 0x00007ffff7135de4 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6

No symbol table info available.

7 0x00007ffff7265609 in start_thread (arg=) at pthread_create.c:477

    ret = <optimized out>
    pd = <optimized out>
    unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140735995180800, 3603214113396829353, 140737488342526, 140737488342527, 140737488342528, 140735995172672, -3603304274115613527, -3603198106783241047}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
    not_first_call = 0

8 0x00007ffff6e22133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

No locals. Quit

EvilCalf commented 1 year ago

I aslo change NpcBot.WanderingBots.Continents.Levels = 0,0,10,10,10,10,10,10,40

trickerer commented 1 year ago

There are no wander nodes for brackets 70-79 and 80.

EvilCalf commented 1 year ago

So i must set NpcBot.WanderingBots.Continents.Levels 70-79 and 80. =0,0 ? Does this means that there are no wander bots in these two levels of regions.

trickerer commented 1 year ago

This is exactly what I said

trickerer commented 1 year ago

https://github.com/trickerer/AzerothCore-wotlk-with-NPCBots/commit/d6ff6f3359e54f723f53c8546e65b5dcccc1bfbf will fix that