Editor crashed when spawning blueprint from c++

I was trying to recreate this tutorial but when I added the spawning blueprint code into constructor of the GameMode and then tried to compile it the whole project crashed. When I tried to load it it crashed while loading it.
Then I tried it again in new project and again it crashed. The stack trace in error report window was empty both times.

The project was freshly created on UE 4.12.4 without any plugins.