Description

The Editor crashes if an unhashable struct is used as a key in a TMap and a new element is added to the TMap in a Blueprint.

Steps to Reproduce
  1. Create a new Basic Code project.
  2. Add a new Actor code class to the project.
  3. In the header file for the new Actor class, add #include "GameplayTagContainer.h" at the top of the file.
  4. In the body of the class, add the following property:
    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = TestCat)
    TMap<FGameplayTagContainer, float> MyMap;
    
  5. In the Editor, create a Blueprint based on the new Actor class.
  6. Open the new Blueprint.
  7. Locate the MyMap property and add a new element to the TMap.

RESULT:
The Editor crashes with the error: Assertion failed: PropertyFlags & CPF_HasGetValueTypeHash [Link Removed] [Line: 1257]

EXPECTED:
A warning is displayed that an unhashable struct cannot be used as a key for a TMap.

Callstack
Assertion failed: PropertyFlags & CPF_HasGetValueTypeHash [File:D:\Main-Builds\Stream\Engine\Source\Runtime\CoreUObject\Private\UObject\Property.cpp] [Line: 1257] 



UE4Editor_Core!FDebug::AssertFailed() [d:\main-builds\stream\engine\source\runtime\core\private\misc\assertionmacros.cpp:349]
UE4Editor_CoreUObject!UProperty::GetValueTypeHash() [d:\main-builds\stream\engine\source\runtime\coreuobject\private\uobject\property.cpp:1258]
UE4Editor_CoreUObject!FScriptSet::Rehash() [d:\main-builds\stream\engine\source\runtime\core\public\containers\set.h:1430]
UE4Editor_CoreUObject!FScriptMapHelper::Rehash() [d:\main-builds\stream\engine\source\runtime\coreuobject\private\uobject\propertymap.cpp:1021]
UE4Editor_PropertyEditor!FPropertyNode::PropagateContainerPropertyChange() [d:\main-builds\stream\engine\source\editor\propertyeditor\private\propertynode.cpp:2815]
UE4Editor_PropertyEditor!FPropertyValueImpl::AddChild() [d:\main-builds\stream\engine\source\editor\propertyeditor\private\propertyhandleimpl.cpp:1226]
UE4Editor_PropertyEditor!FPropertyHandleMap::AddItem() [d:\main-builds\stream\engine\source\editor\propertyeditor\private\propertyhandleimpl.cpp:3973]
UE4Editor_PropertyEditor!FPropertyEditor::OnAddItem() [d:\main-builds\stream\engine\source\editor\propertyeditor\private\presentation\propertyeditor\propertyeditor.cpp:216]
UE4Editor_PropertyEditor!TBaseSPMethodDelegateInstance<0,FPropertyEditor,0,TTypeWrapper<void> __cdecl(void)>::Execute() [d:\main-builds\stream\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:327]
UE4Editor_PropertyEditor!TBaseSPMethodDelegateInstance<0,FPropertyEditor,0,void __cdecl(void)>::ExecuteIfSafe() [d:\main-builds\stream\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:433]
UE4Editor_PropertyEditor!SDetailsViewBase::Tick() [d:\main-builds\stream\engine\source\editor\propertyeditor\private\sdetailsviewbase.cpp:1095]
UE4Editor_SlateCore!SWidget::Paint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\swidget.cpp:777]
UE4Editor_SlateCore!SPanel::PaintArrangedChildren() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\spanel.cpp:46]
UE4Editor_SlateCore!SPanel::OnPaint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\spanel.cpp:21]
UE4Editor_SlateCore!SWidget::Paint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\swidget.cpp:780]
UE4Editor_Slate!SBox::OnPaint() [d:\main-builds\stream\engine\source\runtime\slate\private\widgets\layout\sbox.cpp:237]
UE4Editor_SlateCore!SWidget::Paint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\swidget.cpp:780]
UE4Editor_SlateCore!SPanel::PaintArrangedChildren() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\spanel.cpp:46]
UE4Editor_SlateCore!SPanel::OnPaint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\spanel.cpp:21]
UE4Editor_SlateCore!SWidget::Paint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\swidget.cpp:780]
UE4Editor_SlateCore!SCompoundWidget::OnPaint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:37]
UE4Editor_Slate!SBorder::OnPaint() [d:\main-builds\stream\engine\source\runtime\slate\private\widgets\layout\sborder.cpp:86]
UE4Editor_SlateCore!SWidget::Paint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\swidget.cpp:780]
UE4Editor_SlateCore!SPanel::PaintArrangedChildren() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\spanel.cpp:46]
UE4Editor_SlateCore!SPanel::OnPaint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\spanel.cpp:21]
UE4Editor_SlateCore!SWidget::Paint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\swidget.cpp:780]
UE4Editor_SlateCore!SCompoundWidget::OnPaint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:37]
UE4Editor_SlateCore!SWidget::Paint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\swidget.cpp:780]
UE4Editor_SlateCore!SCompoundWidget::OnPaint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:37]
UE4Editor_Slate!SBorder::OnPaint() [d:\main-builds\stream\engine\source\runtime\slate\private\widgets\layout\sborder.cpp:86]
UE4Editor_SlateCore!SWidget::Paint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\swidget.cpp:780]
UE4Editor_SlateCore!SOverlay::OnPaint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\soverlay.cpp:102]
UE4Editor_SlateCore!SWidget::Paint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\swidget.cpp:780]
UE4Editor_SlateCore!SPanel::PaintArrangedChildren() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\spanel.cpp:46]
UE4Editor_SlateCore!SPanel::OnPaint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\spanel.cpp:21]
UE4Editor_SlateCore!SWidget::Paint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\swidget.cpp:780]
UE4Editor_SlateCore!SCompoundWidget::OnPaint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:37]
UE4Editor_SlateCore!SWidget::Paint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\swidget.cpp:780]
UE4Editor_SlateCore!SPanel::PaintArrangedChildren() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\spanel.cpp:46]
UE4Editor_Slate!SSplitter::OnPaint() [d:\main-builds\stream\engine\source\runtime\slate\private\widgets\layout\ssplitter.cpp:168]
UE4Editor_SlateCore!SWidget::Paint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\swidget.cpp:780]
UE4Editor_SlateCore!SOverlay::OnPaint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\soverlay.cpp:102]
UE4Editor_SlateCore!SWidget::Paint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\swidget.cpp:780]
UE4Editor_SlateCore!SCompoundWidget::OnPaint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:37]
UE4Editor_SlateCore!SWidget::Paint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\swidget.cpp:780]
UE4Editor_SlateCore!SPanel::PaintArrangedChildren() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\spanel.cpp:46]
UE4Editor_SlateCore!SPanel::OnPaint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\spanel.cpp:21]
UE4Editor_SlateCore!SWidget::Paint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\swidget.cpp:780]
UE4Editor_SlateCore!SCompoundWidget::OnPaint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:37]
UE4Editor_SlateCore!SWidget::Paint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\swidget.cpp:780]
UE4Editor_SlateCore!SCompoundWidget::OnPaint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:37]
UE4Editor_Slate!SBorder::OnPaint() [d:\main-builds\stream\engine\source\runtime\slate\private\widgets\layout\sborder.cpp:86]
UE4Editor_SlateCore!SWidget::Paint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\swidget.cpp:780]
UE4Editor_SlateCore!SOverlay::OnPaint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\soverlay.cpp:102]
UE4Editor_SlateCore!SWidget::Paint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\swidget.cpp:780]
UE4Editor_SlateCore!SPanel::PaintArrangedChildren() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\spanel.cpp:46]
UE4Editor_SlateCore!SPanel::OnPaint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\spanel.cpp:21]
UE4Editor_SlateCore!SWidget::Paint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\swidget.cpp:780]
UE4Editor_SlateCore!SCompoundWidget::OnPaint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:37]
UE4Editor_SlateCore!SWidget::Paint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\swidget.cpp:780]
UE4Editor_SlateCore!SPanel::PaintArrangedChildren() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\spanel.cpp:46]
UE4Editor_Slate!SSplitter::OnPaint() [d:\main-builds\stream\engine\source\runtime\slate\private\widgets\layout\ssplitter.cpp:168]
UE4Editor_SlateCore!SWidget::Paint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\swidget.cpp:780]
UE4Editor_SlateCore!SOverlay::OnPaint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\soverlay.cpp:102]
UE4Editor_SlateCore!SWidget::Paint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\swidget.cpp:780]
UE4Editor_SlateCore!SCompoundWidget::OnPaint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:37]
UE4Editor_SlateCore!SWidget::Paint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\swidget.cpp:780]
UE4Editor_SlateCore!SPanel::PaintArrangedChildren() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\spanel.cpp:46]
UE4Editor_SlateCore!SPanel::OnPaint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\spanel.cpp:21]
UE4Editor_SlateCore!SWidget::Paint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\swidget.cpp:780]
UE4Editor_SlateCore!SPanel::PaintArrangedChildren() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\spanel.cpp:46]
UE4Editor_SlateCore!SPanel::OnPaint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\spanel.cpp:21]
UE4Editor_SlateCore!SWidget::Paint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\swidget.cpp:780]
UE4Editor_SlateCore!SOverlay::OnPaint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\soverlay.cpp:102]
UE4Editor_SlateCore!SWidget::Paint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\swidget.cpp:780]
UE4Editor_SlateCore!SCompoundWidget::OnPaint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:37]
UE4Editor_SlateCore!SWindow::OnPaint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\swindow.cpp:1831]
UE4Editor_SlateCore!SWidget::Paint() [d:\main-builds\stream\engine\source\runtime\slatecore\private\widgets\swidget.cpp:780]
UE4Editor_Slate!FSlateApplication::DrawWindowAndChildren() [d:\main-builds\stream\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1159]
UE4Editor_Slate!FSlateApplication::DrawWindowAndChildren() [d:\main-builds\stream\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1248]
UE4Editor_Slate!FSlateApplication::PrivateDrawWindows() [d:\main-builds\stream\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1399]
UE4Editor_Slate!FSlateApplication::DrawWindows() [d:\main-builds\stream\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1116]
UE4Editor_Slate!FSlateApplication::TickApplication() [d:\main-builds\stream\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1721]
UE4Editor_Slate!FSlateApplication::Tick() [d:\main-builds\stream\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1513]
UE4Editor!FEngineLoop::Tick() [d:\main-builds\stream\engine\source\runtime\launch\private\launchengineloop.cpp:3124]
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-42441 in the post.

3
Login to Vote

Fixed
ComponentUE - Gameplay - Blueprint
Affects Versions4.154.16
Target Fix4.16
Fix Commit3336694
Main Commit3345747
CreatedFeb 28, 2017
ResolvedMar 8, 2017
UpdatedApr 27, 2018
View Jira Issue