Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exceptions in Sphere console when NPC is stuck #773

Open
a1exp opened this issue Oct 4, 2021 · 7 comments
Open

Exceptions in Sphere console when NPC is stuck #773

a1exp opened this issue Oct 4, 2021 · 7 comments

Comments

@a1exp
Copy link

a1exp commented Oct 4, 2021

I see these exceptions periodically:

14:33:DEBUG:Printing STACK TRACE for debugging purposes.
14:33:DEBUG: __ thread (id) name __ |  # | _____________ function _____________ |
14:33:DEBUG:(02740)          T_Main |  0 |                      CWorld::_OnTick |  
14:33:DEBUG:(02740)          T_Main |  1 |                   CWorldTicker::Tick |  
14:33:DEBUG:(02740)          T_Main |  2 |                       CChar::_OnTick |  
14:33:DEBUG:(02740)          T_Main |  3 |              CChar::NPC_OnTickAction |  
14:33:DEBUG:(02740)          T_Main |  4 |                CChar::NPC_Act_GoHome |  
14:33:DEBUG:(02740)          T_Main |  5 |               CChar::NPC_WalkToPoint |  
14:33:DEBUG:(02740)          T_Main |  6 |               CChar::NPC_Pathfinding |  
14:33:DEBUG:(02740)          T_Main |  7 |                CPathFinder::FindPath | <-- last function call (stack unwinding began here)
14:33:DEBUG:(02740)          T_Main |  8 |                 CPathFinder::FillMap |  
14:33:DEBUG:(02740)          T_Main |  9 |                 CChar::CanMoveWalkTo |  
14:33:DEBUG:(02740)          T_Main | 10 |                CChar::CheckValidMove |  
14:33:DEBUG:(02740)          T_Main | 11 | CServerMapBlockState::CheckTile_Terr |  
14:33:DEBUG:(02740)          T_Main | 12 |              CChar::Stat_GetAdjusted |  
14:33:DEBUG:(02740)          T_Main | 13 |                  CChar::Stat_GetBase |  
14:33:DEBUG:(02740)          T_Main | 14 |                    CChar::r_WriteVal |  
14:33:DEBUG:(02740)          T_Main | 15 |                 CObjBase::r_WriteVal |  
14:33:DEBUG:(02740)          T_Main | 16 |                   CObjBase::r_GetRef |  
14:33:DEBUG:(02740)          T_Main | 17 |                 CScriptObj::r_GetRef |  
14:33:DEBUG:(02740)          T_Main | 18 |             CScriptObj::r_GetRefFull |  
14:33:DEBUG:(02740)          T_Main | 19 |                      CChar::r_GetRef |  
14:33:DEBUG:(02740)          T_Main | 20 |                     CChar::LayerFind |  
14:33:DEBUG:(02740)          T_Main | 21 |                  CExpression::GetVal |  
14:33:DEBUG:(02740)          T_Main | 22 |              CExpression::GetValMath |  
14:33:DEBUG:(02740)          T_Main | 23 |                        CChar::CanSee |  
14:33:DEBUG:(02740)          T_Main | 24 |                    CChar::CanSeeItem |  
14:33:DEBUG:(02740)          T_Main | 25 |                   CScriptObj::r_Verb |  
14:33:DEBUG:(02740)          T_Main | 26 |                     CItem::r_LoadVal |  
14:33:DEBUG:(02740)          T_Main | 27 |         CObjBase::UpdatePropertyFlag |  
14:33:DEBUG:(02740)          T_Main | 28 |                  CExpression::GetVal |  
14:33:DEBUG:(02740)          T_Main | 29 |              CExpression::GetValMath |  
14:33:DEBUG:(02740)          T_Main | 30 |                 CScriptObj::r_GetRef |  
14:33:DEBUG:(02740)          T_Main | 31 |              CExpression::GetValMath |  
14:33:DEBUG:(02740)          T_Main | 32 |                  CExpression::GetVal |  
14:33:DEBUG:(02740)          T_Main | 33 |              CExpression::GetValMath |  
14:33:DEBUG:(02740)          T_Main | 34 |                  CExpression::GetVal |  
14:33:DEBUG:(02740)          T_Main | 35 |              CExpression::GetValMath |  
14:33:DEBUG:(02740)          T_Main | 36 |               CExpression::GetSingle |  
14:33:DEBUG:(02740)          T_Main | 37 |                   CObjBase::r_GetRef |  
14:33:DEBUG:(02740)          T_Main | 38 |                 CScriptObj::r_GetRef |  
14:33:DEBUG:(02740)          T_Main | 39 |               CItem::IsResourceMatch |  
14:33:DEBUG:(02740)          T_Main | 40 |              CExpression::GetValMath |  
14:33:DEBUG:(02740)          T_Main | 41 |                 CScriptObj::r_GetRef |  
14:33:DEBUG:(02740)          T_Main | 42 |        CResourceBase::ResourceGetDef |  
14:33:DEBUG:(02740)          T_Main | 43 | PacketCharacterMove::PacketCharacter |  
14:33:DEBUG:(02740)          T_Main | 44 |                     PacketSend::push |  
14:33:DEBUG:(02740)          T_Main | 45 |          CNetworkOutput::QueuePacket |  
14:33:DEBUG:(02740)          T_Main | 46 | CNetworkOutput::QueuePacketTransacti |  
14:33:DEBUG:(02740)          T_Main | 47 |              CChar::GetNPCBrainGroup |  
14:33:DEBUG:(02740)          T_Main | 48 |               CExpression::GetSingle |  
14:33:DEBUG:(02740)          T_Main | 49 |               CScriptObj::r_WriteVal |  
14:33:DEBUG:(02740)          T_Main | 50 |             CScriptObj::r_GetRefFull |  
14:33:DEBUG:(02740)          T_Main | 51 |                    CClient::r_GetRef |  
14:33:DEBUG:(02740)          T_Main | 52 |                 CScriptObj::r_GetRef |  
14:33:DEBUG:(02740)          T_Main | 53 |                 CObjBase::r_WriteVal |  
14:33:DEBUG:(02740)          T_Main | 54 |               CScriptObj::r_WriteVal |  
14:33:DEBUG:(02740)          T_Main | 55 |             CScriptObj::r_GetRefFull |  
14:33:DEBUG:(02740)          T_Main | 56 |                    CClient::r_GetRef |  
14:33:DEBUG:(02740)          T_Main | 57 |                 CScriptObj::r_GetRef |  
14:33:DEBUG:(02740)          T_Main | 58 |                 CScriptObj::r_GetRef |  
14:33:DEBUG:(02740)          T_Main | 59 |               CScriptObj::r_WriteVal |  
14:33:DEBUG:(02740)          T_Main | 60 |             CScriptObj::r_GetRefFull |  
14:33:DEBUG:(02740)          T_Main | 61 |                      CChar::r_GetRef |  
14:33:DEBUG:(02740)          T_Main | 62 |                   CObjBase::r_GetRef |  
14:33:DEBUG:(02740)          T_Main | 63 |                 CScriptObj::r_GetRef |  
14:33:DEBUG:(02740)          T_Main | 64 |              CExpression::GetValMath |  
14:33:DEBUG:(02740)          T_Main | 65 |              CExpression::GetValMath |  
14:33:DEBUG:(02740)          T_Main | 66 |                  CChar::Stat_GetBase |  
14:33:DEBUG:(02740)          T_Main | 67 |              CExpression::GetValMath |  
14:33:DEBUG:(02740)          T_Main | 68 |                  CExpression::GetVal |  
14:33:DEBUG:(02740)          T_Main | 69 |              CExpression::GetValMath |  
14:33:DEBUG:(02740)          T_Main | 70 |               CExpression::GetSingle |  
14:33:DEBUG:(02740)          T_Main | 71 |               CExpression::GetSingle |  
14:33:DEBUG:(02740)          T_Main | 72 |                   CObjBase::r_GetRef |  
14:33:DEBUG:(02740)          T_Main | 73 |                 CScriptObj::r_GetRef |  
14:33:DEBUG:(02740)          T_Main | 74 |               CExpression::GetSingle |  
14:33:DEBUG:(02740)          T_Main | 75 |               CExpression::GetSingle |  
14:33:DEBUG:(02740)          T_Main | 76 |                   CObjBase::r_GetRef |  
14:33:DEBUG:(02740)          T_Main | 77 |                 CScriptObj::r_GetRef |  
14:33:DEBUG:(02740)          T_Main | 78 |                 CScriptObj::r_GetRef |  
14:33:CRITICAL:"Access Violation" (0x123d1), in ExcType=CSError catched in CChar::Pathfinding() #4 "searching the path"
14:33:DEBUG:'Dyan' point '5199,85,5,0' [0484c5]

At '5199,85,5,0' there is an NPC which cannot pass between two display cases. This is not passable by GM as well by some reason.

I don't think this issue makes any harm in my case except printing error messages, but posting for sphere developers consideration.

image

@Jhobean
Copy link
Contributor

Jhobean commented Oct 4, 2021

Do you have some npc ai enable on the ini?

@a1exp
Copy link
Author

a1exp commented Oct 4, 2021

yes

// NPC AI settings
// NPC_AI_PATH				00001	NPC pathfinding
// NPC_AI_FOOD				00002	NPC food search (objects + grass)
// NPC_AI_EXTRA				00004	NPC magics, etc
// NPC_AI_ALWAYSINT			00008	Always be as smart as possible with pathfinding
// NPC_AI_INTFOOD			00010	NPC food search (more intelligent and trusworthy)
// NPC_AI_COMBAT			00040	Look for friends in combat
// NPC_AI_VEND_TIME			00080	vendors closing their shops at nighttime
// NPC_AI_LOOTING			00100	loot corpses an the way
// NPC_AI_MOVEOBSTACLES		00200	if moveable items block my way, try to move them
// NPC_AI_PERSISTENTPATH	00400	NPC will try often to find a path with pathfinding
// NPC_AI_THREAT			00800	Enable the use of the threat variable when finding for target while fighting.
NPCAI=01|08|040|0400|0800

@Jhobean
Copy link
Contributor

Jhobean commented Oct 4, 2021

If you have time and are able reproduce easily, will be interesting to know witch npc AI generate this. You could inactive some of them to test. Probably 01 or 0800

@a1exp
Copy link
Author

a1exp commented Oct 4, 2021

I will try, by some reason it happens on a live shard (8-14 times a day, 2 NPCs are logged, another one cannot access their spawn point as well) but does not happen on home sphere with the same save files.

@a1exp
Copy link
Author

a1exp commented Oct 5, 2021

@Jhobean

  1. removed 0400 - no chage
  2. removed 08 - no change
  3. removed 01 - error messages are not reproduced during 7h already, so NPC_AI_PATH might be the flag which was causing this issue.

@cbnolok
Copy link
Contributor

cbnolok commented Jul 31, 2024

Is this still happening?

@cbnolok cbnolok added this to the X1.1 milestone Sep 10, 2024
@Soulless-1
Copy link
Contributor

i recently had this within the last couple months. and i found that it was an NPC trying to move into a boat region but could not. i wasnt able to move the NPC at all by '.xmove' or 'teleto' or 'p', the only thing i could do was delete it, and immediately the console errors stopped. perhaps that information is of some help tracking it down

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants