x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[error]UnrealHeaderTool failed for target 'MyProjectEditor'

Why am I getting this error?

I'm fairly certain that this was working fine until I created a class which derived from another, at which point I stopped being able to compile. I've since removed the other class, deleted binaries and regenerated the project.

This is such a massive time waste of an issue, and I'm pulling my hair out of this one. I can't see the forest for the trees, it seems.

My .h file is below for the class that seemed to first have the issue:

 #pragma once
 
 #include "CoreMinimal.h"
 #include "Components/ActorComponent.h"
 #include "SpaceApeProjectile.h"
 #include "PlayerWeaponComponent.generated.h"    
    
 
 class UObjectPoolComponent;
 
 UCLASS(ClassGroup = (Custom), meta = (BlueprintSpawnableComponent))
 class SPACEAPE_API UPlayerWeaponComponent : public UActorComponent {
     GENERATED_BODY()
 
 public:
     // Sets default values for this component's properties
     UPlayerWeaponComponent();
 
     void SetObjectPoolReference(class UObjectPoolComponent* _PoolRef);
 
     // Called every frame
     virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
 
     virtual void Shoot(FVector _FireDirection);
 
     const float WeaponFireRate = 0.14f;
 
 
     UObjectPoolComponent* GetObjectPoolReference();
 
 protected:
     // Called when the game starts
     virtual void BeginPlay() override;
 
     //class ASpaceApeProjectile ProjectileToSpawn;
 
     TSubclassOf<class ASpaceApeProjectile> ProjectileToSpawn = ASpaceApeProjectile::StaticClass();
 
 
     class ASpaceApePlayerCharacter* OwningCharacter;
 
     UWorld* World;
 
     // A reference to the character's projectile object pool
     UObjectPoolComponent* PlayerProjectilePoolRef;
 
 };

and the output log:

 1>------ Build started: Project: SpaceApe, Configuration: DebugGame_Editor x64 ------
 1>  Creating makefile for SpaceApeEditor (UHT file was deleted)
 1>C:\Program Files\Epic Games\UE_4.16\Engine\Plugins\Marketplace\ModoMaterialImporter\Source\ModoMaterialImporter\ModoMaterialImporter.Build.cs : warning : Module constructors should take a ReadOnlyTargetRules argument (rather than a TargetInfo argument) and pass it to the base class constructor from 4.15 onwards. Please update the method signature.
 1>C:\Program Files\Epic Games\UE_4.16\Engine\Plugins\Marketplace\ModoMaterialImporter\Source\ModoPlugin\ModoPlugin.Build.cs : warning : Module constructors should take a ReadOnlyTargetRules argument (rather than a TargetInfo argument) and pass it to the base class constructor from 4.15 onwards. Please update the method signature.
 1>  Parsing headers for SpaceApeEditor
 1>    Running UnrealHeaderTool "S:\GitHub\SpaceApe\SpaceApe.uproject" "S:\GitHub\SpaceApe\Intermediate\Build\Win64\SpaceApeEditor\DebugGame\SpaceApeEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
 1>  S:/GitHub/SpaceApe/Source/SpaceApe/Components/PlayerWeaponComponent.h(22) : LogWindows:Error: === Critical error: ===
 1>  S:/GitHub/SpaceApe/Source/SpaceApe/Components/PlayerWeaponComponent.h(22) : LogWindows:Error:
 1>  S:/GitHub/SpaceApe/Source/SpaceApe/Components/PlayerWeaponComponent.h(22) : LogWindows:Error: Assertion failed: FoundClass [File:D:\Build\++UE4+Release-4.16+Compile\Sync\Engine\Source\Programs\UnrealHeaderTool\Private\HeaderParser.cpp] [Line: 5090]
 1>  S:/GitHub/SpaceApe/Source/SpaceApe/Components/PlayerWeaponComponent.h(22) : LogWindows:Error:
 1>  S:/GitHub/SpaceApe/Source/SpaceApe/Components/PlayerWeaponComponent.h(22) : LogWindows:Error:
 1>  S:/GitHub/SpaceApe/Source/SpaceApe/Components/PlayerWeaponComponent.h(22) : LogWindows:Error:
 1>  S:/GitHub/SpaceApe/Source/SpaceApe/Components/PlayerWeaponComponent.h(22) : LogWindows:Error:
 1>EXEC : error : UnrealHeaderTool failed for target 'SpaceApeEditor' (platform: Win64, module info: S:\GitHub\SpaceApe\Intermediate\Build\Win64\SpaceApeEditor\DebugGame\SpaceApeEditor.uhtmanifest, exit code: CrashOrAssert (3)).
 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(37,5): error MSB3073: The command ""C:\Program Files\Epic Games\UE_4.16\Engine\Build\BatchFiles\Build.bat" SpaceApeEditor Win64 DebugGame "S:\GitHub\SpaceApe\SpaceApe.uproject" -waitmutex" exited with code 3.
 ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 


Product Version: UE 4.16
Tags:
more ▼

asked Oct 11 '17 at 02:48 PM in C++ Programming

avatar image

Greywacke
235 7 8 14

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Okay, the Unreal Header Tool has made it onto my hit list.

A comment caused this...

I've stripped out the surrounding code and comments for demonstration purposes, but below is effectively the cause of the problem.

 /*
 /* <==== this right here caused the UHT to have a fatal error!
 
 */

I must have done this when copying and pasting the code section; missing the second, closing doxygen.

Thanks goes to CodingMarmot for solving this issue here: https://answers.unrealengine.com/questions/540600/error-assertion-failed-foundclass-fileprivateheade.html

more ▼

answered Oct 11 '17 at 03:44 PM

avatar image

Greywacke
235 7 8 14

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question