The licensee has noticed that local variables of type InstancedStruct return nullptr.
The setup is a verification of the behavior. Class variables work normally.
I've tested this behavior on every version of the engine.
InstancedStructs were made BP exposed on 5.3 and after that every version had this problem, including 5.3, 5.4, 5.5, up to 5.7 (CL42031367).
I haven't considered this a regression since every version of the engine has had this issue.
I'll attach a repro project on version 5.5.
On an blank project, create a BlueprintFunctionLibrary on C++
Create a UFUNCTION:
UFUNCTION(BlueprintCallable)
static const UScriptStruct* GetScriptStructType(FInstancedStruct InstancedStruct);
Implementation:
const UScriptStruct* UMyBlueprintFunctionLibrary::GetScriptStructType(FInstancedStruct InstancedStruct)
Back in the Editor, create a BP (BP_Test)
Create a Function (MyFunction)
In MyFunction, create a Local Variable of type InstancedStruct (MyLocalInstancedStruct)
Call the BPFL function GetScriptStructType passing MyLocalInstancedStruct
Print the returned value
Compile and set it's default value to any value available in the dropdown
On Event Begin Play, call MyFunction
For comparison, create a Variable of type InstancedStruct (MyInstancedStruct) and repeat the process of MyFunction, passing it to GetScriptStructType and printing the output (change the print color to be able to check who is printing)
Instantiate BP_Test on the open map and Play-In-Editor
To check the repro project, open it, Play-In-Editor, and check the prints
Expected result: both prints should return the correct type
Actual result: only the class variable is printed, the local variable is not
> UnrealEditor-Case18892734.dll!UMyBlueprintFunctionLibrary::GetScriptStructType(FInstancedStruct InstancedStruct) Line 8 C++
UnrealEditor-Case18892734.dll!UMyBlueprintFunctionLibrary::execGetScriptStructType(UObject * Context, FFrame & Stack, void * const Z_Param__Result) Line 66 C++
UnrealEditor-CoreUObject.dll!UObject::execCallMathFunction(UObject * Context, FFrame & Stack, void * const Z_Param__Result) Line 1079 C++
[Inline Frame] UnrealEditor-CoreUObject.dll!FFrame::Step(UObject *) Line 482 C++
UnrealEditor-CoreUObject.dll!UObject::execLetObj(UObject * Context, FFrame & Stack, void * const Z_Param__Result) Line 2907 C++
[Inline Frame] UnrealEditor-CoreUObject.dll!FFrame::Step(UObject *) Line 482 C++
UnrealEditor-CoreUObject.dll!ProcessLocalScriptFunction(UObject * Context, FFrame & Stack, void * const Z_Param__Result) Line 1214 C++
UnrealEditor-CoreUObject.dll!ProcessScriptFunction<void (_cdecl*)(UObject *,FFrame &,void *)>(UObject * Context, UFunction * Function, FFrame & Stack, void * const Z_Param_Result, void[Image Removed](UObject *, FFrame &, void *) ExecFtor) Line 1043 C++
UnrealEditor-CoreUObject.dll!ProcessLocalFunction::__l2::<lambda_1>::operator()() Line 1286 C++
UnrealEditor-CoreUObject.dll!ProcessLocalFunction(UObject * Context, UFunction * Fn, FFrame & Stack, void * const Z_Param__Result) Line 1304 C++
[Inline Frame] UnrealEditor-CoreUObject.dll!FFrame::Step(UObject *) Line 482 C++
UnrealEditor-CoreUObject.dll!ProcessLocalScriptFunction(UObject * Context, FFrame & Stack, void * const Z_Param__Result) Line 1214 C++
UnrealEditor-CoreUObject.dll!ProcessScriptFunction<void (_cdecl*)(UObject *,FFrame &,void *)>(UObject * Context, UFunction * Function, FFrame & Stack, void * const Z_Param_Result, void[Image Removed](UObject *, FFrame &, void *) ExecFtor) Line 1043 C++
UnrealEditor-CoreUObject.dll!ProcessLocalFunction::__l2::<lambda_1>::operator()() Line 1286 C++
UnrealEditor-CoreUObject.dll!ProcessLocalFunction(UObject * Context, UFunction * Fn, FFrame & Stack, void * const Z_Param__Result) Line 1304 C++
[Inline Frame] UnrealEditor-CoreUObject.dll!FFrame::Step(UObject *) Line 482 C++
UnrealEditor-CoreUObject.dll!ProcessLocalScriptFunction(UObject * Context, FFrame & Stack, void * const Z_Param__Result) Line 1214 C++
UnrealEditor-CoreUObject.dll!UObject::ProcessInternal(UObject * Context, FFrame & Stack, void * const Z_Param__Result) Line 1336 C++
UnrealEditor-CoreUObject.dll!UFunction::Invoke(UObject * Obj, FFrame & Stack, void * const Z_Param__Result) Line 7192 C++
UnrealEditor-CoreUObject.dll!UObject::ProcessEvent(UFunction * Function, void * Parms) Line 2175 C++
UnrealEditor-Engine.dll!AActor::ProcessEvent(UFunction * Function, void * Parameters) Line 1160 C++
[Inline Frame] UnrealEditor-Engine.dll!AActor::ReceiveBeginPlay() Line 7876 C++
UnrealEditor-Engine.dll!AActor::BeginPlay() Line 4344 C++
UnrealEditor-Engine.dll!AActor::DispatchBeginPlay(bool bFromLevelStreaming) Line 4284 C++
UnrealEditor-Engine.dll!AWorldSettings::NotifyBeginPlay() Line 337 C++
UnrealEditor-Engine.dll!AGameStateBase::HandleBeginPlay() Line 228 C++
UnrealEditor-Engine.dll!UWorld::BeginPlay() Line 5437 C++
UnrealEditor-Engine.dll!UGameInstance::StartPlayInEditorGameInstance(ULocalPlayer * LocalPlayer, const FGameInstancePIEParameters & Params) Line 568 C++
UnrealEditor-UnrealEd.dll!UEditorEngine::CreateInnerProcessPIEGameInstance(FRequestPlaySessionParams & InParams, const FGameInstancePIEParameters & InPIEParameters, int InPIEInstanceIndex) Line 3153 C++
UnrealEditor-UnrealEd.dll!UEditorEngine::OnLoginPIEComplete_Deferred(int LocalUserNum, bool bWasSuccessful, FString ErrorString, FPieLoginStruct DataStruct) Line 1599 C++
UnrealEditor-UnrealEd.dll!UEditorEngine::CreateNewPlayInEditorInstance(FRequestPlaySessionParams & InRequestParams, const bool bInDedicatedInstance, const EPlayNetMode InNetMode) Line 1862 C++
UnrealEditor-UnrealEd.dll!UEditorEngine::StartPlayInEditorSession(FRequestPlaySessionParams & InRequestParams) Line 2884 C++
UnrealEditor-UnrealEd.dll!UEditorEngine::StartQueuedPlaySessionRequestImpl() Line 1176 C++
UnrealEditor-UnrealEd.dll!UEditorEngine::StartQueuedPlaySessionRequest() Line 1077 C++
UnrealEditor-UnrealEd.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 2027 C++
UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 550 C++
UnrealEditor.exe!FEngineLoop::Tick() Line 5877 C++
[Inline Frame] UnrealEditor.exe!EngineTick() Line 69 C++
UnrealEditor.exe!GuardedMain(const wchar_t * CmdLine) Line 188 C++
UnrealEditor.exe!LaunchWindowsStartup(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow, const wchar_t * CmdLine) Line 266 C++
UnrealEditor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * pCmdLine, int nCmdShow) Line 317 C++
[External Code]
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-278428 in the post.
0 |
Component | UE - Foundation |
---|---|
Affects Versions | 5.3, 5.4, 5.5, 5.7 |
Created | May 7, 2025 |
---|---|
Updated | May 27, 2025 |