Jump to content

[INCOMPLETE] Assertion failed: npath < m_maxPath DetourPathCorridor.cpp, line 506


Gonan
 Share

Recommended Posts

Assertion failed: npath < m_maxPath, file ..\..\Source\Libraries\RecastNavigation\DetourCrowd\Source\DetourPathCorridor.cpp, line 506

 

I have been trying to change the behaviour in MonsterAI.lua and hit this assertion.

 

I was just running around the map with 9 Crawlers chasing me. I had managed to split them into at least 2 groups and there were about 3 actively chasing me as we were moving away from the other group, which last time I saw them were clambering up the side of a hill.

 

From the log I had running I can say this bit of code was being used in SetMode(mode)

 

elseif self.mode=="chase" then

if self.target~=nil then

System:Print("Follow target "..self.EntityName)

if self.entity:Follow(self.target.entity,self.speed,self.maxaccel) then

if prevmode~="chase" then

self.entity:EmitSound(self.sound.alert)

end

self.followingtarget=true

self.animationmanager:SetAnimationSequence(self.animation.run,0.05,300)

 

else

System:Print("nil target "..self.EntityName)

self.target=nil

self.mode="idle"

return

end

end

 

its only happend once

 

self.EntityName is the name given to the Crawler.

 

The last line in the output log before the assertion was

 

nil target Purple

 

I'm not expecting to be able to recreate it, I will update the report if I do.

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...

I see someone else has also had this assert, however I dont have a reproducible set of circumstances that I can provide for you to re-create. I was just running around for 10 minutes on mountain loop which is a map on the workshop, without killing the crawlers that were following me, and nothing special when the assert happened.

Link to comment
Share on other sites

I found the place in the source of the Detour Library where this occurs. It's idiotic, he should have designed it to accommodate any size path. Let me see what I can do.

 

Reported to Mikko here:

https://groups.google.com/forum/#!topic/recastnavigation/pcGUBAbA0Dk

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Mikko has requested a working example, but I told him no one will give me an example to test.

 

Would you be able to get a full call stack trace and the values of npath & m_maxPath when it triggers?

 

I cannot provide this because my users will not provide a working example for me to test. I only found this by looking for that text in the code.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

I had a look at the corridor code, and can appreciate that its quite complex, my initial thoughts were that the value for m_maxPath had been set to too low a value.

 

MoutainLoop is quite large in the number of details in the landscape. The navmesh takes several minutes to generate.

 

So I was trying to understand the coding, a corridor is created from a starting point to a target, this covers a sequence of polygons. The sequence can change over time, as either end can move.

 

So thinking about only having this happen in the Mountain loop map, where the crawlers were chasing my fps character. And where I can go to places where the navmesh doesnt go, but the crawlers can only stay on the navmesh, until the get to a short range. I was running in a circle around a depression in the ground when the last one occurred, after I had run into the depression. Some of the area is off the navmesh, the crawlers would follow a path on the navmesh, to get as close as the could, then if they were in range, would directly traverse to my position. Would this have added an extra polygon to the corridor, and taken it over the limit on m_maxPath.

 

Compare this with LastOneStandingWins, where I have not seen this happen. 1) the map is much simpler and only takes seconds to build the navmesh, and 2 the only combatants are both using the navmesh to chase each other, and would therefore generally stay on the navmesh, or fall off the edge.

Link to comment
Share on other sites

  • 4 weeks later...
Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...