Landscape causes crash in builds in 5.7.4

It was complety fine in 5.6. Somehow after switching to 5.7.4 worlds with a landscape started to crash in first loading. Instantly crashes the moment landscape loaded. I didn’t change anything about landscape

Here is best log I can get:

Fatal error!

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000188

0x00007ff72076e0a9 UAG-Win64-Shipping.exe!ULandscapeComponent::GetCurrentRuntimeMaterialInstanceCount() []
0x00007ff7207b8184 UAG-Win64-Shipping.exe!ULandscapeComponent::GetStreamingRenderAssetInfo() []
0x00007ff721118716 UAG-Win64-Shipping.exe!UPrimitiveComponent::GetStreamingRenderAssetInfoWithNULLRemoval() []
0x00007ff7218e6ce1 UAG-Win64-Shipping.exe!FRenderAssetInstanceState::AddComponentInternal() []
0x00007ff7218e66f1 UAG-Win64-Shipping.exe!FRenderAssetInstanceState::AddComponent() []
0x00007ff7218c0e6c UAG-Win64-Shipping.exe!FLevelRenderAssetManager::IncrementalBuild() []
0x00007ff7218c17e8 UAG-Win64-Shipping.exe!FLevelRenderAssetManager::IncrementalUpdate() []
0x00007ff7218c1a44 UAG-Win64-Shipping.exe!FRenderAssetStreamingManager::IncrementalUpdate() []
0x00007ff7218d21c4 UAG-Win64-Shipping.exe!FRenderAssetStreamingManager::UpdateResourceStreaming() []
0x00007ff7211c3fb5 UAG-Win64-Shipping.exe!FStreamingManagerCollection::UpdateResourceStreaming() []
0x00007ff7211c1874 UAG-Win64-Shipping.exe!FStreamingManagerCollection::Tick() []
0x00007ff7212c22a5 UAG-Win64-Shipping.exe!UGameEngine::Tick() []
0x00007ff721a8bac2 UAG-Win64-Shipping.exe!FEngineLoop::Tick() []
0x00007ff721a8f99f UAG-Win64-Shipping.exe!GuardedMain() []
0x00007ff721a8fa0a UAG-Win64-Shipping.exe!GuardedMainWrapper() []
0x00007ff721a905fd UAG-Win64-Shipping.exe!LaunchWindowsStartup() []
0x00007ff721a96984 UAG-Win64-Shipping.exe!WinMain() []
0x00007ff724aa7cf2 UAG-Win64-Shipping.exe!__scrt_common_main_seh() [D:\a_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
0x00007ffb46117374 KERNEL32.DLL!UnknownFunction []

Hello there @LordMegatron666!

Checking around the community, there are cases of certain features causing problem when migrating from 5.6 to 5.7, yet I’m not seeing many like yours.

Reviewing your log, it looks like a null crash. The engine is looking for a pointer or object that doesn’t exist, or it’s corrupted. And it seems to be happening during the streaming phase of the build. Meaning, it’s possible that UE is failing to read your landscape material, or the landscape itself.

So, this is mainly related to the migration, as you changed nothing from your landscape. There are a few methods to test post migration, let’s cover them one by one:

  • First, since your landscape data was baked in 5.6, it needs a rebuild from 5.7. Go to Build, and click on “Build Landscape”. You can also force a refresh by selecting your landscape actor, making a minor change, then re-save all.

  • Another thing to check, if your landscape is using Nanite, try toggling it off and on to force a rebuild. Please do the same for HLODs, if you are using them in your project.

  • For the possible material conflict, I would remove the material from the landscape, reimport/refresh it, then re-assign it back to the landscape. As an extra test, go to Project Settings > Rendering > Textures, and disable “Texture Streaming”.

  • If the crash persists, there could be stale/corrupted data from your previous version still lingering in the cache. To clear that up, go to your project’s main directory, and delete folders DerivedDataCache, Intermediate, and Saved. After that, re-open your project, and allow a full shader recompile.