UE (4.7.5) crashes on pasting too long strings in textfields

Greetings community,

I just stumbled upon a pretty…unnecessary problem with UEditor 4.7.5 (and most likely older versions) which leads to a complete editor crash.

Atm I have to copy & paste a lot of blueprint information from one project to another, so my clipboard is often filled with a lot of blueprint-pseudocode-strings. As I tried to change some node names in my Inputs/Outputs of a function I accidentally pasted my last clipboard into the textfield (6000+ chars).

If you do this (either by accident or you just have chosen a too long name you want to paste) the *whole editor crashes with an “unknown exception”.


Unknown exception - code 00000001 (first/second chance not available)

Assertion failed: FCString::Strlen(InName)<=NAME_SIZE [File:C:\UE4Source\UnrealEngine-release\Engine\Source\Runtime\Core\Private\UObject\UnrealNames.cpp] [Line: 460]

…more stacktrace…

UE4Editor_Slate!SEditableText::PasteTextFromClipboard() + 269 bytes [c:\ue4source\unrealengine-release\engine\source\runtime\slate\private\widgets\input\seditabletext.cpp:1106]


As you can see in the crash report, a single assertion for string length seems to cause this total failure.

If you want to reproduce:

  1. Open blueprint editor and create a new function/macro/something with editable textfields (inputs/outputs)
  2. Copy some long text or existing blueprint nodes in your clipboard (not sure whats the max value for the assertion)
  3. Paste them into a text input field
  4. Crash :wink:

While I can absolutely understand that you’re not supposed to post thousands of characters into simple input fields, imho an editor like UE shouldn’t crash horribly and be able to catch that error and notify the user about his failing paste.

I hope you are able to fix this bug asap!
Cheers, Pete


Just to make sure which kind of text fields im talking about

40681-fields.png

Thanks for you bug report.

In this particular case, the crash is caused by an assert in FName that makes sure you’ve not passed it a string that exceeds NAME_SIZE (1024 characters).

I’ve raised UE-14636 so that we can address this in some way, either by relaxing that assert, or by hardening the UI to prevent you being able to submit such long strings.