Branch: Source build, 4.10 (#define BRANCH_NAME “+depot+UE4-Releases+4.10”)
Description: Unreal Header Tool parsing fails silently with valid c++ multi-line comment syntax.
Repro steps:
-
Compile this (fix up slightly with API and whatever else):
/*
*/
UCLASS()
class UThisClassIsDetectedAsExpected : public UObject
{
GENERATED_BODY()
};/*
/*
*/
UCLASS()
class UThisClassWillBeIgnoredAlongWithSubsequentClassesDeclaredInThisSameFile : public UObject
{
GENERATED_BODY()
};
The result of the bug is that when you compile your project, UnrealHeaderTool.exe crashes (assert fails) with this:
**
1> [PathToHeaderFile]: LogWindows:Error: Windows GetLastError: The operation completed successfully. (0)
1> [PathToHeaderFile] : LogWindows:Error: === Critical error: ===
1> Assertion failed: FoundClass [File:\Public\Engine\Source\Programs\UnrealHeaderTool\Private\HeaderParser.cpp] [Line: 4410]
1>Error : Failed to generate code for [ProjectName] - error code: CrashOrAssert (3)
1> UnrealHeaderTool failed for target [ProjectName] (platform: Win64, module info: [ProjectPath]\Intermediate\Build\Win64[ProjectName]\Development\UnrealHeaderTool.manifest).
**
Easy workaround by not using nested multi-line comments. But very hard to track down the root cause when it happens