4.15.1 Crash on packaged game close. MallocBinned2.cpp

After upgrading to 4.15 we seem to be having an issue when closing a packaged game (Debug, Development, Shipping).

It crashes and launches the “Crash Reporter”.

Note: this does not happen in Editor Configurations. Only Packaged versions

I attached the process to VS and it breaks in [\Engine\Source\Runtime\Core\Private\HAL\MallocBinned2.cpp] [Line: 1027]. void FMallocBinned2::FFreeBlock::CanaryFail()

However, it is very difficult to determine the cause of the crash. Walking down the call stack does not yield very much useful information, as it dips in and out of [external code].

I think it may have something to do with UMG.
GarbageCollection.cpp [line 1111] → GUObjectAllocator.FreeUObject(Object);
See image below.

Does anyone have any pointers or suggestions on how to track down the source of an error like this?
Thanks!
~Noah

Hi invertedJoy,

I tried to reproduce this by packaging some of our sample projects, and was unable to do so. I have a few questions that should be able to supply more information about what is going on.

  • Do you see this happening in any other project, or only in your own?
  • How are you cleaning up your UMG widgets when the project shuts down? Are there any references to one or more widgets that the Garbage Collector is trying to clean up that may have already been cleaned up during the shut down process (for example, the UMGSequencerPlayer mentioned in the screenshot)?
  • Would it be possible to get the full log for your project when this crash occurs?

Hi ,

Thanks for the reply! I’ve been doing all sorts of builds today trying to gather as much information as I can.

  • The crash does not occur in other packaged projects. Tested with and without the Third-party plugins enabled.

  • We pretty exclusively use the Widget Components in world space render mode. Don’t know if that will make a difference. It seems the widget components handle self clean up pretty well.
    However, I added a Shutdown UMG clean up function that found every UMG widget, checked if it was valid, then called “RemoveFromParent” prior to shutdown.
    I also tried setting the project’s startup map to a new empty level. (Nothing should require any UMG to be loaded). Still fails to close properly.

-Here is our log
Log file

*Note : Wwise like to throw the Unload Bank Failure error message and has done so since they moved to the plugin version (4.12 maybe). It has never prevented proper shutdown thus far. Tested Wwise with a sample project and it logs the same error but shuts down properly (using the same engine).

This looks like it may be a tough one to track down. I am not certain that Wwise is responsible for this particular crash, but I cannot completely rule it out either. Since this just started happening to your project in 4.15, it may be related to our change to an Include What You Use model in the Engine, but I cannot be certain of that yet. I am going to see if I can find some more information on what can trigger the CanaryFail function that is being called.

Quick follow-up question. Does this happen every time you try to shut down your packaged game, or does it only happen occasionally?

Yeah, it seems so.
I’ll try to figure out a solution to what Wwise is doing during shutdown.
The crash happens every time the application quits.
Thanks a lot !

Hi @InvertidoJoy
Any solution about this error, because I have the same problem in my project too.
Thanks…

Hi C :diamonds::diamonds:,

we have similar problem on 4.15.3. Our dedicated server will crashing randomly on this. We cannot reproduce it but it only happens when there are more people (5 - 10) and it can crash even one minute after map load.
Any ideas how to fix that? We losing players due to that. If you want, you can download our game, try to start host and play game for 10 people and that crash will happen for 100 %, I can assist with it. Or I can send full dump. [Game with server download][1]