[BUG] Editor hangs after playing in standalone

Hello!

I’ve encountered a frequent problem where the editor hangs completely upon exiting a ‘play in standalone game’ session. Digging into it, I suspect this is being caused when the game thread is waiting for the rendering thread, but vice-versa is also happening. As a result, there is an infinite loop in GameThreadWaitForTask in RenderingThread.cpp on line 826. The function is stuck inside a do_while loop with a wait in it, and whilst there is a check to prevent infinite recursion / iterations, this check is entirely outside of the loop and as such isn’t actually working entirely as intended.

Cheers,

Luke

Have the same issue (UE 4.13, win 10-64)

Hello ambershee,

I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you reproduce this issue in a clean project?
  2. If so, could you provide a detailed list of steps to reproduce this issue on our end?
  3. Could you provide any code and/or screen shots of any blueprints that may be involved?

Hi Rudy,

I don’t have reproduction steps, so I’m unsure how to reproduce it in a clean project. Other people in the Unreal Slackers group seem to have run into the same issue. Hopefully someone will have a better idea of the root cause, but I suspect it would not be easy to identify due to the nature of the issue; because of where the game is getting stuck, it’s pretty hard for me to debug any further with the time / tools at my disposal, but the actual infinite loop itself that is causing the editor to freeze is pretty obvious if you look at the section of code I’ve pointed out. There is already a check within the recursive function there for infinite recursion that allows it to break out and continue, just not within the do_while loop within said function.

I have the same problem…Every single time I quit standalone game the editor is not responsive and I have to kill the process via task manager. (UE 4.13, win 10-64)

Hello Scharc,

Could you provide answers to the questions in my original post?

Hey Rudy,

Having the same Issue. It appears to only happen if I have Youtube open and full screened on my second monitor. The cursor then changes to a gray crosshair shape and the editor doesn’t seem to regain focus.

step 1 create empty clean project – in this case third person template project,
step 2 launch play standalone,
step 3 move around and close,
step 4 open youtube in chrome browser,
step 5 standalone launched,
step 6 close standalone,
step 7 fullscreen youtube,
step 8 launch standalone,
step 9 close standalone,
step 10 cry internally

Hello crackjoe,

I ran a few tests using the steps provided, however I was unable to reproduce this issue on our end. Are there any other small steps that may have been left out. As a note, I would using the console command “quit” to close the stand alone window. Does this make a difference on you end?

I just attempted this. It didn’t make a difference. I have confirmed I’m on the most up to date GeForce Drivers 372.70 and using a 980gti. Updated fully on Windows 10.

No that’s pretty verbose list of steps. I made no changes to any settings. IT was a blueprint project but my C++ project is doing the same thing. I also recently reinstalled 4.13 just in case that was the cause.

From my side i could reproduce this bug on my notebook.
The test scenario was simplified to next steps:

  1. Create new blueprint blank project
  2. Just press the “Play” button → all is OK, press Esc → all is OK
  3. Select “Standalone” game mode as active and press the “Play” button → New window with the game is opened → try to close it using ctrl+f4 → UE4 freezes.

Ofcourse u can skip step #2.
Also, i have rebooted my notebook, after that, i did not open any application besides UE4 → Freezes reprodused by steps 1->3.

Actually I seem to be experiencing the issue even without having anything open as well. Though for no apparent reason I had no issues for at least a couple of tests before I tried the youtube window.

I have been unable to reproduce this issue on our end with the information provided. Could you provide your dxdiag?

I’ve attached our system spec - as you can see it’s pretty standard. I don’t think it’s a hardware related issue, it looks like threads are not being cleaned up correctly.

link text

I have no idea if this is related or not, but I suspect there is a chance it might be:

I have observed that the player controller in our project persists after exiting PIE. I could see this blocking the game thread from shutting down, and if the rendering thread is waiting for that, that would cause your freeze.

If other people could set up similar logging in their project, it would be interesting to see if other people who are affected have the same problem.

Hello Scharc, crackjoe, Kisellev,

Could you also provide your dxdiags?

Here is my dxdiag.

Hello ambershee,

The linked issue does not appear to have anything to do with the current thread. Also, there does not appear to be an apparent relation between the dxdiags that stands out as a possible cause for this issue. Without additional information relating to how we can recreate the issue you are describing, we are unable to move forward with this report. Would it be possible for you to provide steps to reproduce this issue in a clean project?

I just successfully reproduced it first try following Kisellev’s steps. Completely blank project in launcher version of 4.13.0. The moment you exit from playing in standalone, the editor freezes. I didn’t even try playing it ‘in editor’, just went straight for standalone.,

I have new information!

When the editor froze this time, I caught it logging information about HMD / Oculus.

I don’t have an Oculus plugged in, but I do have a . Unplugging the 's USB cable, restarting the editor and trying playing in standalone again, and the editor did not freeze.

How can i catch log info?

I do not have any plugged device except my mouse, but the problem appears.