I set the Forced LOD Model on the mesh component > 1, then tried to export, this is what causes the crash. Here is my suggested fix, we just don't use Git or I'd do a PR:
In the else() branch of FFbxExporter::ExportStaticMesh(), replace the LODIndex definition with the following to clamp it to a valid value:
const int32 LODIndex = (StaticMeshComponent->ForcedLodModel > 0
? FMath::Min(StaticMesh->GetNumLODs(), StaticMeshComponent->ForcedLodModel) - 1
: /* auto-select*/ 0);
This crash was encountered when trying to export an entire level, and sometimes artists will mass-set the Forced LOD Model on many components to cause this.
Steps to Reproduce
1. Open TestMap
2. Select SM_SkySphere in the outliner
3. File --> Export Selected...
4. Keep the default options, save the FBX
5. Crash
Assertion failed: (Index >= 0) & (Index < ArrayNum) [Link Removed] [Line: 783]
Array index out of bounds: 1 into an array of size 1
(Crash folder included, but it's so easy to repro this is unnecessary)
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-274320 in the post.
0 |
Component | UE - Editor - Content Pipeline - FBX |
---|---|
Affects Versions | 5.5 |
Target Fix | 5.6 |
Fix Commit | 42381859 |
---|
Created | Apr 25, 2025 |
---|---|
Resolved | May 8, 2025 |
Updated | May 9, 2025 |