4.7 p8 - UHT fails with error code: -1073741819

With the preview 8 release I test updated a big project of ours, but I cannot build it, the UHT keeps crashing with:

1>------ Build started: Project: ProjectName, Configuration: Development_Editor x64 ------
1>  Parsing headers for ProjectNameEditor
1>Error : Failed to generate code for ProjectNameEditor - error code: -1073741819 (-1073741819)
1>  UnrealHeaderTool failed for target 'ProjectNameEditor' (platform: Win64, module info: D:\ProjectName\trunk\UE4\ProjectName\Intermediate\Build\Win64\ProjectNameEditor\Development\UnrealHeaderTool.manifest).
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command ""C:\Program Files\Epic Games\4.7\Engine\Build\BatchFiles\Build.bat" ProjectNameEditor Win64 Development "D:\ProjectName\trunk\UE4\ProjectName\ProjectName.uproject" -rocket" exited with code -1.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I don’t know what to do, I found a few answers to this problem, but I could not get any of them to work. I tried to remove LOCTEXT macros and source files as best I could, but frankly at this point the project is too large to properly test out every source file and configuration. However compiling does work without a problem in 4.6.

greetings,

Hi ,

I tried to reproduce this issue using a code project created in 4.6.1 binary and upgraded to 4.7 preview 8. I was able to build the 4.7 version of the project in Visual Studio without any problems. Would you be able to provide some additional information?

  • Does this issue only happen in your project, or do you see the same results in a new project upgraded to 4.7 preview 8?
  • Was your project initially created in 4.6.1, or did you make it in an earlier version and then upgraded it to 4.6.1?
  • Can you provide the exact steps that you followed when you upgraded your project to try it in 4.7 preview 8?
  • So far none of my other projects had this problem.
  • No, I think it goes back as far as 4.4, but then again I have others being even older and they still work.
  • I have not done much: Downloaded the new preview, right clicked on the uproject file and chose switch engine. Then I regenerated the visual studio files and attempted a full rebuild of the solution.
  • I also tried to create a new project and just copy the code over, but the same crash happens. So my guess is that it has something to do with the code, but I am not at liberty to share it.

Any indication on what the error code means? Are there problem areas to look out for? (e.g. makros)

greetings

I’m having the same issue on the 4.7.1 hotfix release error code: -1073741819 when I try to build.
The project was created in 4.5 then upgraded to 4.6 without issue but now on upgrading to 4.7 I get this issue.
I don’t have any LOCTEXT macros in my code either.
I also like tried to place the code into a fresh project but ran into the same issue so the problem is in the code somewhere.

The logs from the header tool are cut off so it doesn’t exit cleanly, but it always seems to get cut off at the same spot.
I attached it below.

If there is anymore info that I can provide like a way to enable more verbose logging please say as I’d love to get past this issue, thanks :>

Error log from vs2013 community:

1>------ Build started: Project: SpaceSloth, Configuration: Development_Editor x64 ------
2>------ Skipped Build: Project: UE4, Configuration: BuiltWithUnrealBuildTool Win32 ------
2>Project not selected to build for this solution configuration 
1>  Parsing headers for SpaceSlothEditor
1>Error : Failed to generate code for SpaceSlothEditor - error code: -1073741819 (-1073741819)
1>  UnrealHeaderTool failed for target 'SpaceSlothEditor' (platform: Win64, module info: F:\Projects\UE4 Projects\SpaceSloth47\Intermediate\Build\Win64\SpaceSlothEditor\Development\UnrealHeaderTool.manifest).
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command ""F:\Windows_Stuff\Program Files (x86)\Unreal Engine\4.7\Engine\Build\BatchFiles\Build.bat" SpaceSlothEditor Win64 Development "F:\Projects\UE4 Projects\SpaceSloth47\SpaceSloth.uproject" -rocket" exited with code -1.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 1 skipped ==========

UnrealHeaderTool.log

It seems I have found the cause of the crash: Interfaces.

I replaced GENERATED_UINTERFACE_BODY with GENERATED_BODY at some point, probably during the last update and it worked fine until 4.7. Since I corrected the macros everything works fine again and the project compiles.

I also needed to define (not declare) a constructor for the UInterface, which makes me think that something still isn’t completely right with the way interfaces are handled in 4.7.

greetings

You have just made my day, that fixed the issue for me too.

Hi ,

Thank you for the additional investigation and information that you provided related to this issue. I believe you were able to pinpoint the cause of the issue, and it looks like it may be something inadvertently broken in 4.7. I was able to reproduce the same error message that you reported in 4.7, but when I tried the same code in 4.6.1 it worked fine. I have entered a report of my observations to have this investigated further (UE-11256).

For future reference, error code -1073741819 indicates an access violation inside UHT, which means that we have a bug somewhere. If you run into this again, please let us know, so we can fix it. Thanks!

hello, i have this problem on 4.81…
i started on 4.2 or earlier and i followed the advice to create from scratch (just copy the code over to a blank 4.81 project)

now i have this compile error… any help appreciated
no LocMacros and no GENERATED_UINTERFACE_BODY

my class has GENERATED_UCLASS_BODY()

Hi ,

I just attempted to do what you described (made a project in 4.2.1, then copied all of the source files straight into 4.8.1) and was able to build the project without any problems in Visual Studio (there was a lengthy list of deprecation warnings, but no errors). Is this something that is still a problem for you?

hey ,
i don’t know what was wrong, but after some retry it worked.
But im pretty sure there is still something wrong, maybe by importing the assets i migrated, i migrated the problem with it also.
to just let you know, im describing it here Session found in PIE but not in packaged Game - Multiplayer & Networking - Epic Developer Community Forums

im pretty sure from my research in answerhub and forum, that there is something wrong for old projects converted to the latest version over time.
there are many people having similar problems.
thank you epic guys so much for your help and support

I’ve managed to produce this error code in 4.8.2 - it’s a pretty easy repro.

In Actor.h, try to expose ENetMode GetNetMode() const; to blueprint (e.g. UFUNCTION(BlueprintPure, Category = “Replication”) ) - it is guaranteed to fail.

Hi ambershee,

The reason for the error you see there is because the ENetMode enum is not marked as a UENUM. I have submitted a ticket to have this investigated (UE-19685), but a workaround for now would be to add the UENUM() macro above the ENetMode enum in source code.

Just a quick update. UHT cannot parse types that are native only (ie. not a UCLASS, USTRUCT or UENUM), so this is actually an intentional error message. In our latest internal build, the error message has been expanded to provide some additional clarity for what is happening.