When running our game in a packaged build (both debug and shipping configurations, engine version 5.7.2), it crashes inside the MeshApplyShape() function at line 877. https://github.com/EpicGames/UnrealEngine/blob/0f7a9c3c039329376227b4b29218f27374a178df/Engine/Plugins/Mutable/Source/MutableRuntime/Private/MuR/OpMeshReshape.h#L877
We found that, in the packaged game, the ItNormal’s uint8* Buffer is assigned a nullptr. This happens because ShapeMesh’s FMeshBufferSet VertexBuffers apparently lacks the EMeshBufferSemantic::Normal channel, despite still having a positive ElementCount. Notably, this issue never occurs when running the game inside the editor.
We are still investigating the issue, why the packed version of the Shape Mesh is incomplete, but it has proven to be tricky. Any suggestions or insights on the matter would be greatly appreciate.
Additionally, from a robustness standpoint, it would be valuable if the code could safely handle the absence of this Normal channel, still applying the shape but skipping any potential normal modifications, rather than crashing. Implementing a safety check for a valid iterator and a quick and dirty fallback solution in these cases would be highly beneficial for stability, and for not blocking any other parts of the game’s pipeline.
(Does one best submit suggestions like this here, or should one turn somewhere else for that?)
Thank you very much for your time and assistance!