Gonan Posted December 2, 2014 Share Posted December 2, 2014 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 More sharing options...
Gonan Posted December 2, 2014 Author Share Posted December 2, 2014 It happened again, I had been kiting them around for about 10 minutes. My logic isn't letting them hit me at the moment, I'm just testing the navigation logic. Checked memory only used 508.3MB. Link to comment Share on other sites More sharing options...
Josh Posted December 20, 2014 Share Posted December 20, 2014 If you can provide an example that produces this error I will debug, but first I have to be able to create the problem. 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 More sharing options...
Gonan Posted January 10, 2015 Author Share Posted January 10, 2015 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 More sharing options...
Josh Posted January 10, 2015 Share Posted January 10, 2015 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 More sharing options...
Josh Posted January 10, 2015 Share Posted January 10, 2015 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 More sharing options...
TattieBoJangle Posted January 10, 2015 Share Posted January 10, 2015 i will try and get the error back and send it to you Josh 1 Asus Extreme v x99, Intel I7, Windows 8.1 64 Bit, SSD, Geforce GTX 980 4GB, 16GB Ripjaw DDR4 Link to comment Share on other sites More sharing options...
Gonan Posted January 11, 2015 Author Share Posted January 11, 2015 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 More sharing options...
Josh Posted February 3, 2015 Share Posted February 3, 2015 I cannot investigate this problem without the files to produce it. 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 More sharing options...
Recommended Posts