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

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. :smile:

Cook-2023.08.22-23.35.24.txt (306.6 KB)
Log.txt (124.0 KB)

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

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.

1 Like

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?

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

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 :grimacing:).

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:

UPROPERTY(EditDefaultsOnly)
UStaticMesh* MeshAsset;

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

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.