# Editor crash at launch

**URL:** <https://forums.unrealengine.com/t/editor-crash-at-launch/1251619>\
**Category:** C++\
**Tags:** unreal-engine, question, CPP\
**Created:** [August 5, 2023, 1:32pm UTC](https://forums.unrealengine.com/t/editor-crash-at-launch/1251619 "2023-08-05T13:32:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marc\_One](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Marc\_One](https://forums.unrealengine.com/u/Marc_One)\
**Post date:** [August 5, 2023, 1:32pm UTC](https://forums.unrealengine.com/t/editor-crash-at-launch/1251619/1 "2023-08-05T13:32:56Z")

</div>

Hi,  
i did a refactor of some classes and now the engine crashes on launch. I get the error:

```auto
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:

```auto
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:

```auto
UCLASS()
class MYPROJECT_API AEmptyBlock : public ABlockBase
{
	GENERATED_BODY()

public:
	AEmptyBlock();
};

```

and implementation:

```auto
AEmptyBlock::AEmptyBlock()
{
	MeshComponent->SetVisibility(false);
	bIsBlockingPlayer = true; <-- This is line 6 where it fails.
	bCatchMovableBlock = true;
}

```

I tried everything but the error persists.

---

<div class="post-metadata">

**Author:** ![Bryondr](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bryondr/32/743155_2.png) [@Bryondr](https://forums.unrealengine.com/u/Bryondr)\
**Post date:** [August 5, 2023, 2:36pm UTC](https://forums.unrealengine.com/t/editor-crash-at-launch/1251619/2 "2023-08-05T14:36:43Z")

</div>

You should use like this:

MeshComponent.Get()-\>SetVisibility(false);

Since .Get() returns raw pointer of the **MeshComponent**

---

<div class="post-metadata">

**Author:** ![Marc\_One](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Marc\_One](https://forums.unrealengine.com/u/Marc_One)\
**Post date:** [August 5, 2023, 3:52pm UTC](https://forums.unrealengine.com/t/editor-crash-at-launch/1251619/3 "2023-08-05T15:52:38Z")

</div>

Oh man. Thanks. You pointed me to the error. I had removed the constructor of the base class, so the MeshComponent never was initialized. Strange that the error was displayed on the following line of code.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [September 4, 2023, 3:53pm UTC](https://forums.unrealengine.com/t/editor-crash-at-launch/1251619/4 "2023-09-04T15:53:39Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
