Description

Using a struct containing an instanced object property as the value for a TMap results in a crash if a Blueprint of the class containing the TMap is subclassed and the child Blueprint is opened the next time the Editor is opened.

Steps to Reproduce
  1. Create a new code project using the Basic Code template.
  2. Add a new code class to the project that is derived from ActorComponent.
  3. Add the following struct to the new header file:
    USTRUCT()
    struct FMyStruct
    {
    	GENERATED_BODY()
    
    	UPROPERTY(EditAnywhere, BlueprintReadWrite, Instanced, Category = TestCat)
    	UObject* TheObject;
    };
    
  4. Add the following TMap property to the body of the new ActorComponent class:
    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = TestCat)
    TMap<int32, FMyStruct> TheMap;
    
  5. Build the project in Visual Studio.
  6. Open the project in the Editor.
  7. Create a new Actor Blueprint.
  8. Add the component created in step 2 to the new Blueprint.
  9. Select the component and add one or more elements to the TMap property (it is not necessary to set the value for each element).
  10. Create a new Blueprint that is a child of the Blueprint created in step 7.
  11. In the child Blueprint, select the component from step 8 and add one or more new elements to the TMap.
  12. Save everything.
  13. Close the Editor.
  14. Re-open the project in the Editor.
  15. Double-click the Child Blueprint to open it.

RESULT:
The Editor crashes and displays the following error: Assertion failed: IndexHint >= 0 && IndexHint < MapMax

EXPECTED:
The Blueprint opens.

Callstack
Assertion failed: IndexHint >= 0 && IndexHint < MapMax [File:D:\Main-Builds\Stream\Engine\Source\Runtime\CoreUObject\Public\UObject/UnrealType.h] [Line: 3209] 

