Pure virtual functions compile error

This compile error randomly started happening, and I’m not sure what I had done to cause it. How would I go about pinpointing this issue?


2>    Running UnrealHeaderTool "" "" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
2>LogWindows : error : === Critical error: ===
2>  LowLevelFatalError [File:] [Line: 129]
2>  Pure virtual not implemented (UProperty::GetCPPTypeForwardDeclaration)
2>Error : Failed to generate code for SwatterEditor - error code: CrashOrAssert (3)
2>  UnrealHeaderTool failed for target 'SwatterEditor' (platform: Win64, module info: ).
2>): error MSB3073: The command "" "" -waitmutex" exited with code 3.

Unfortunately, if the compiler does not point to a specific line where the error occured, the only way to find the error, is to carefully read through the code. A good practice to prevent critical errors from happening, is to always backup your source files, and even to keep all your old backups. This way it will always be possible to isolate the problem with a working build and adding each change you did one at a time until the error occurs. This can be the difference between weeks to months of down time finding an elusive bug, compared to reverting back and simply rewriting the buggy part.

It does not seem to be a compile error related to the code in your project (at least not directly). But it seems that during the build process when UnrealHeaderTool runs with the commandline arguments “” “” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -installed". It crashes because UProperty::GetCPPTypeForwardDeclaration is not implemented by some subclass.
You can try to debug UnrealHeaderTool to see where it’s going wrong. If you’re using a custom build from engine source you can even make the necessary changes yourself and have the entire Unreal Engine community profit from it by creating a pull request for Epic to consider your changes.

@UnrealEverything You’re my hero. I would never consider changing the engine to make a custom build, that’s way to complicated. Nice youtube channel:D

How would I debug UHT if not from source? I can’t find a target for it.

Ended up fixing it anyway, didn’t realize that TMaps can’t be used as parameters or return values. Would be nice to have a more obvious error message for it.