Description

It is possible to rename a Function Output the same as a Local Variable, which causes a compile error:

Error Internal Compiler Error: Tried to create a property TestVar in scope NewFunction_0, but another object of type (null) already already exists there.

Note: Function Inputs already do not allow this rename.

Reproduced in 4.7.5 binary and Main (//depot/UE4/Promotable-CL-2507843)

The user reporting this is getting a crash when hitting compile, instead of a compile error. I was not able to reproduce the crash.

Crash Report:
http://crashreporterue4/Crashes/Show/1082698

Call Stack:
msvcr120! woutput_l() 
msvcr120! vsnwprintf_l() 
msvcr120! vsnwprintf() 
UE4Editor_Core! FString::Printf__VA() string.cpp:1086 
UE4Editor_KismetCompiler! FString::Printf<wchar_t const * __ptr64,wchar_t const * __ptr64>() unrealstring.h:1125 
UE4Editor_KismetCompiler! FKismetCompilerUtilities::CreatePropertyOnScope() kismetcompilermisc.cpp:626 
UE4Editor_KismetCompiler! FKismetCompilerContext::CreatePropertiesFromList() kismetcompiler.cpp:627 
UE4Editor_KismetCompiler! FKismetCompilerContext::CreateLocalVariablesForFunction() kismetcompiler.cpp:742 
UE4Editor_KismetCompiler! FKismetCompilerContext::PrecompileFunction() kismetcompiler.cpp:1283 
UE4Editor_KismetCompiler! FKismetCompilerContext::Compile() kismetcompiler.cpp:3397 
UE4Editor_KismetCompiler! FKismet2CompilerModule::CompileBlueprintInner() kismetcompilermodule.cpp:87 
UE4Editor_KismetCompiler! FKismet2CompilerModule::CompileBlueprint() kismetcompilermodule.cpp:128 
UE4Editor_UnrealEd! FKismetEditorUtilities::CompileBlueprint() kismet2.cpp:742 
UE4Editor_Kismet! FBlueprintEditor::Compile() blueprinteditor.cpp:2990 
UE4Editor_Kismet! TBaseSPMethodDelegateInstance<0,FBlueprintEditor,0,TTypeWrapper<void> __cdecl() delegateinstancesimpl_variadics.inl:282 
UE4Editor_Kismet! TBaseSPMethodDelegateInstance<0,FBlueprintEditor,0,void __cdecl() delegateinstancesimpl_variadics.inl:388 
UE4Editor_Slate! FUICommandList::ExecuteAction() uicommandlist.cpp:73 
UE4Editor_Slate! SToolBarButtonBlock::OnClicked() stoolbarbuttonblock.cpp:296 
UE4Editor_Slate! TMemberFunctionCaller<SToolBarButtonBlock,FReply() delegateinstanceinterface_variadics.h:161 
UE4Editor_Slate! TTupleImpl<TIntegerSequence<> >::ApplyAfter_ExplicitReturnType<FReply,TMemberFunctionCaller<SToolBarButtonBlock,FReply() tuple.h:113 
UE4Editor_Slate! TBaseSPMethodDelegateInstance<0,SToolBarButtonBlock,0,FReply __cdecl() delegateinstancesimpl_variadics.inl:282 
UE4Editor_Slate! TBaseDelegate<FReply>::Execute() delegatesignatureimpl_variadics.inl:439 
UE4Editor_Slate! SButton::OnMouseButtonUp() sbutton.cpp:228 
UE4Editor_Slate! <lambda_de96dc3471181973108233c6db1f9843>::operator() slateapplication.cpp:3985 
UE4Editor_Slate! FEventRouter::Route<FReply,FEventRouter::FToLeafmostPolicy,FPointerEvent,<lambda_de96dc3471181973108233c6db1f9843> >() slateapplication.cpp:202 
UE4Editor_Slate! FSlateApplication::ProcessMouseButtonUpEvent() slateapplication.cpp:3988 
UE4Editor_Slate! FSlateApplication::OnMouseUp() slateapplication.cpp:3949 
UE4Editor_Core! FWindowsApplication::ProcessDeferredMessage() windowsapplication.cpp:1373 
UE4Editor_Core! FWindowsApplication::DeferMessage() windowsapplication.cpp:1669 
UE4Editor_Core! FWindowsApplication::ProcessMessage() windowsapplication.cpp:742 
UE4Editor_Core! FWindowsApplication::AppWndProc() windowsapplication.cpp:604 
user32! UserCallWinProcCheckWow() 
user32! DispatchMessageWorker() 
UE4Editor_Core! FWindowsPlatformMisc::PumpMessages() windowsplatformmisc.cpp:774 
UE4Editor! FEngineLoop::Tick() launchengineloop.cpp:2233 
UE4Editor! GuardedMain() launch.cpp:142 
UE4Editor! GuardedMainWrapper() launchwindows.cpp:126 
UE4Editor! WinMain() launchwindows.cpp:202 

Steps to Reproduce

1. Open any project
2. Create a new Actor Blueprint
3. Create a new function
4. Add a local variable of any type, "TestVar"
5. Add an Output
6. Name the Output, "TestVar"
7. Compile

Result:
Error Internal Compiler Error: Tried to create a property TestVar in scope NewFunction_0, but another object of type (null) already already exists there.

Expected:
Outputs do not allow you to name them the same name as a local variable (Input is already like this)

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

0
Login to Vote

Cannot Reproduce
ComponentUE - Gameplay - Blueprint
Affects Versions4.7.54.8
Target Fix4.8
CreatedApr 15, 2015
ResolvedApr 20, 2015
UpdatedApr 27, 2018
View Jira Issue