# World Partition: Foliage Painting Crash (DataLayer) UE5.1

**URL:** <https://forums.unrealengine.com/t/world-partition-foliage-painting-crash-datalayer-ue5-1/755936>\
**Category:** World Creation\
**Tags:** UE-5, data, foliage-paint, World-Partition, question\
**Created:** [January 24, 2023, 12:10pm UTC](https://forums.unrealengine.com/t/world-partition-foliage-painting-crash-datalayer-ue5-1/755936 "2023-01-24T12:10:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![unit23](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/unit23/32/1223962_2.png) [@unit23](https://forums.unrealengine.com/u/unit23)\
**Post date:** [January 24, 2023, 12:10pm UTC](https://forums.unrealengine.com/t/world-partition-foliage-painting-crash-datalayer-ue5-1/755936/1 "2023-01-24T12:10:22Z")

</div>

**Crash with editor when trying to paint foliage**. All foliage was assigned to a DataLayer (Editor), and is spatially loaded enabled on all landscape instances. The scene also included Procedural Foliage Spawner.

> Assertion failed: !IsValidChecked(ExistingActor) [File:D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\ActorPartition\ActorPartitionSubsystem.cpp] [Line: 280]

Tried without success:  
Make DataLayer visible  
Make all Landscape instances visible  
Disabled Is Spatially Loaded on all Landscape instances.  
Removing all ProceduralFoliageSpawner

**The Solution for me was to delete the DataLayer containging the foliage.**

Related

> [@UE5.1 fails to initialize. Assertion failed: !IsValidChecked(ExistingActor) \[File:D:\\build\\++UE5\\Sync\\Engine\\Source\\Runtime\\Engine\\Private\\ActorPartition\\ActorPartitionSubsystem.cpp\] \[Line: 280\]](https://forums.unrealengine.com/t/ue5-1-fails-to-initialize-assertion-failed-isvalidchecked-existingactor-file-build-ue5-sync-engine-source-runtime-engine-private-actorpartition-actorpartitionsubsystem-cpp-line-280/675020/3):
>
> I got the same error but only when trying to resimulate. My solution was simular, just selected the instanced foliage actors in the Outliner view and deleted them. Then the resimulation of the procedural foliage worked like a charm.

---

<div class="post-metadata">

**Author:** ![unit23](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/unit23/32/1223962_2.png) [@unit23](https://forums.unrealengine.com/u/unit23)\
**Post date:** [January 24, 2023, 12:34pm UTC](https://forums.unrealengine.com/t/world-partition-foliage-painting-crash-datalayer-ue5-1/755936/2 "2023-01-24T12:34:53Z")

</div>

**The Solution for me was to delete the DataLayer containging the foliage.**

---

<div class="post-metadata">

**Author:** ![Haoris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Haoris](https://forums.unrealengine.com/u/Haoris)\
**Post date:** [March 28, 2023, 5:25pm UTC](https://forums.unrealengine.com/t/world-partition-foliage-painting-crash-datalayer-ue5-1/755936/3 "2023-03-28T17:25:09Z")

</div>

I have the same problem but I don’t use Data Layers nor Procedural foliage spawners. I just can’t paint foliage on some sections of the landscape with having the same crash + text error, while painting foliage on other sections of the landscape is ok.

---

<div class="post-metadata">

**Author:** ![SCV-ReadytoGo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SCV-ReadytoGo](https://forums.unrealengine.com/u/SCV-ReadytoGo)\
**Post date:** [October 27, 2023, 6:34am UTC](https://forums.unrealengine.com/t/world-partition-foliage-painting-crash-datalayer-ue5-1/755936/4 "2023-10-27T06:34:26Z")

</div>

i solved with Build → Build all levels

---

<div class="post-metadata">

**Author:** ![Wolf\_Haus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Wolf\_Haus](https://forums.unrealengine.com/u/Wolf_Haus)\
**Post date:** [February 29, 2024, 6:11am UTC](https://forums.unrealengine.com/t/world-partition-foliage-painting-crash-datalayer-ue5-1/755936/6 "2024-02-29T06:11:33Z")

</div>

We had a similar issue (ie, same bug but no data layers). In our case the source of the problem was that a StaticMesh asset was being referenced by a foliage actor, but the StaticMesh had been moved in the directory and the foliage instances in the map were confused. The easiest fix (which I was able to replicate a couple times) was to select all the foliage Instances in the outliner and select Save Selected Actors. That fixed it in our particular case!

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/c/1/ec10ce76a5a70e9d0b15952dcb625452d3c29419.png)
