Search Issue Tracker

Fixed in 2021.2.X

Fixed in 2019.4.X, 2020.3.X, 2021.1.X

Votes

0

Found in

2019.4.9f1

2020.1

2020.2

2021.1

Issue ID

1298211

Regression

No

Crash on (UnityPlayer) UnityMain WorldToTile() when using NavMesh Agents

AI Navigation

-

How to reproduce:
1. Open the project from edit "NavMeshAgentCrash.zip"
2. Open Scene "SceneThatCrashes"
3. Navigate "File" > "Build Settings..." > "Build And Run" > create a folder for the build
4. Launch the build
5. Wait for the crash, which might take up to 10 minutes.

Reproducible with: 2020.1.17f1, 2020.2.0f1, 2021.1.0a10
Couldn't test with: 2018.4.30f1, 2019.4.16f1(Failed to load 'D:/Downloads/YEET/NavMeshAgentCrash/NavMeshAgentCrash/Assets/SceneThatCrashes/NavMesh.asset'. File may be corrupted or was serialized with a newer version of Unity.)

First lines of stacktrace:
0x00007FFA6FA2394A (UnityPlayer) UnityMain
ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FFA6D48280A)
0x00007FFA6D48280A (UnityPlayer) (function-name not available)
0x00007FFA6D486E5B (UnityPlayer) UnityMain
0x00007FFAD0387C24 (KERNEL32) BaseThreadInitThunk
0x00007FFAD228D4D1 (ntdll) RtlUserThreadStart

Notes:
1. If it doesn't crash after 15 minutes, launching the build again.

  1. Resolution Note (fix version 2021.2):

    Fixed in 2021.2.0a4

    This crash happens when the NavMeshAgent follows a path but the NavMesh suddenly changes on that path at a point where an OffMeshLink or a NavMeshLink part of the path connects to the NavMesh.
    The NavMesh can change due to NavMeshObstacles that do carving or due to the NavMeshBuilder.UpdateNavMeshData(...) method being called by an user script.

    The crash happens rarely because it depends on a precise timing between the agent's simulation and the modification of the NavMesh.

    There is no graceful solution to work around this issue in an editor version that does not contain the fix. One approach though could be to make sure to always set again the destination of the agents when the NavMesh changes in their path, thus triggering a re-planning of the path.

  2. Resolution Note (fix version 2021.1):

    Fixed in 2021.1.9f1

  3. Resolution Note (fix version 2020.3):

    Fixed in 2020.3.12f1

  4. Resolution Note (fix version 2019.4):

    Fixed in 2019.4.30f1

Comments (1)

  1. adriant

    Jan 21, 2021 22:40

    This crash happens when the NavMeshAgent follows a path but the NavMesh suddenly changes on that path at a point where an OffMeshLink or a NavMeshLink part of the path connects to the NavMesh.
    The NavMesh can change due to NavMeshObstacles that do carving or due to the NavMeshBuilder.UpdateNavMeshData(...) method being called by an user script.

    The crash happens rarely because it depends on a precise timing between the agent's simulation and the modification of the NavMesh.

    There is no graceful solution to work around this issue. One approach though could be to make sure to always set again the destination of the agents when the NavMesh changes in their path, thus triggering a re-planning of the path.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.