UFTextCrash

Tests an RPC crash caused by empty [FText](API\Runtime\Core\Internationalization\FText)'s, as reported on the UDN here: [https://udn.unrealengine.com/questions/213120/using-empty-ftexts-within-rpcs.html](https://udn.unrealengine.com/questions/213120/using-empty-ftexts-within-rpcs.html)

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

NUTUnrealEngine4

Header

/Engine/Plugins/NetcodeUnitTest/NUTUnrealEngine4/Source/NUTUnrealEngine4/Classes/UnitTests/FTextCrash.h

Include

#include "UnitTests/FTextCrash.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)()
class UFTextCrash : public UClientUnitTest

Remarks

Tests an RPC crash caused by empty FText's, as reported on the UDN here: https://udn.unrealengine.com/questions/213120/using-empty-ftexts-within-rpcs.html

UDN Post: "Using Empty FTexts within RPCs" Hey, we're using FTexts within RPCs functions (server -> client in my specific case) to pass localized strings. That works fine until the point when the server sends an empty FText. In that case both the FText members SourceString and DisplayString are null on client side which lead to crashes whenever you use something like ToString which assumes those are valid.

Is this the intended behavior? I'm using FTextInspector::GetSourceString(text) to run checks on these replicated FTexts now to catch this case. FTexts that are not empty work just fine.

Thanks, Oliver

Constructors

Name Description

Public function

UFTextCrash

(
    const FObjectInitializer& ObjectIn...
)

UFTextCrash

Overridden from UClientUnitTest

Name Description

Public function Virtual

void

 

ExecuteClientUnitTest()

Interface and hooked events for client unit tests Override this, to implement the client unit test

Overridden from UProcessUnitTest

Name Description

Public function Virtual

void

 

NotifyProcessLog

(
    TWeakPtr< FUnitTestProcess > InProc...,
    const TArray< FString >& InLogLine...
)

Interface for process unit tests For implementation in subclasses, for helping to verify success/fail upon completion of unit tests

Overridden from UUnitTest

Name Description

Public function Virtual

void

 

InitializeEnvironmentSettings()

Finishes initializing unit test settings, that rely upon the current unit test environment being loaded

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss