Editor crashing with "Assertion failed: EditorWorld == GWorld" in logs

Every second play attempt using VR Preview the UE4 editor instantly crashes to windows for me, using Oculus Rift DK2. It also happens every play attempt if I play in New Editor Window (PIE) and have “game gets mouse control” checked.

Here’s the message in the logs (snipped for brevity):


[2016.10.03-14.57.40:884][767]LogWindows: Windows GetLastError: The operation completed successfully. (0)
[2016.10.03-14.57.41:096][767]LogCrashTracker:

[2016.10.03-14.57.41:096][767]LogCrashTracker:

[2016.10.03-14.57.41:096][767]LogWindows:Error: === Critical error: ===
[2016.10.03-14.57.41:096][767]LogWindows:Error:
[2016.10.03-14.57.41:096][767]LogWindows:Error: Assertion failed: EditorWorld == GWorld [File:D:\Build++UE4+Release-4.13+Compile\Sync\Engine\Source\Editor\UnrealEd\Private\PlayLevel.cpp] [Line: 595]


Line 594-596 of that file says:

// Change GWorld to be the play in editor world during cleanup.
check( EditorWorld == GWorld );
GWorld = PlayWorld;

Anyone have an idea of what could be the issue?

Hello Acriax,

Does this issue only occur in your particular project or will it occur in fresh projects as well? If it is only in your project, have you tried reverting the changes that were made to the project shortly before this started happening? Does the crash still occur when using New Editor Window when the Oculus is disconnected and/or “Game gets mouse control” is turned off? Do you crash at all when playing in the current viewport (default PIE) or when using Standalone game?

Also, please include the full log for one of the sessions where this crash occurred. You can attach the .txt file itself so you don’t have to make a really long post.

Hi Matthew, thanks for answering!

This only occured in this project so far, as it hasn’t re-appeared in any of my projects during the last two days, not even this project that I had problems with when I wrote that. It seems like it was sporadic or a temporary glich, so I guess this is resolved for now. I’ll try the things you mentioned ad update this thread if it returns.

I’m glad to hear that it’s no longer occurring. I’ll this as the answer and leave it as resolved for now. Let me know if it comes back up.

I just hit this same bug. I’m using 4.13.2, and it seems to be caused by “Set Input Mode Game Only” and only in New Editor Window. I call “Set Input Mode Game Only” in the EventConstruct of a User Widget that I create in EventBeginPlay PlayerControllerDefault. It happens about 30-40% of the time I try to play the game.

When I remove the “Set Input Mode Game Only” node, the game always runs fine.