# \[SOLVED\] Assertion failed: Mesh && Mesh-\>GetRenderData()

**URL:** <https://forums.unrealengine.com/t/solved-assertion-failed-mesh-mesh-getrenderdata/1269505>\
**Category:** Platform & Builds\
**Tags:** assertion-failed, unreal-engine, build-failed\
**Created:** [August 23, 2023, 4:14am UTC](https://forums.unrealengine.com/t/solved-assertion-failed-mesh-mesh-getrenderdata/1269505 "2023-08-23T04:14:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![FiendCorp](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fiendcorp/32/754829_2.png) [@FiendCorp](https://forums.unrealengine.com/u/FiendCorp)\
**Post date:** [August 23, 2023, 4:14am UTC](https://forums.unrealengine.com/t/solved-assertion-failed-mesh-mesh-getrenderdata/1269505/1 "2023-08-23T04:14:17Z")

</div>

Hello,

## Before I upgraded my project to UE5 from UE4.27, I was able to package without issue. Now i am getting:

## “PackagingResults: Error: appError called: Assertion failed: Mesh && Mesh-\>GetRenderData() [File:D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\StaticMesh.cpp] [Line: 4828] PackagingResults: Error: begin: stack for UAT PackagingResults: Error: === Critical error: === PackagingResults: Error: Assertion failed: Mesh && Mesh-\>GetRenderData() [File:D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\StaticMesh.cpp] [Line: 4828]”

There doesn’t appear to be any help with this issue as of yet. It’s a little frustrating not being able to troubleshoot this.

Any help would be appreciated. 😄

[Cook-2023.08.22-23.35.24.txt](https://forums.unrealengine.com/uploads/short-url/216nW3DIFX6hkvU0CdwcPNaLz3t.txt) (306.6 KB)  
[Log.txt](https://forums.unrealengine.com/uploads/short-url/du1Ai29ENSoEJQELUpogn6Wg1Y.txt) (124.0 KB)

---

<div class="post-metadata">

**Author:** ![stime233](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@stime233](https://forums.unrealengine.com/u/stime233)\
**Post date:** [August 26, 2023, 1:50pm UTC](https://forums.unrealengine.com/t/solved-assertion-failed-mesh-mesh-getrenderdata/1269505/2 "2023-08-26T13:50:04Z")

</div>

Hello，I just disable ‘Nanite’ of Landscape ,and then,package was successful.

---

<div class="post-metadata">

**Author:** ![FiendCorp](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fiendcorp/32/754829_2.png) [@FiendCorp](https://forums.unrealengine.com/u/FiendCorp)\
**Post date:** [September 23, 2023, 8:16pm UTC](https://forums.unrealengine.com/t/solved-assertion-failed-mesh-mesh-getrenderdata/1269505/3 "2023-09-23T20:16:08Z")

</div>

After looking more into the error I was getting, I noticed a line ‘LogLandscape: Warning: Landscape : Nanite landscape mesh would have more than 64 materials, which is currently not supported. Please reduce the number of components in this landscape actor to enable Nanite.’

After, I backed up my landscape and deleted it in my project. BOOM! Game packed fine.

So I lowered the amount of components to ‘64’ and now my game is packaging as expected.

---

<div class="post-metadata">

**Author:** ![BRAA\_45](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BRAA\_45](https://forums.unrealengine.com/u/BRAA_45)\
**Post date:** [October 16, 2023, 7:59pm UTC](https://forums.unrealengine.com/t/solved-assertion-failed-mesh-mesh-getrenderdata/1269505/4 "2023-10-16T19:59:07Z")

</div>

i have the same problem. i disable ‘nanite of landscape’ but that does not work. i even delete the level but that also doesn’t work.

can you help me please?

---

<div class="post-metadata">

**Author:** ![m2mfor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@m2mfor](https://forums.unrealengine.com/u/m2mfor)\
**Post date:** [January 30, 2024, 1:27am UTC](https://forums.unrealengine.com/t/solved-assertion-failed-mesh-mesh-getrenderdata/1269505/5 "2024-01-30T01:27:07Z")

</div>

I am going through the same situation. Have you by any chance found a solution?

---

<div class="post-metadata">

**Author:** ![wyskoj](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/wyskoj/32/995256_2.png) [@wyskoj](https://forums.unrealengine.com/u/wyskoj)\
**Post date:** [October 30, 2024, 8:58pm UTC](https://forums.unrealengine.com/t/solved-assertion-failed-mesh-mesh-getrenderdata/1269505/6 "2024-10-30T20:58:37Z")

</div>

I’m not sure if what was causing this error for me is the same for others, but I thought I’d put this out there in case it helps anyone. (It involved me compiling the engine from source so I could add some extra print statements 😬).

I have an actor that needs to dynamically add static mesh components at runtime. To avoid a hard reference to a static mesh asset in C++, I exposed a property that could be set in a BP child:

```auto
UPROPERTY(EditDefaultsOnly)
UStaticMesh* MeshAsset;

```

I was setting a default value for this in the actor’s constructor:

```auto
MeshAsset = CreateDefaultSubobject<UStaticMesh>(TEXT("Empty"));

```

Turns out you should _not_ initialize a `UStaticMesh*` with `CreateDefaultSubobject`. Make it nullptr instead (`MeshAsset = nullptr`) and it will be correctly initialized later when the BP is initialized.

It’s odd that this never caused an issue until I tried packaging.
