UE 4.10.4 Editor crashing on start - crash log and possible reason

After adding in a function in Xcode and clicking Compile in UE Editor, I get a crash. Upon restarting the Editor, it keeps crashing. Each time, I delete the Build, Binaries and Intermediate directories in the project to get the UE Editor to rebuild the dylib (else it will straight away crash upon starting).

After rebuilding the dylib, it still crashes.

I’ve narrowed it down to my trying to spawn a custom Actor class in the GameMode constructor. I accidentally placed the call to spawn the custom Actor in the constructor instead of the BeginPlay() method.

Nevertheless, this should not cause the UE Editor to get into an endless crash loop unless the Build, Binaries and Intermediate directories are deleted.

So I’m submitting the crash log:

Log.txt

Hi FuriousLight,

I have used your crash log in addition to the steps you have provided to reproduce the crash in order to enter the following bug report: JIRA [UE-27676]. When this issue has been addressed, we will notify you with an update to this post.

Thanks for calling this to our attention,

.

Just to confirm, are you using this syntax to spawn your actor?

UWorld* World = GetWorld();
ActorToSpawn* NewActor = World->SpawnActor<ActorToSpawn>();

If this is the case, then “World” does not exist when the editor launches. Moving to BeginPlay as you suggested will prevent the crash, however, it is also a good idea to test that World exists any time it is used.

Hi ,

Thanks for your help and explanation. Yes I’m using a similar syntax and will check if GetWorld() exists.

I do feel that code shouldn’t be crashing the editor though :slight_smile: