I ran in to this lately. I am using 4.26 build from source. I was able to fix it by changing the engine code. They create an Objective-C object for the text field, and in it they store the text and the hint in cached NSStrings, using [NSString copy] to copy the value, however [NSString copy] might pass a reference to the original NSString so when they call [NSString release] on the cached string they may be deleting the original, depending on whether IOS feels like allocating a new string for the cached string or not. It then goes and tries to set itself to the deleted value which causes the crash. Its possible this has been a bug for a long time. I fixed it by changing the declaration of the cache strings to NSMutableString and removing the release and using [NSMutableString setString:val] instead of copy. You may not be using the source build, so you have to wait for Epic to fix this. I’ll see if I can issue a bug report for them.
\Engine\Source\Runtime\Slate\Public\Framework\Text\IOS\IOSPlatformTextField.h starting at line 33
@interface SlateTextField : UIAlertController
{
TWeakPtr<IVirtualKeyboardEntry> TextWidget;
FText TextEntry;
bool bTransitioning;
bool bWantsToShow;
//- NSString* CachedTextContents;
//- NSString* CachedPlaceholderContents;
NSMutableString* CachedTextContents; //+
NSMutableString* CachedPlaceholderContents; //+
\Engine\Source\Runtime\Slate\Private\Framework\Text\IOS\IOSPlatformTextField.cpp starting at line 186
-(void)show:(TSharedPtr<IVirtualKeyboardEntry>)InTextWidget text:(NSString*)TextContents placeholder:(NSString*)PlaceholderContents keyboardConfig:(FKeyboardConfig)KeyboardConfig
{
TextWidget = InTextWidget;
TextEntry = FText::FromString(TEXT(""));
//- if(CachedTextContents != nil)
//- {
//- [CachedTextContents release];
//- }
//- if(CachedPlaceholderContents != nil)
//- {
//- [CachedPlaceholderContents release];
//- }
[CachedTextContents setString : TextContents] ; //+
[CachedPlaceholderContents setString : PlaceholderContents] ; //+
//- CachedTextContents = [TextContents copy]; // This is the line that throws the error
//- CachedPlaceholderContents = [PlaceholderContents copy];
CachedKeyboardConfig = KeyboardConfig;
bWantsToShow = true;
and starting at line 144
-(void)hide
{
bWantsToShow = false;
if(CachedTextContents != nil)
{
//- [CachedTextContents release];
CachedTextContents = nil;
}
if(CachedPlaceholderContents != nil)
{
//- [CachedPlaceholderContents release];
CachedPlaceholderContents = nil;
}