Crash when using a Map?

I was working on the menu for a project, and ran into a very strange issue when I opened it today; it would crash when I tried to open (or even right-click) certain UAssets. Apparently, it was crashing for any file connected to one particular file. I was able to remove that file for long enough to disconnect the chain (only one file directly referenced it, the rest referenced that file), but the file is still impossible to interact with in any meaningful way.

The following is the crashlog that occurs:
[SPOILER]


Assertion failed: PropertyFlags & CPF_HasGetValueTypeHash [File:D:\Build\++UE4+Release-4.15+Compile\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\Property.cpp] [Line: 1240] 



KERNELBASE.dll!0x00000000E2AA7788
UE4Editor-Core.dll!FOutputDeviceWindowsError::Serialize() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\core\private\windows\windowsplatformoutputdevices.cpp:120]
UE4Editor-Core.dll!FOutputDevice::Logf__VA() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\core\private\misc\outputdevice.cpp:70]
UE4Editor-Core.dll!FDebug::AssertFailed() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\core\private\misc\assertionmacros.cpp:349]
UE4Editor-CoreUObject.dll!UProperty::GetValueTypeHash() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\private\uobject\property.cpp:1241]
UE4Editor-CoreUObject.dll!FScriptSet::Rehash() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\core\public\containers\set.h:1430]
UE4Editor-CoreUObject.dll!UMapProperty::SerializeItem() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\private\uobject\propertymap.cpp:328]
UE4Editor-CoreUObject.dll!FPropertyTag::SerializeTaggedProperty() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\private\uobject\propertytag.cpp:180]
UE4Editor-CoreUObject.dll!UStruct::SerializeTaggedProperties() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:1105]
UE4Editor-CoreUObject.dll!UClass::SerializeDefaultObject() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:3708]
UE4Editor-Engine.dll!UBlueprintGeneratedClass::SerializeDefaultObject() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\engine\private\blueprintgeneratedclass.cpp:286]
UE4Editor-CoreUObject.dll!FLinkerLoad::Preload() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3429]
UE4Editor-CoreUObject.dll!FLinkerLoad::ResolveDeferredExports() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\private\blueprint\blueprintsupport.cpp:1597]
UE4Editor-CoreUObject.dll!FLinkerLoad::FinalizeBlueprint() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\private\blueprint\blueprintsupport.cpp:1383]
UE4Editor-CoreUObject.dll!FLinkerLoad::Preload() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3483]
UE4Editor-CoreUObject.dll!FLinkerLoad::CreateExport() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:4148]
UE4Editor-CoreUObject.dll!FLinkerLoad::IndexToObject() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:4370]
UE4Editor-CoreUObject.dll!FLinkerLoad::CreateExport() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3844]
UE4Editor-CoreUObject.dll!FLinkerLoad::IndexToObject() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:4370]
UE4Editor-CoreUObject.dll!FLinkerLoad::CreateExport() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3844]
UE4Editor-CoreUObject.dll!FLinkerLoad::CreateExportAndPreload() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:2894]
UE4Editor-CoreUObject.dll!FLinkerLoad::LoadAllObjects() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\private\uobject\linkerload.cpp:3041]
UE4Editor-CoreUObject.dll!LoadPackageInternalInner() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1311]
UE4Editor-CoreUObject.dll!LoadPackage() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1477]
UE4Editor-CoreUObject.dll!ResolveName() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:756]
UE4Editor-CoreUObject.dll!StaticLoadObjectInternal() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:843]
UE4Editor-CoreUObject.dll!StaticLoadObject() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:903]
UE4Editor-ContentBrowser.dll!FAssetData::GetAsset() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\assetregistry\public\assetdata.h:232]
UE4Editor-ContentBrowser.dll!SContentBrowser::OnAssetsActivated() [d:\build\++ue4+release-4.15+compile\sync\engine\source\editor\contentbrowser\private\scontentbrowser.cpp:1848]
UE4Editor-ContentBrowser.dll!TBaseSPMethodDelegateInstance<0,SContentBrowser,0,TTypeWrapper<void> __cdecl(TArray<FAssetData,FDefaultAllocator> const & __ptr64,enum EAssetTypeActivationMethod::Type)>::Execute() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:327]
UE4Editor-ContentBrowser.dll!TBaseSPMethodDelegateInstance<0,SContentBrowser,0,void __cdecl(TArray<FAssetData,FDefaultAllocator> const & __ptr64,enum EAssetTypeActivationMethod::Type)>::ExecuteIfSafe() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:434]
UE4Editor-ContentBrowser.dll!TBaseDelegate<void,TArray<FAssetData,FDefaultAllocator> const & __ptr64,enum EAssetTypeActivationMethod::Type>::ExecuteIfBound() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\core\public\delegates\delegatesignatureimpl.inl:624]
UE4Editor-ContentBrowser.dll!SAssetView::OnListMouseButtonDoubleClick() [d:\build\++ue4+release-4.15+compile\sync\engine\source\editor\contentbrowser\private\sassetview.cpp:3693]
UE4Editor-ContentBrowser.dll!TBaseSPMethodDelegateInstance<0,SAssetView,0,TTypeWrapper<void> __cdecl(TSharedPtr<FAssetViewItem,0>)>::Execute() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:327]
UE4Editor-ContentBrowser.dll!TBaseSPMethodDelegateInstance<0,SAssetView,0,void __cdecl(TSharedPtr<FAssetViewItem,0>)>::ExecuteIfSafe() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:434]
UE4Editor-ContentBrowser.dll!TBaseDelegate<void,TSharedPtr<FAssetViewItem,0> >::ExecuteIfBound() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\core\public\delegates\delegatesignatureimpl.inl:624]
UE4Editor-ContentBrowser.dll!SListView<TSharedPtr<FAssetViewItem,0> >::Private_OnItemDoubleClicked() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\slate\public\widgets\views\slistview.h:800]
UE4Editor-ContentBrowser.dll!STableRow<TSharedPtr<FAssetViewItem,0> >::OnMouseButtonDoubleClick() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\slate\public\widgets\views\stablerow.h:287]
UE4Editor-Slate.dll!<lambda_eeb33fd1b480e3cad58a1531d90d2e14>::operator()() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:5473]
UE4Editor-Slate.dll!FEventRouter::Route<FReply,FEventRouter::FBubblePolicy,FPointerEvent,<lambda_eeb33fd1b480e3cad58a1531d90d2e14> >() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:238]
UE4Editor-Slate.dll!FSlateApplication::RoutePointerDoubleClickEvent() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:5471]
UE4Editor-Slate.dll!FSlateApplication::ProcessMouseButtonDoubleClickEvent() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:5454]
UE4Editor-Slate.dll!FSlateApplication::OnMouseDoubleClick() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:5432]
UE4Editor-Core.dll!FWindowsApplication::ProcessDeferredMessage() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\core\private\windows\windowsapplication.cpp:1702]
UE4Editor-Core.dll!FWindowsApplication::DeferMessage() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\core\private\windows\windowsapplication.cpp:2120]
UE4Editor-Core.dll!FWindowsApplication::ProcessMessage() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\core\private\windows\windowsapplication.cpp:867]
UE4Editor-Core.dll!FWindowsApplication::AppWndProc() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\core\private\windows\windowsapplication.cpp:714]
USER32.dll!0x00000000E4F31C24
USER32.dll!0x00000000E4F3156C
UE4Editor-Core.dll!FWindowsPlatformMisc::PumpMessages() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\core\private\windows\windowsplatformmisc.cpp:980]
UE4Editor.exe!FEngineLoop::Tick() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:2977]
UE4Editor.exe!GuardedMain() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\launch\private\launch.cpp:166]
UE4Editor.exe!GuardedMainWrapper() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:134]
UE4Editor.exe!WinMain() [d:\build\++ue4+release-4.15+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:210]
UE4Editor.exe!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264]
KERNEL32.DLL!0x00000000E4C78364
ntdll.dll!0x00000000E61470D1
ntdll.dll!0x00000000E61470D1


