beo6 Posted December 10, 2023 Share Posted December 10, 2023 When i created a NavMesh and resize it by changing the Tiles, it crashes the Editor with the following Error: Steps to reproduce: - Create a Terrain - Create a Navmesh - Go to "Map" Tab and select Navigation Mesh - Resize Tiles X or Y via the up arrow. - Resize Tiles X or Y via entering a value directly Quote Link to comment Share on other sites More sharing options...
Josh Posted December 10, 2023 Share Posted December 10, 2023 thanks for reporting this Quote 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 December 10, 2023 Share Posted December 10, 2023 I am having trouble reproducing this error. I tried with both 0.9.1 and 0.9.2 and everything worked as expected. Quote 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 December 10, 2023 Share Posted December 10, 2023 I suspect you are using version 0.9.0. There was a change at some point that changed the way the Navmesh creation parameters work, in part to prevent the user from being able to input invalid values. If you are using 0.9.0, you can uninstall the engine, switch to the "stable" channel, and install that to get the latest stable build. Quote 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...
beo6 Posted December 11, 2023 Author Share Posted December 11, 2023 No. I am running 0.9.2 I just updated to Build 309 to see if i can still reproduce, and sure enough, it still crashes. Even without a Terrain btw. Just had to press the arrows for the TIles, Change the value to a higher one for X and then for Y. and then = Crash. I guess there is an issue when switching between using the arrows and entering a higher value directly. Not sure. Quote Link to comment Share on other sites More sharing options...
Josh Posted December 11, 2023 Share Posted December 11, 2023 Can you post a video showing what you are doing? You can use OBS Studio to capture your desktop. Quote 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...
SpiderPig Posted December 11, 2023 Share Posted December 11, 2023 I tried this as well and only got it to crash when I entered a value of 2048 for the x tile. Quote Link to comment Share on other sites More sharing options...
beo6 Posted December 12, 2023 Author Share Posted December 12, 2023 Here is a video. crashing sometimes happen on the first try to enter via keyboard, sometimes the second. but its 100% reproducible. I hope that helps. 1 Quote Link to comment Share on other sites More sharing options...
Josh Posted December 12, 2023 Share Posted December 12, 2023 You are triggering an error in the navtile generation routine. I added some more checks to find out which one: if (dtStatusFailed(status)) { if (DT_WRONG_MAGIC & status) Print("Error: Input data is not recognized"); if (DT_WRONG_VERSION & status) Print("Error: Input data is in wrong version"); if (DT_OUT_OF_MEMORY & status) Print("Error: Operation ran out of memory"); if (DT_INVALID_PARAM & status) Print("Error: An input parameter was invalid"); if (DT_BUFFER_TOO_SMALL & status) Print("Error: Result buffer for the query was too small to store all results"); if (DT_OUT_OF_NODES & status) Print("Error: Query ran out of nodes during search"); if (DT_PARTIAL_RESULT & status) Print("Error: Query did not reach the end location, returning best guess"); if (DT_ALREADY_OCCUPIED & status) Print("Error: A tile has already been assigned to the given x,y coordinate"); RuntimeError("Could not init navmesh (" + String(status) + ")"); } But the underlying issue is probably that 60 x 70 x 32 is too big. 60 * 70 * 32 = 134400 134400 * 134400 = 18,063,360,000 Quote 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 December 12, 2023 Share Posted December 12, 2023 The error I am getting is "An input parameter was invalid"... Quote 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 December 12, 2023 Share Posted December 12, 2023 Digging way down into this here is where the error occurs: m_saltBits = dtMin((unsigned int)31, 32 - m_tileBits - m_polyBits); if (m_saltBits < 10) return DT_FAILURE | DT_INVALID_PARAM; Calculation of the parameters is as follows: params.maxTiles = navmesh->tilecount.x * navmesh->tilecount.y; params.maxPolys = MAX_POLYS_PER_TILE; Quote 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 December 12, 2023 Share Posted December 12, 2023 Here is how the Recast demo does it: https://github.com/recastnavigation/recastnavigation/blob/ddaa361b0893ddc7602a3bd5c20ad2cfd0a8df7c/RecastDemo/Source/Sample_TileMesh.cpp#L254 Quote 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...
Solution Josh Posted December 12, 2023 Solution Share Posted December 12, 2023 Okay, I updated the dev channel with a build of the editor that uses the calculations from the link above for the parameters and it seems to work. C++ lib and Lua exes are not updated yet, but I think this particular issue is solved. 1 Quote 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...
beo6 Posted December 13, 2023 Author Share Posted December 13, 2023 Seems better. I still managed to crash it once, but that was probably because of a way too high value on terrain, since it just closed this time without any error message. But without terrain, it did not crash on me anymore. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.