UPROPERTY TMap prevents compile

On 4.10.1 binary.

The following crashes UHT:

TMap<FName, bool> ScanDatabase;

With error:

2>  Parsing headers for SpaceGameEditor
2>    Running UnrealHeaderTool "C:\projects\perforce\Arconia\SpaceGame.uproject" "C:\projects\perforce\Arconia\Intermediate\Build\Win64\SpaceGameEditor\DebugGame\UnrealHeaderTool.manifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -rocket -installed
2>LogWindows : error : Windows GetLastError: The operation completed successfully. (0)
2>LogWindows : error : === Critical error: ===
2>  Assertion failed: SourceStruct [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.10\Engine\Source\Programs\UnrealHeaderTool\Private\CodeGenerator.cpp] [Line: 1012]
2>Error : Failed to generate code for SpaceGameEditor - error code: CrashOrAssert (3)
2>  UnrealHeaderTool failed for target 'SpaceGameEditor' (platform: Win64, module info: C:\projects\perforce\Arconia\Intermediate\Build\Win64\SpaceGameEditor\DebugGame\UnrealHeaderTool.manifest).
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(37,5): error MSB3073: The command ""C:\Program Files\Unreal Engine\4.10\Engine\Build\BatchFiles\Build.bat" SpaceGameEditor Win64 DebugGame "C:\projects\perforce\Arconia\SpaceGame.uproject" -rocket -waitmutex" exited with code -1.
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

While I’m here, is there any way to get better info out of UHT that would let me track down the offending header or line of code causing the error? I ran filemon to see all of the files that UnrealHeaderTool.exe touched, investigated 3 different log files spread out between my project folder, the UE4 binary folder and my local appdata. None of these logs had any real information on why header generation failed. In the end it was trial and error commenting out all the recent .h changes in my changelist.

I remember now that TMap’s as UPROPERTY’s have historically had some issues, but it took me a few hours of flailing to remember that. If there are any Epic tips on tracking this down I’d really appreciate knowing them for the future.

Hey -

I was able to reproduce the compile error and have entered a bug report (UE-24551) for investigation. It appears that the issue is with the “bool”, you can instead use an int8 or uint8 with a value of 0 or 1 which will compile without any issue.