[/SPOILER]

Now, what I can gather from the log is that it seems to be unable to find a way to hash a certain value type. Therefore, I assume that means it has to do with a Map. There was one map directly in the file, which mapped from a C++ defined Enum to a String. There was also a reference to a map defined in a C++ version of a custom GameInstance which mapped an FString to the same Enum.

The UAsset itself is a UMG widget. Does anyone know what the root cause of this crash may have been? (from a general standpoint) Has anyone had any experience with using a map and getting this kind of problem?

Also, does anyone know if there’s a way to edit the UAsset file itself so at least I can recover the formatting? I really don’t want to have to remake the file from scratch if I can avoid it. I’ve attached the UAsset file, in case anyone knows of a way to edit it externally (it probably isn’t much good on its own). I’m not sure how much editing of UAssets can be done in something like a text editor.

I’d greatly appreciate any degree of help someone could provide for this; I really want to be able to recover the file, and I also need to know how to avoid this from happening again. Feel free to ask for any more information you feel you need.

Alright, so I seem to have narrowed it down to being caused by using my C++ enum as a key in a BP map. So I’m not sure if that means this belongs in the C++ forum now.

It happens for multiple enum classes (all C++; it works fine with BP-defined enums), at least within this particular file. One of the enums is defined as follows:

[SPOILER]


UENUM(BlueprintType)
enum class EKoro : uint8
{
	None	UMETA(DisplayName = "None"),
	Ta		UMETA(DisplayName = "Ta"),
	Ko		UMETA(DisplayName = "Ko"),
	Ga		UMETA(DisplayName = "Ga"),
	Po		UMETA(DisplayName = "Po"),
	Onu		UMETA(DisplayName = "Onu"),
	Le		UMETA(DisplayName = "Le"),
	Av		UMETA(DisplayName = "Av"),
	Kra		UMETA(DisplayName = "Kra"),
	Ba		UMETA(DisplayName = "Ba"),
	Bo		UMETA(DisplayName = "Bo"),
	Ce		UMETA(DisplayName = "Ce"),
	De		UMETA(DisplayName = "De"),
	Fa		UMETA(DisplayName = "Fa"),
	Fe		UMETA(DisplayName = "Fe"),
	Su		UMETA(DisplayName = "Su"),
	Vo		UMETA(DisplayName = "Vo")	
};

[/SPOILER]

I’m not sure why it wouldn’t have a defined hash type, though; because if I’m understanding correctly, it’s based off an unsigned byte, which should already be hashable.

Anyone have an idea? Also, if this does belong in the C++ forum rather than this one (it’s an interconnection issue as far as I can tell, so it could go either way), would it be possible for a moderator to move it accordingly?

Edit:
I was able to recover most of the asset because I had Windows Backup on, but this is still an issue; so I also reported it as a bug on the Answerhub (here).

It seems to have something to do with either C++ enums not having hash functions, or uint8 in general not having hash functions. But it’s also entirely possible it has something to do with how I set it up, I guess. So if anyone has any idea what may have gone wrong, or wants more information, feel free to say so.

Delete Intermediate folder, regenerate vs files, recompile and see if that helps.

That does not appear to fix the problem, but thank you for the suggestion.