4.10 NavigationSystem MainNavData not created during PIE startup without a navmesh present

Apologies if this is already a known issue.

I’ve run into a crash that happens when a level containing an AI character starts up (only in PIE, standalone is fine). It occurs because GetNavDataForProps returns null in the UPathFollowingComponent::RecacheNavigationData function. It only happens if there is not a NavMeshBoundsVolume present in the level, and wasn’t a problem in 4.9.

Steps to reproduce:

  • Create a new Basic Code C++ project in 4.10
  • In the content browser, create a blueprint subclassed from Character
  • Place the blueprint into the level
  • Play in editor

Here is a sample project file that illustrates the issue:

https://drive.google.com/uc?export=download&id=0Bwkk9IIFWMFbdHJ3ak50Sk1EeDA

The fix is to simply add a NavMeshBoundsVolume to the level but it’s not really obvious given the timing and location of the crash.

Hey Alderbit-

I opened the sample project you provided however I did not get any crash when attempting to play in editor. Could you post the callstack and log files from the crash you’re receiving along with your DXDiag to provide additional information?

Cheers

Hi ,

Here are the requested files

CallStack.txt

NavigationCrash.log

DxDiag.txt

It might be worth noting that I’m using the launcher version of the editor.

Also, loading the project directly (as opposed to debugging in visual studio) won’t actually crash but it will print warnings to the output window when you play in editor.

The ensure that is being triggered is meant to inform that an AI with a pathfollowing component is being used without any navigation on the map. It is not causing an actual crash and is safe to ignore if you don’t need any pathing for the character.

Cheers

Perhaps the “ensure” could be called at a more appropriate time? e.g. only if the component attempts to use nav data. Would love to keep logs less cluttered with unnecessary output. Alternatively, perhaps there’s a way to make the UPathFollowingComponent in AIController optional?

We can look at presenting the message in a more meaningful or appropriate manor however the best option for now would be to simply disregard the warning message if you’re not using navigation.