Description

Editing property with InlineEditConditionToggle meta specifier causes the editor to crash.

Workaround:
Calling Super::PostEditChangeProperty after property changing code prevents crash from occurring.

Steps to Reproduce
  1. Open UE4 Editor (any project)
  2. Add code to project based on Actor Component (MyActorComp)
  3. Add include statement for Engine.h to MyActorComp.h include list
  4. Add following struct between include list and UCLASS() macro
    USTRUCT()
    struct FTestStruct
    {
    	GENERATED_BODY()
    
    		UPROPERTY(EditAnywhere)
    		int32 Prop;
    
    	UPROPERTY(EditAnywhere, Meta = (InlineEditConditionToggle))
    		bool bEditConditionProp;
    
    	UPROPERTY(EditAnywhere, Meta = (EditCondition = bEditConditionProp))
    		int32 OtherProp;
    };
    
  5. Add following code to class declaration:
    #if WITH_EDITOR
    	virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override
    	{
    		Super::PostEditChangeProperty(PropertyChangedEvent);
    		for (FTestStruct& TestStruct : TestArray)
    		{
    			TestStruct.Prop = 1;
    		}
    	}
    #endif
    
    	UPROPERTY(EditAnywhere)
    		TArray<FTestStruct> TestArray;
    
  6. Compile
  7. Add blueprint based on Actor (ActorBP)
  8. Add MyActorComp component to ActorBP
  9. Set number of elements of TestArray to two
  10. Click the checkbox for "OtherProp" of element two

Result:
The editor crashes with listed callstack

Expected:
Checkbox is updated and editor continues to run

Callstack
MachineId:7156C35640F86204E61B8383F45DEE17
EpicAccountId:c807849e05a0413d99e379f2802cae9c

Assertion failed: ContainerPtr [File:D:\Build\++UE4+Release-4.13+Compile\Sync\Engine\Source\Runtime\CoreUObject\Public\UObject\UnrealType.h] [Line: 303] 



UE4Editor_Core!FDebug::AssertFailed() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\private\misc\outputdevice.cpp:421]
UE4Editor_PropertyEditor!FPropertyEditor::SetEditConditionState() [d:\build\++ue4+release-4.13+compile\sync\engine\source\editor\propertyeditor\private\presentation\propertyeditor\propertyeditor.cpp:385]
UE4Editor_PropertyEditor!TBaseSPMethodDelegateInstance<0,SEditConditionWidget,0,TTypeWrapper<void> __cdecl(enum ECheckBoxState)>::Execute() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:317]
UE4Editor_PropertyEditor!TBaseSPMethodDelegateInstance<0,SEditConditionWidget,0,void __cdecl(enum ECheckBoxState)>::ExecuteIfSafe() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:424]
UE4Editor_Slate!SCheckBox::ToggleCheckedState() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\slate\private\widgets\input\scheckbox.cpp:293]
UE4Editor_Slate!SCheckBox::OnMouseButtonUp() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\slate\private\widgets\input\scheckbox.cpp:184]
UE4Editor_Slate!<lambda_8d0e9a1da76abd0a756a3a9d775f5ed1>::operator()() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:4901]
UE4Editor_Slate!FEventRouter::Route<FReply,FEventRouter::FToLeafmostPolicy,FPointerEvent,<lambda_8d0e9a1da76abd0a756a3a9d775f5ed1> >() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:215]
UE4Editor_Slate!FSlateApplication::RoutePointerUpEvent() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:4890]
UE4Editor_Slate!FSlateApplication::ProcessMouseButtonUpEvent() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:5348]
UE4Editor_Slate!FSlateApplication::OnMouseUp() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:5328]
UE4Editor_Core!FWindowsApplication::ProcessDeferredMessage() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\private\windows\windowsapplication.cpp:1584]
UE4Editor_Core!FWindowsApplication::DeferMessage() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\private\windows\windowsapplication.cpp:1930]
UE4Editor_Core!FWindowsApplication::ProcessMessage() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\private\windows\windowsapplication.cpp:747]
UE4Editor_Core!FWindowsApplication::AppWndProc() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\private\windows\windowsapplication.cpp:669]
user32
user32
UE4Editor_Core!FWindowsPlatformMisc::PumpMessages() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\private\windows\windowsplatformmisc.cpp:905]
UE4Editor!FEngineLoop::Tick() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:2788]
UE4Editor!GuardedMain() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\launch\private\launch.cpp:156]
UE4Editor!GuardedMainWrapper() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:202]
UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264]
kernel32
ntdll

Have Comments or More Details?

There's no existing public thread on this issue, so head over toAnswerHub just mention UE-37029 in the post.

0
Login to Vote

Fixed
ComponentTools
Affects Versions4.13.1
Target Fix4.14
Fix Commit3164775
Release Commit3164775
CreatedOct 7, 2016
ResolvedOct 17, 2016
UpdatedFeb 4, 2019