Description

In a Level Streaming setup, unloading a level that has spawned an AI Character with a Detour AI Controller causes a crash.

This was reported and tested in 4.23 (CL-8386587). This was reproduced in 4.22.3 (CL-7053642) and 4.24 (CL-9551884)

Steps to Reproduce
  1. Open the UE4 Editor and create a new Third Person project
  2. Create a new level for streaming and place a Nav Mesh Bounds inside it
  3. Assign streaming level to persistent level
  4. Create new character and create AI controller from parent class DetourCrowdAIController
  5. Assign this AI controller to the created Character
  6. Add spawning this character in streaming level (Begin play)
  7. Add logic loading and unloading streaming level in level blueprint of persistent level (Event key or begin play with delay).
  8. Play in editor, wait for the streaming level to load and spawn the character, then unload the streaming level

Results: Crash in UE4Editor_AIModule, UE4Editor_NavigationSystem

Expected: No Crash

Callstack
[2019.10.14-17.40.27:819][288]LogWindows: Error: === Critical error: ===
[2019.10.14-17.40.27:819][288]LogWindows: Error: 
[2019.10.14-17.40.27:819][288]LogWindows: Error: Fatal error!
[2019.10.14-17.40.27:819][288]LogWindows: Error: 
[2019.10.14-17.40.27:819][288]LogWindows: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000000
[2019.10.14-17.40.27:819][288]LogWindows: Error: 
[2019.10.14-17.40.27:819][288]LogWindows: Error: [Callstack] 0x00007ffc6f5b265e UE4Editor-AIModule.dll!UCrowdManager::Tick() [d:\build\++ue4\sync\engine\source\runtime\aimodule\private\navigation\crowdmanager.cpp:235]
[2019.10.14-17.40.27:819][288]LogWindows: Error: [Callstack] 0x00007ffc7884cd59 UE4Editor-NavigationSystem.dll!UNavigationSystemV1::Tick() [d:\build\++ue4\sync\engine\source\runtime\navigationsystem\private\navigationsystem.cpp:1025]
[2019.10.14-17.40.27:819][288]LogWindows: Error: [Callstack] 0x00007ffc71af0d65 UE4Editor-Engine.dll!UWorld::Tick() [d:\build\++ue4\sync\engine\source\runtime\engine\private\leveltick.cpp:1470]
[2019.10.14-17.40.27:819][288]LogWindows: Error: [Callstack] 0x00007ffc8d0ce00b UE4Editor-UnrealEd.dll!UEditorEngine::Tick() [d:\build\++ue4\sync\engine\source\editor\unrealed\private\editorengine.cpp:1638]
[2019.10.14-17.40.27:819][288]LogWindows: Error: [Callstack] 0x00007ffc8d924b16 UE4Editor-UnrealEd.dll!UUnrealEdEngine::Tick() [d:\build\++ue4\sync\engine\source\editor\unrealed\private\unrealedengine.cpp:407]
[2019.10.14-17.40.27:819][288]LogWindows: Error: [Callstack] 0x00007ff69b5d7b0a UE4Editor.exe!FEngineLoop::Tick() [d:\build\++ue4\sync\engine\source\runtime\launch\private\launchengineloop.cpp:4257]
[2019.10.14-17.40.27:819][288]LogWindows: Error: [Callstack] 0x00007ff69b5ea91c UE4Editor.exe!GuardedMain() [d:\build\++ue4\sync\engine\source\runtime\launch\private\launch.cpp:173]
[2019.10.14-17.40.27:819][288]LogWindows: Error: [Callstack] 0x00007ff69b5ea9fa UE4Editor.exe!GuardedMainWrapper() [d:\build\++ue4\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:147]
[2019.10.14-17.40.27:819][288]LogWindows: Error: [Callstack] 0x00007ff69b5fb92c UE4Editor.exe!WinMain() [d:\build\++ue4\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:279]
[2019.10.14-17.40.27:819][288]LogWindows: Error: [Callstack] 0x00007ff69b5fe60e UE4Editor.exe!__scrt_common_main_seh() [d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
[2019.10.14-17.40.27:819][288]LogWindows: Error: [Callstack] 0x00007ffccbda37e4 KERNEL32.DLL!UnknownFunction []
[2019.10.14-17.40.27:819][288]LogWindows: Error: [Callstack] 0x00007ffcce91cb81 ntdll.dll!UnknownFunction []

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-81818 in the post.

2
Login to Vote

Fixed
ComponentUE - AI
Affects Versions4.234.244.22.3
Target Fix4.24
Fix Commit9676135
Main Commit9676136
Release Commit9676135
CreatedOct 14, 2019
ResolvedOct 18, 2019
UpdatedJan 25, 2021