[Closed] Crash while unloading a streaming level while spawned decals are still alive
Some of our actors are spawning deferred decals as footprints while they are walking around. These actors themselves are residing in a streaming level. Now when our player dies, we don't want to reload the whole persistent level, so we are only unloading and reloading some important sub levels; Problem is while there are still alive footprint decals when we unload the level where the actor that spawned the footprints resides in, we experience the crash that we need some help with.
Debugging tells me in 'FTransientDecalRenderData::FTransientDecalRenderData(const FScene& InScene, const FDeferredDecalProxy* InDecalProxy, float InConservativeRadius)' the DecalMaterial of InDecalProxy becomes InValid. Our fx artist is creating a dynamic material instance for the footprint decals and spawns them from the actors EventGraph.
Crash log: Log.txt
Temporary WorkAround: For the time being we add an actor to the PersistantLevel (as a workaround) which handles the spawning and the creation of the DynamicMaterialInstances. That way they don't get destroyed when we unload the sub level.
I did not change any settings in the project.
I did not create any other BP or C++ code other then the one provided in the screen shots.
It does not matter if the Sublevel is unloaded by Blueprint or C++ Code.
It does not matter if the SubLevel is unloaded by a key press or some other event.
It does not matter if the project is a Blueprint or C++ Project.
Using the Material Instance directly in SpawnDecalAtLocation will not result in a crash, it has to be a DynamicMaterialInstance.
The question has been closed Dec 04 '18 at 08:39 PM by NicholasMont for the following reason:
I was able to reproduce this issue on our end. I have written up a report and I have submitted it to the developers for further consideration. I have provided a link to the public tracker. Please feel free to use the link provided for future updates. If you need further assistance please let me know and I will be happy to help.
answered Dec 04 '18 at 08:37 PM
NicholasMont ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here