Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Novalmauge causes server crash due to pathing. #493

Open
2 tasks done
tankfest opened this issue Apr 13, 2020 · 4 comments
Open
2 tasks done

Novalmauge causes server crash due to pathing. #493

tankfest opened this issue Apr 13, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@tankfest
Copy link
Contributor

tankfest commented Apr 13, 2020

I have:

  • searched existing issues (http://project-topaz.com/issues/) to see if the issue has already been opened
  • checked the commit log to see if the issue has been resolved since my server was last updated

Additional Information (Steps to reproduce/Expected behavior) :
Novalmauge has crashed our server 3-4 times before I finally caught him doing it with VS's debugger. It has to do with his pathfinding, when I disabled that, he no longer causes crashes. Unfortunately the callstack that told me the specifics is long lost. The crashes occurred when players would stop him to turn in his various quests.

I believe this issue is related to #319

@kaincenteno
Copy link
Contributor

npc pathin is just broken 😢 if it ever gets fixed it would be awesome. Also there are some npc pathing that currently work but that they are all hacky as they have a series of coordinates to make them seem retail accurate so they don't slide.

would be awesome if they npc pathing gets fixed.

@ibm2431 ibm2431 added the bug Something isn't working label Apr 13, 2020
@TeoTwawki
Copy link
Contributor

wait() can trigger crashes, so its any roaming NPC that uses that command to stop moving when a player clicks on it.

copy pasta from previous discussions:

/************************************************************************
*  Function: wait()
*  Purpose : Makes a non-PC inactive for a set amount of time
*  Example : npc:wait(10000) -- wait 10 seconds
*  Notes   : Default is 4 seconds unless specified in ms
************************************************************************/

inline int32 CLuaBaseEntity::wait(lua_State* L)
{
    DSP_DEBUG_BREAK_IF(m_PBaseEntity->objtype == TYPE_PC);

    CBattleEntity* PBattle = (CBattleEntity*)m_PBaseEntity;

    int32 waitTime = 4000;

    if (lua_isnumber(L, 1))
    {
        waitTime = (int32)lua_tonumber(L, 1);
    }
    PBattle->PAI->Inactive(std::chrono::milliseconds(waitTime), true);

    return 0;
}

This is the version of wait NPC's use. The mob AI controller has a diff version that involves the server tick. I do not think we should be expecting this to work with wait(0) nor expecting a behavior of "keep waiting until event ends" which is how it was being used.

I think we need to do something different at the core to genuinely do "wait till my event ends".

@ghost
Copy link

ghost commented May 1, 2020

Hello! Seems to be related to this old one too: #186.

@TeoTwawki
Copy link
Contributor

Note of clarification since #186 deals with 2 issues: #186 mistakenly thought the navmesh errors were related to the crash. wait() caused the crash, and navmesh error spam was due to an entity not finding its next path node. Comment replies on #186 mainly address the navmesh errors. I think there are a few more related issues to both wait and navmesh as well if all the old dsp issues were migrated.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants