Issue: I can’t get UE5 to open but code compiles in visual studios?

I’ve spent some hours working my way through a UDEMY multiplayer course content and have hit a breakpoint… Literally.

Fatal error: [File:D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp] [Line: 3389] 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

Any chance you can show a little more of what’s happening on line 21?

Alternatively you may have a member variable in your class that should be declared as a pointer that is not.
For example :

UPROPERTY(EditAnywhere)
USoundWave MySoundToPlay;

When it should be :

UPROPERTY(EditAnywhere)
USoundWave* MySoundToPlay;

My apologies for the late reply. This the full line of code for line 21

//////////////////////////////////////////////////////////////////////////
// AMenuSysytemCharacter

AMenuSysytemCharacter::AMenuSysytemCharacter():
CreateSessionCompleteDelegate(FOnCreateSessionCompleteDelegate::CreateUObject(this, &AMenuSysytemCharacter::OnCreateSessionComplete))