[Repro] Using UMG causes Garbage-Collection Crash on Client Connections

I have a built & cooked version of my game, and am launching a Listen server and a Client from a command-line based Shortcut to the .exe. The shortcut loads me straight into a map, and the client is supposed to join it.

However, if my HUD class is hooked up to create and add my UMG widgets to the Viewport, the Client Crashes on load with a callstack that starts with: “Map not cleaned up by Garbage Collection”. Disconnecting the HUD functions to create the UMG widgets in the hud and re-cooking the content fixed the issue, but of course I have no HUD.

Will this be fixed for 4.7? It’s effectively not possible to test a packaged MP game if it uses UMG.

Hello ,

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

Quick questions:

  1. What version of the engine are you using for this project?
  2. Can you reproduce this in a clean project?
  3. If so, could you provide a detailed set of steps to reproduce this issue on our end?
  4. When you say that you are adding your HUD class are you referring to a Widget blueprint or a HUD blueprint?

Hi Rudy,

  • I’m using Version 4.6.1

  • Yes, although you’ll have to create a custom HUD Class and UMG Widget. Simply make the HUD add the Widget to the Viewport on begin play. If you then export/package the game and try to join the server, you’ll instantly crash.

It’s also possible to test that in editor by un-checking ‘Use Single Process’ in the advanced play options. The Client window will crash.

  • Widget class via the Hud. So ‘Create Widget From Class’ and ‘Add To Viewport’ in the HUD Blueprint.

Hello ,

After following your instruction and running a few tests I was unable to reproduce this issue on our end. Is there any way you could send a simplified version of your project that has this issue occurring? Could you also send us your dxdiag?

Shouldn’t be a problem Rudy, I’ve got to prep a project for Nick Darnell related to UMG as well, will try to do this today!

Hello ,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.

Hi Rudy,

I have found a more reliable Reproducible case for this bug, which you can find here:

Thanks!

Hello ,

I was reading back over the thread and I saw that you mentioned a custom class had to be used. The issue that you are seeing may be related to an issue that deals with widgets that are made in C++. Could you try and recreate this issue in blueprints only? This will help determine if the issue that you are experiencing is related to the known issue with C++ widgets being used in blueprints.