[4.9p4] Crash on closing standalone application

As I’ve experienced so far any standalone version of any UE4 C++ project built against the UE 4.9 Preview 4 currently crashes on closing the application (doesn’t matter if you hit ALT+F4 or click the X to kill the window).

The last call on the call stack when the crash occurs in the debug version is always:

MyProject-Win64-DebugGame.exe!FUObjectArray::RemoveUObjectDeleteListener(class FUObjectArray::FUObjectDeleteListener *) C++

On my machine the issue can be reproduced 100% following these steps:

  1. Create a new project (eg. C++, basic code, starter content)
  2. Compile the “Debug Game” configuration in VSC++ 2013
  3. Cook all assets for Windows in the Editor
  4. Launch the build from the Editor or with the VSC++ 2013 Debugger
  5. Click the X to close the window
  6. → Crash

I don’t do Blueprints so I have no idea if Blueprint Projects are affected as well.

I’ve confirmed this using the vanilla Engine version downloaded through the launcher.

Hello ,

I have a few questions for you about this issue.

  1. What version of Windows are you using?
  2. Did this happen with any previous versions of the engine (Even any previous Previews)
  3. Can you post the full callstack that you receive when this crash occurs?

Hi ,

  1. Windows 7 64bit (Build 7601)

  2. No it appears to be a new issue in 4.9.x. Tried it with the same default project template in 4.7 and 4.8 and neither reproduced the error.

    ntdll.dll!00000000771eac04()	Unknown
    ntdll.dll!00000000771eab34()	Unknown
    MyProject-Win64-DebugGame.exe!FUObjectArray::RemoveUObjectDeleteListener(class FUObjectArray::FUObjectDeleteListener *)	C++
    MyProject-Win64-DebugGame.exe!FUObjectAnnotationDense<struct FLinkerIndexPair,0>::RemoveAllAnnotations(void)	C++
    MyProject-Win64-DebugGame.exe!`FStatsThread::Get(void)'::`2'::`dynamic atexit destructor for 'Singleton''(void)	C++
    msvcr120.dll!000007fef1b22925()	Unknown
    

    MyProject-Win64-DebugGame.exe!__tmainCRTStartup() Line 662 C
    kernel32.dll!0000000077095a4d() Unknown
    ntdll.dll!00000000771cb831() Unknown

I tried reproducing using the steps you provided without any success. When following your steps, I did have to build for ‘Development’ before building for Debug Game as I was unable to successfully Cook Content for Windows otherwise. After doing that I followed the rest.

When you mention 'Launch the build", do you mean you’re launching the Standalone application? Any additional details would be helpful.

Yes I was referring to launching the build as a standalone application (either via the editor or from Visual Studio using the “DebugGame” configuration).

I wrote down the steps after I reproduced it with one of the default template projects. That’s why I forgot listing the step about building the Development Version for cooking to succeed.

I will try to reproduce it on my laptop tomorrow and see if I can reproduce it there too. If it helps I could also provide you with the project I was using last and a minidump from when the issue occurred.

To avoid the issue I have already switched my main project back to 4.8.3. However I hope the issue can be resolved before 4.9 stable goes live or I’ll have to hold back on updating until it’s fixed.

Unfortunately I’m still unable to get this crash to happen. Have you had any luck with your laptop? Also, can you try the release version of 4.9 that became live today? I’m interested to see if the issue is persisting.

I’m currently updating to 4.9 and will report back on this as soon as I have any news. I’ve delayed testing until today because I was expecting 4.9 final to hit any day now hoping the update might fix the issue for me.

Edit: I can no longer reproduce the issue so it seems to be fixed in 4.9 final :slight_smile:

Answerhub itself decided to lose your comment somewhere between converting it from a comment to an answer so…

From :
I’m currently updating to 4.9 and will report back on this as soon as I have any news. I’ve delayed testing until today because I was expecting 4.9 final to hit any day now hoping the update might fix the issue for me.

Edit: I can no longer reproduce the issue so it seems to be fixed in 4.9 final :slight_smile:

Glad to hear that updating fixed the issue! Please let me know if you run into any more issues.

Crash with this callstack can be solved by calling RequestEngineExit before FEngineLoop::AppPreExit()