# Unreal Editor Crash when reopening with ConstructorHelpers

**URL:** <https://forums.unrealengine.com/t/unreal-editor-crash-when-reopening-with-constructorhelpers/418963>\
**Category:** Platform & Builds\
**Tags:** editor-crash-on-laun, unreal-engine, question\
**Created:** [March 4, 2018, 9:57pm UTC](https://forums.unrealengine.com/t/unreal-editor-crash-when-reopening-with-constructorhelpers/418963 "2018-03-04T21:57:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oblongamous](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Oblongamous](https://forums.unrealengine.com/u/Oblongamous)\
**Post date:** [March 4, 2018, 9:57pm UTC](https://forums.unrealengine.com/t/unreal-editor-crash-when-reopening-with-constructorhelpers/418963/1 "2018-03-04T21:57:55Z")

</div>

UStaticMeshComponent\* Box = CreateDefaultSubobject(TEXT(“Visual Representation”));  
Box-\>SetupAttachment(RootComponent);   
static ConstructorHelpers::FObjectFinder BoxAsset(TEXT("/Game/Meshes/Debugs/Box.Box"));  
if (BoxAsset.Succeeded()) {  
Box-\>SetStaticMesh(BoxAsset.Object);  
Box-\>SetRelativeLocation(FVector(0.0f, 0.0f, 0.0f));  
Box-\>SetWorldScale3D(FVector(1.0f));  
}

```
	GEngine->AddOnScreenDebugMessage(-1, 3, FColor::Emerald, TEXT("PEA HAS BEEN SPAWNED"));

```

When the above code is commented, I can successfully open the unreal editor; I can then uncomment and compile when the tests working fine. However, if I keep this code uncommented exit the editor and re-open I get an unreal crash at 72% or 50%… it changes. Is there a reason for this? the log does not show any errors and the crash popup’s bottom section, even when left for quite a while does not change from the loading icon.

---

<div class="post-metadata">

**Author:** ![Oblongamous](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Oblongamous](https://forums.unrealengine.com/u/Oblongamous)\
**Post date:** [March 6, 2018, 1:18pm UTC](https://forums.unrealengine.com/t/unreal-editor-crash-when-reopening-with-constructorhelpers/418963/2 "2018-03-06T13:18:43Z")

</div>

Turns out the fail only occurs when the character this is placed on is set in the world, so for now I delete the actor from world before closing editor so that it can reopen
