CreateDefaultSubObject is crashing Unreal but everything looks fine

I am trying to use DefaultSubObject but Unreal just keeps crashing. I´ve tried most solutions up on the forums and i think in doing everything right…place it in contructor, dont repeat any names, add appropriate includes on header. I cant get the handle of the crash report but i am using the VS Debugger and it points me there. Im pretty sure the problem is on this line because removing these seems to make the project work again.

Here is the .h file:

// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Components/ArrowComponent.h"
#include "Components/SphereComponent.h"
#include "Engine/StaticMesh.h"
#include "PushableActor.generated.h"

UCLASS()
class FOOTPLACEMENTIK_API APushableActor : public AActor
{
	GENERATED_BODY()
	
public:	
	// Sets default values for this actor's properties
	APushableActor();

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

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

protected:
	/** The mesh that represents the Pushable Box */
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Pushable Object", meta = (allowprivateaccess = true))
	UStaticMesh* m_Mesh;

	/** An arrow that serves as reference to place the player character in a certain position */
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Pushable Object", meta = (allowprivateaccess = true))
	UArrowComponent* ArrowPlayerPlacer;

	/** Sphere that represents where to place the player character's left hand */
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Pushable Object", meta = (allowprivateaccess = true))
	USphereComponent* l_handPlacer;

	/** Sphere that represents where to place the player character's right hand */
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Pushable Object", meta = (allowprivateaccess = true))
	USphereComponent* r_handPlacer;

};

and my .cpp file:

#include "PushableActor.h"

// Sets default values
APushableActor::APushableActor()
{
 	// Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = false;

	//Create the mesh property and assign it as the root
	m_Mesh = CreateDefaultSubobject<UStaticMesh>(TEXT("Display Mesh"));
	RootComponent->SetupAttachment(RootComponent);

	//Create the arrow that represents where we want the player to be placed
	ArrowPlayerPlacer = CreateDefaultSubobject<UArrowComponent>(TEXT("Arrow Pointer"));
	ArrowPlayerPlacer->SetupAttachment(RootComponent);

	l_handPlacer = CreateDefaultSubobject<USphereComponent>(TEXT("Left Hand Ref"));
	l_handPlacer->InitSphereRadius(5.0f);
	l_handPlacer->SetupAttachment(RootComponent);

	r_handPlacer = CreateDefaultSubobject<USphereComponent>(TEXT("Right Hand Ref"));
	r_handPlacer->InitSphereRadius(5.0f);
	r_handPlacer->SetupAttachment(RootComponent);

}

// Called when the game starts or when spawned
void APushableActor::BeginPlay()
{
	Super::BeginPlay();
	
}

// Called every frame
void APushableActor::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);

}

The weird thing is i´ve done this exact same procedure of creating default values on other projects and even on other classes in this very same project, but i can´t figure out in any way what is happening here.
Building is VS yields no errors at all.

Would appreciate any help!

Hello

I declare the actor’s rootcomponent in this way: Sample

.h

UPROPERTY(EditAnywhere)
class USceneComponent * DommyRoot;

.cpp

DommyRoot = CreateDefaultSubobject(TEXT(“DommyRoot”));
RootComponent = DommyRoot;

To attach any component used:

“YourComponent”->AttachTo(RootComponent);

Thank you for your answer Daniel!
Unfortunately changing the UPROPERTY signature doesnt change anything. The problem persists on line 14 of the cpp.

I guess

UStaticMesh* m_Mesh;

was supposed to be

UStaticMeshComponent* m_Mesh;

and

 m_Mesh = CreateDefaultSubobject<UStaticMesh>(TEXT("Display Mesh"));
 RootComponent->SetupAttachment(RootComponent);

was supposed to be

	m_Mesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Display Mesh"));
	SetRootComponent(m_Mesh);

at least that compiled and executed for me
if m_mesh was not supposed to be the root, you should add a scene component or something to be the root

This is exactly the problem! I feel really dumb…so many hours searching for solutions but sometimes its the simple things…
Thank you very much Lardo!