UE 5.1p2 reproducible crash opening a geometry script

UE 5.1p2, opening BP named B_Tool_Stairs_BGM from Lyra crashes UE with the following error (reproducible 100%):

Fatal error: [File:D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp] [Line: 1438] Failed to find function CleanDegenerateTris in B_Tool_Stairs_BGM_C /Engine/Transient.World_2:PersistentLevel.B_Tool_Stairs_BGM_C_0

@rmsEG

In understand function prototypes may change or functions may change name between major versions, but ppl who are using such functions in their BP are then unable to open them, they basically loose their code. So instead of crashing, it would be nice to delete/disable the faulty nodes and issue a warning to the user.

The problem is in Lyra\Content\Tools\BakedGeneratedMeshSystem\BaseClasses\BakedGeneratedMeshActor.uasset

If you open it with blueprint editor before trying to load the affected map, you will see it doesn’t compile. To make it compile, split the two structs that are trying to connect to now invalid nodes, and manually connect the corresponding pins. This will fix the CleanDegenerateTris function.

The problem functions are BakeToStaticMesh and GenerateNewStaticMesh. The invalid source pins come from the MakeGeometryScriptNaniteOptions struct in BakeToStaticMesh, and the invalid destination pin from the float NaniteFallbackPercentage is going into MakeGeometryScriptCreateNewStaticMeshAssetOptions in GenerateNewStaticMesh.

Those two geometry structs need split to show the correct subpins.

I can make screenshots later if that isn’t clear.

1 Like

Thank you @eventHandler.mdr, that indeed fixed the issue!

Sorry, this is my mistake. We changed some geometry script BP functions to use the new engine NaniteSettings types, instead of the previous custom types we had used. I wanted to deprecate the old parameters, the intention was that you would then see BP compile errors and go and refresh/fix the nodes. This is what happens in a development build an so I thought it would work. However apparently in the binary build it will just crash =\

I am looking into whether I can roll back the deprecation

1 Like

Thanks! Do you mean UE will crash every time some deprecation occurs between versions? If so there may be an underlying issue to fix? I mean it makes sense functions may change prototypes sometimes but UE should be robust enough not to crash when this happens.

No, that’s not what I meant. Generally we deprecate entire functions, and that works quite well. In this case I deprecated a member of a UStruct, which is something that is rarely done, and apparently the structure of the parent/child BPs here resulted in this problem. An Engineer on the Blueprint team is going to look into it, and in the meantime I have rolled back the struct member deprecation, so it should have no problems in the 5.1 release (maybe not until preview 4 though).

1 Like

Ok cool, thanks for the details.

Can you do that please , im getting an error saying Mesh BVH node is broken and my unreal keeps crashing constantly