Crash when changing level with foliage

Hi!
My game crashes when I change from a large map that contains a sublevel with a lot of foliage, to another map or if I simply reload the level.
The render thread crashes always on the same destructor

FInstancedStaticMeshSceneProxy::~FInstancedStaticMeshSceneProxy() []

If I remove all the foliage the game doesn’t crash anymore.
It only happens outside the editor.
I have tried moving the foliage to a different map but the issue is still present.

Help.


Fatal error: [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/RenderCore/Private/RenderingThread.cpp] [Line: 853] 
Rendering thread exception:
Fatal error!

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x134c4410

0x00007ff7c02c8707 MyGame.exe!FInstancedStaticMeshSceneProxy::~FInstancedStaticMeshSceneProxy() []
0x00007ff7c02cb0d5 MyGame.exe!FHierarchicalStaticMeshSceneProxy::`scalar deleting destructor'() []
0x00007ff7bed7ff4c MyGame.exe!FScene::UpdateAllPrimitiveSceneInfos() []
0x00007ff7bed4369d MyGame.exe!TRDGLambdaPass<FGenerateSkyLightVisibilityRaysCS::FParameters,<lambda_b2336f278bcd1ed1ee1f0d3535b2ffb0> >::ExecuteImpl() []
0x00007ff7bd8a79e9 MyGame.exe!FNamedTaskThread::ProcessTasksNamedThread() []
0x00007ff7bd8a7d43 MyGame.exe!FNamedTaskThread::ProcessTasksUntilQuit() []
0x00007ff7bf5dca84 MyGame.exe!RenderingThreadMain() []
0x00007ff7bf5e1d7f MyGame.exe!FRenderingThread::Run() []
0x00007ff7bdcd653f MyGame.exe!FRunnableThreadWin::Run() []
0x00007ff7bdcd6234 MyGame.exe!FRunnableThreadWin::GuardedRun() []
0x00007ffdbc1f6fd4 KERNEL32.DLL!UnknownFunction []
0x00007ffdbe1bcec1 ntdll.dll!UnknownFunction []

Hi Toni,

Unfortunately, I’m unable to reproduce this issue in 4.24.3 Are you able to create a reproduction of this in a sample project?
Also, there have been changes to how destruction of instanced render data has been handled in 4.25.1, it might be worthwhile testing a copy of your project (or your repro project) there?

Cheers,
Alex

Hi Alex,
I don’t seem to have a way to reproduce it on another project. It seems the map got corrupt somehow.
I’ll try upgrading the project to 4.25 and I’ll let you know.

Thank you so much!

Upgradig to 4.25 seems to resolve the issue!
Now the camera exposure values are all over the place, but that’s a different topic. Thank you very much :slight_smile:

Toni.

Upgradig to 4.25 seems to resolve the issue! Now the camera exposure values are all over the place, but that’s a different topic. Thank you very much :slight_smile:

Toni.

Awesome, great to hear!

Hi, we’re experiencing the same issue but aren’t at a stage to upgrade to 4.25 yet. Is it possible for you to post the changelist that has a fix for this issue, so that we can try to integrate it into our project?

Thanks,