Hi,
i did a refactor of some classes and now the engine crashes on launch. I get the error:
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000000000001c0
UnrealEditor_Engine
UnrealEditor_MyProject_Win64_DebugGame!AEmptyBlock::AEmptyBlock() [D:\PERFORCE\Chips_Workspace\Chips\Source\MyProject\Blocks\EmptyBlock.cpp:6]
UnrealEditor_MyProject_Win64_DebugGame!InternalConstructor<AEmptyBlock>() [D:\UE_5.2\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h:3432]
UnrealEditor_CoreUObject
the code is:
Base Class:
class AChipsPawn;
enum class EMoveDirection;
UCLASS(Abstract)
class MYPROJECT_API ABlockBase : public AActor
{
GENERATED_BODY()
public:
UPROPERTY()
int Position = -1;
bool bIsBlockingPlayer = false;
bool bIsBlockingActors = false;
bool bCatchMovableBlock = false;
virtual void Interact(AChipsPawn* ChipsPawn, EMoveDirection Direction) {};
TObjectPtr<USceneComponent> SceneComponent;
TObjectPtr<UStaticMeshComponent> MeshComponent;
};
Derived:
UCLASS()
class MYPROJECT_API AEmptyBlock : public ABlockBase
{
GENERATED_BODY()
public:
AEmptyBlock();
};
and implementation:
AEmptyBlock::AEmptyBlock()
{
MeshComponent->SetVisibility(false);
bIsBlockingPlayer = true; <-- This is line 6 where it fails.
bCatchMovableBlock = true;
}
I tried everything but the error persists.