We likely have several places in the editor that convert text taken from an editable text into an FName without ensuring that the string will fit into an FName. This can lead to editor crashes.
One simply way to fix this would be to swap out the check in FName::InitInternal with something that truncates the name, eg)
TCharType TruncatedBuffer[NAME_SIZE]; if (!ensureMsgf(TCString<TCharType>::Strlen(InName)<=NAME_SIZE, TEXT("The given FName is %d characters and will be truncated to NAME_SIZE (%d) characters"), TCString<TCharType>::Strlen(InName), NAME_SIZE)) { TCString<TCharType>::Strncpy(TruncatedBuffer, InName, NAME_SIZE); InName = TruncatedBuffer; }
Another way would be to create an editable text widget that's tailored to editing FNames, and which provides basic validation for length and invalid characters. This could then be used in places where we're editing an FName.
How does TextureRenderTarget2D get TArray<uint8> type data?
Why does the REMOVE method of map container remove elements have memory leaks?
How do I set a material as a post-processing material?
What is the cause of the packaging error falling back to 'GameUserSettings' in ue5?
How does TArray loop correctly remove elements in blueprints?
How to implement springarm components to scale according to mouse position in spawn?
Head over to the existing Questions & Answers thread and let us know what's up.