Some very strange error loading my project

So, it’s not first time, but now solution from last time doesn’t work. When I try to start my project, UE4 crashes and gives me this sign:
Fatal error: [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/CoreUObject/Private/UObject/UObjectGlobals.cpp] [Line: 2618] UObject(const FObjectInitializer&) constructor called but it’s not the object that’s currently being constructed with NewObject. Maybe you are trying to construct it on the stack, which is not supported.

UE4Editor_CoreUObject
UE4Editor_UMG
UE4Editor_MyProject!AMyCharacterCPP::AMyCharacterCPP() [C:\Users\keyni\Documents\Unreal Projects\MyProject\Source\MyProject\MyCharacterCPP.cpp:5]
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_Core
UE4Editor_Core
UE4Editor_Projects
UE4Editor_Projects
UE4Editor
UE4Editor
UE4Editor
UE4Editor
UE4Editor
UE4Editor
UE4Editor
kernel32
ntdll

Here is my AMyCharacterCPP::AMyCharacterCPP() code:

AMyCharacterCPP::AMyCharacterCPP()
{
 	// Set this character to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = true;

	AutoPossessPlayer = EAutoReceiveInput::Player0;
	bUseControllerRotationYaw = false;
	CamComp = CreateDefaultSubobject<UCameraComponent>(TEXT("Camera"));

	CamComp->AttachTo(RootComponent);
	CamComp->SetRelativeLocation(FVector(0, 0, 40));

}

Rebuilding project doesn’t help, idk what to do.

Make sure you not trying to do this. You cant have on-stack uobjects inside of (in this particular case) your character, Make sure that your CamComp and other UObjects you may been defined in class definition in header are pointers (“UCameraComponent*” and not just “UCameraComponent”).

“UCameraComponent*” and not just “UCameraComponent”
Yes, it is correct. What else can be incorrect?

Can you show the header? Right now i can only guess that you trying to create something from UE4Editor_UMG inside of your character.

Btw you can install engine’s debug symbols and those stack traces will become a bit easier to read

Can you show the header?

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Character.h"
#include "Camera/CameraComponent.h"
#include "Components/InputComponent.h"
#include "Runtime/Engine/Classes/Engine/World.h"
#include "DrawDebugHelpers.h"
#include "GameFramework/Actor.h"
#include "UObject/ConstructorHelpers.h"
#include "Engine/EngineTypes.h"
#include "CustomUserWidget.h"
#include "Blueprint/WidgetTree.h"
#include "Blueprint/UserWidget.h"
#include "CollisionQueryParams.h"
#include "MyCharacterCPP.generated.h"

UCLASS()
class MYPROJECT_API AMyCharacterCPP : public ACharacter
{
	GENERATED_BODY()

public:
	// Sets default values for this character's properties
	AMyCharacterCPP();

	AActor* obj;
	bool IsTaking = false;
	FString MeshName;
	float movement_speed = 0.5;
	FHitResult LastHit;
	UWidgetTree WidgetTree;
	UCustomUserWidget BlackImg;
	TArray<FString> Doors = { TEXT("DoorWithHandles"), TEXT("DoorWithHandles90") };
	TArray<FString> ObjectsToUse = { TEXT("DoorWithHandles"), TEXT("DoorWithHandles90"), TEXT("Banker_Lamp_2") };
	TArray<FString> ObjectsToTake = { };

protected:
	// Called when the game starts or when spawned
	virtual void BeginPlay() override;


public:	
	// Called every frame
	virtual void Tick(float DeltaTime) override;

	// Called to bind functionality to input
	virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;

private:
	void MoveForward(float Amount);
	void MoveRight(float Amount);
	void MousePitch(float Amount);
	void MouseYaw(float Amount);

	void ToRun();
	void ToGo();
	
	void PutOrTake();
	void Use();
	void UpdateLookingPlace();

	int IsInArr(TArray<FString> arr, FString str);

	void RayCast();

	UPROPERTY(EditAnywhere, category = "Camera")
		UCameraComponent* CamComp;

	UPROPERTY(BlueprintReadWrite, meta = (AllowPrivateAccess = "true"))
		float stamina = 1.0;


private:
	UPROPERTY(BlueprintReadWrite, meta = (AllowPrivateAccess = "true"))
		int HUDMsgVal = 0; /*
						   0 -> Nothing
						   1 -> "Press E to use"
						   2 -> "Press 'Right_Mouse_Btn' to take/put"
						   */
};

Thanks. Just as i guessed, here they are:

UWidgetTree WidgetTree;
UCustomUserWidget BlackImg;

Two uobjects created on a stack, while you supposed to define them as pointers and create them via CreateDefaultSubobject(in constructor) or NewObject(at runtime)

Omg, thank you very much!