UE4Editor_Core!FDebug::AssertFailed() [d:\main-builds\stream\engine\source\runtime\core\private\misc\assertionmacros.cpp:349]
UE4Editor_CoreUObject!FScriptMapHelper::FindMapIndexWithKey() [d:\main-builds\stream\engine\source\runtime\coreuobject\public\uobject\unrealtype.h:3211]
UE4Editor_CoreUObject!UMapProperty::InstanceSubobjects() [d:\main-builds\stream\engine\source\runtime\coreuobject\private\uobject\propertymap.cpp:766]
UE4Editor_CoreUObject!UStruct::InstanceSubobjectTemplates() [d:\main-builds\stream\engine\source\runtime\coreuobject\private\uobject\class.cpp:1455]
UE4Editor_CoreUObject!UObject::InstanceSubobjectTemplates() [d:\main-builds\stream\engine\source\runtime\coreuobject\private\uobject\obj.cpp:2393]
UE4Editor_CoreUObject!UObject::PostLoadSubobjects() [d:\main-builds\stream\engine\source\runtime\coreuobject\private\uobject\obj.cpp:1024]
UE4Editor_CoreUObject!UObject::ConditionalPostLoad() [d:\main-builds\stream\engine\source\runtime\coreuobject\private\uobject\obj.cpp:941]
UE4Editor_CoreUObject!EndLoad() [d:\main-builds\stream\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1666]
UE4Editor_CoreUObject!LoadPackageInternalInner() [d:\main-builds\stream\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1348]
UE4Editor_CoreUObject!LoadPackage() [d:\main-builds\stream\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1508]
UE4Editor_CoreUObject!ResolveName() [d:\main-builds\stream\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:769]
UE4Editor_CoreUObject!StaticLoadObjectInternal() [d:\main-builds\stream\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:856]
UE4Editor_CoreUObject!StaticLoadObject() [d:\main-builds\stream\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:920]
UE4Editor_ContentBrowser!FAssetData::GetAsset() [d:\main-builds\stream\engine\source\runtime\assetregistry\public\assetdata.h:249]
UE4Editor_ContentBrowser!SContentBrowser::OnAssetsActivated() [d:\main-builds\stream\engine\source\editor\contentbrowser\private\scontentbrowser.cpp:1848]
UE4Editor_ContentBrowser!TBaseSPMethodDelegateInstance<0,SContentBrowser,0,TTypeWrapper<void> __cdecl(TArray<FAssetData,FDefaultAllocator> const & __ptr64,enum EAssetTypeActivationMethod::Type)>::Execute() [d:\main-builds\stream\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:327]
UE4Editor_ContentBrowser!TBaseSPMethodDelegateInstance<0,SContentBrowser,0,void __cdecl(TArray<FAssetData,FDefaultAllocator> const & __ptr64,enum EAssetTypeActivationMethod::Type)>::ExecuteIfSafe() [d:\main-builds\stream\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:434]
UE4Editor_ContentBrowser!TBaseDelegate<void,TArray<FAssetData,FDefaultAllocator> const & __ptr64,enum EAssetTypeActivationMethod::Type>::ExecuteIfBound() [d:\main-builds\stream\engine\source\runtime\core\public\delegates\delegatesignatureimpl.inl:624]
UE4Editor_ContentBrowser!SAssetView::OnListMouseButtonDoubleClick() [d:\main-builds\stream\engine\source\editor\contentbrowser\private\sassetview.cpp:3755]
UE4Editor_ContentBrowser!TBaseSPMethodDelegateInstance<0,SAssetView,0,TTypeWrapper<void> __cdecl(TSharedPtr<FAssetViewItem,0>)>::Execute() [d:\main-builds\stream\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:327]
UE4Editor_ContentBrowser!TBaseSPMethodDelegateInstance<0,SAssetView,0,void __cdecl(TSharedPtr<FAssetViewItem,0>)>::ExecuteIfSafe() [d:\main-builds\stream\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:434]
UE4Editor_ContentBrowser!TBaseDelegate<void,TSharedPtr<FAssetViewItem,0> >::ExecuteIfBound() [d:\main-builds\stream\engine\source\runtime\core\public\delegates\delegatesignatureimpl.inl:624]
UE4Editor_ContentBrowser!SListView<TSharedPtr<FAssetViewItem,0> >::Private_OnItemDoubleClicked() [d:\main-builds\stream\engine\source\runtime\slate\public\widgets\views\slistview.h:815]
UE4Editor_ContentBrowser!STableRow<TSharedPtr<FAssetViewItem,0> >::OnMouseButtonDoubleClick() [d:\main-builds\stream\engine\source\runtime\slate\public\widgets\views\stablerow.h:290]
UE4Editor_Slate!<lambda_eeb33fd1b480e3cad58a1531d90d2e14>::operator()() [d:\main-builds\stream\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:5448]
UE4Editor_Slate!FEventRouter::Route<FReply,FEventRouter::FBubblePolicy,FPointerEvent,<lambda_eeb33fd1b480e3cad58a1531d90d2e14> >() [d:\main-builds\stream\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:239]
UE4Editor_Slate!FSlateApplication::RoutePointerDoubleClickEvent() [d:\main-builds\stream\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:5446]
UE4Editor_Slate!FSlateApplication::ProcessMouseButtonDoubleClickEvent() [d:\main-builds\stream\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:5429]
UE4Editor_Slate!FSlateApplication::OnMouseDoubleClick() [d:\main-builds\stream\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:5407]
UE4Editor_Core!FWindowsApplication::ProcessDeferredMessage() [d:\main-builds\stream\engine\source\runtime\core\private\windows\windowsapplication.cpp:1702]
UE4Editor_Core!FWindowsApplication::DeferMessage() [d:\main-builds\stream\engine\source\runtime\core\private\windows\windowsapplication.cpp:2120]
UE4Editor_Core!FWindowsApplication::ProcessMessage() [d:\main-builds\stream\engine\source\runtime\core\private\windows\windowsapplication.cpp:867]
UE4Editor_Core!FWindowsApplication::AppWndProc() [d:\main-builds\stream\engine\source\runtime\core\private\windows\windowsapplication.cpp:714]
user32
user32
UE4Editor_Core!FWindowsPlatformMisc::PumpMessages() [d:\main-builds\stream\engine\source\runtime\core\private\windows\windowsplatformmisc.cpp:980]
UE4Editor!FEngineLoop::Tick() [d:\main-builds\stream\engine\source\runtime\launch\private\launchengineloop.cpp:3020]
UE4Editor!GuardedMain() [d:\main-builds\stream\engine\source\runtime\launch\private\launch.cpp:166]
UE4Editor!GuardedMainWrapper() [d:\main-builds\stream\engine\source\runtime\launch\private\windows\launchwindows.cpp:134]
UE4Editor!WinMain() [d:\main-builds\stream\engine\source\runtime\launch\private\windows\launchwindows.cpp:210]
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 to Questions & Answers just mention UE-43272 in the post.

1
Login to Vote

Fixed
ComponentUE - Foundation - Core
Affects Versions4.14.34.16
Target Fix4.16
Fix Commit3361906
Main Commit3386123
CreatedMar 23, 2017
ResolvedMar 23, 2017
UpdatedApr 27, 2018