# Editor instantly crashing

**URL:** <https://forums.unrealengine.com/t/editor-instantly-crashing/334906>\
**Category:** Blueprint\
**Tags:** unreal-engine, crash, CPP, Blueprint, question\
**Created:** [October 10, 2015, 9:15pm UTC](https://forums.unrealengine.com/t/editor-instantly-crashing/334906 "2015-10-10T21:15:17Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gereksiz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gereksiz](https://forums.unrealengine.com/u/Gereksiz)\
**Post date:** [October 10, 2015, 9:15pm UTC](https://forums.unrealengine.com/t/editor-instantly-crashing/334906/1 "2015-10-10T21:15:17Z")

</div>

I’m trying to understand c++.  
I have PlayerController(Blueprint), Interface(c++) and Character(c++).  
When right mouse button down PlayerController storing mouse location and sending to character with interface.  
I think there is no problem here.  
I tested with this code and its working.

“GEngine-\>AddOnScreenDebugMessage(-1, 5.f, FColor::, TEXT(“Working!”));”

But when i use this code(MoveToLocation) and when right mouse button down editor instantly crushing. And there is no compile error in this code.

In the .h:

```
virtual void MoveCharacter_Implementation(const FVector Location, FName PlayerTag) override;
AAIController* heroMasterAI;

```

In the .cpp:

```
void AHero_Monk::MoveCharacter_Implementation(const FVector Location, FName PlayerTag)

{

  GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::, TEXT("Working!"));
	heroMasterAI->MoveToLocation(Location, -1.0f, true, true, true, true, NULL, true);

}

```

I’m doing something wrong and i don’t know what is wrong

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_42a36632](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_42a36632](https://forums.unrealengine.com/u/anonymous_user_42a36632)\
**Post date:** [October 12, 2015, 8:01am UTC](https://forums.unrealengine.com/t/editor-instantly-crashing/334906/2 "2015-10-12T08:01:13Z")

</div>

Hello,

one basic thing is checking if your GEngine ist initialised correct:

you should always use :

```
  if (GEngine)
  {		
     GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::, TEXT("Working!"));	
  }

```

---

<div class="post-metadata">

**Author:** ![Gereksiz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gereksiz](https://forums.unrealengine.com/u/Gereksiz)\
**Post date:** [October 12, 2015, 11:18am UTC](https://forums.unrealengine.com/t/editor-instantly-crashing/334906/3 "2015-10-12T11:18:00Z")

</div>

It doesn’t solve my problem. ☹

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [October 13, 2015, 2:59pm UTC](https://forums.unrealengine.com/t/editor-instantly-crashing/334906/4 "2015-10-13T14:59:22Z")

</div>

Hello ,

Have you tried commenting out these lines of code to see if they are what is causing the crash?

---

<div class="post-metadata">

**Author:** ![Gereksiz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gereksiz](https://forums.unrealengine.com/u/Gereksiz)\
**Post date:** [October 14, 2015, 11:36am UTC](https://forums.unrealengine.com/t/editor-instantly-crashing/334906/5 "2015-10-14T11:36:26Z")

</div>

when i comment this “MoveToLocation” line there is no error or crash and I’ve tried other lines.  
Maybe i need to set ai controller but i don’t know how i set this. I looked shooter game. in shooter game there is line in ShooterBot.cpp file "#include “Bots/ShooterAIController.h” in constructor “AIControllerClass = AShooterAIController::StaticClass();” but i can’t do similar like this in my character class. I’m keep getting this error “Hero\_Master\_AI” error C2653 is not a class or namespace name.  
I tried blueprint to blueprint communication with interface(c++) and there is no problem but maybe c++ can’t get this value “const FVector Location” and i don’t know how i print string FVector value for testing.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [October 14, 2015, 2:40pm UTC](https://forums.unrealengine.com/t/editor-instantly-crashing/334906/6 "2015-10-14T14:40:36Z")

</div>

You can find information here for printing out an FVector for testing purposes:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...

As far as setting your AIController, does the AI that you intended to control with this controller exist in the level before runtime? If so, you can select it from the World Outliner and set its AIController in the details panel.

---

<div class="post-metadata">

**Author:** ![Gereksiz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gereksiz](https://forums.unrealengine.com/u/Gereksiz)\
**Post date:** [October 14, 2015, 7:25pm UTC](https://forums.unrealengine.com/t/editor-instantly-crashing/334906/7 "2015-10-14T19:25:18Z")

</div>

there is no problem “const FVector Location” variable  
I tested with “print(Location.ToString());”  
What is proper use of “MoveToLocation” in c++ ?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_42a36632](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_42a36632](https://forums.unrealengine.com/u/anonymous_user_42a36632)\
**Post date:** [October 15, 2015, 9:32am UTC](https://forums.unrealengine.com/t/editor-instantly-crashing/334906/8 "2015-10-15T09:32:04Z")

</div>

Have you checked if your AAIController\* heroMasterAI points to an existing object?  
Maybe you didnt initialise the object and the pointer references to nothing,  
this would lead to an error.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [October 20, 2015, 6:36pm UTC](https://forums.unrealengine.com/t/editor-instantly-crashing/334906/9 "2015-10-20T18:36:36Z")

</div>

Hello ,

Have you had a chance to try 's suggestion of checking the pointer? This would definitely cause a crash if it is indeed the problem.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [October 26, 2015, 2:39pm UTC](https://forums.unrealengine.com/t/editor-instantly-crashing/334906/10 "2015-10-26T14:39:40Z")

</div>

We haven’t heard from you in a while, . Are you still experiencing this issue? In the meantime, I’ll be marking this as resolved for tracking purposes. Please let me know if you require anymore assistance and the question will reopen.

Have a nice day!
