UMG OnKeyUp crashes in 4.8

I’m having a problem where my editor crashes (without even asking to send a report) when I try to utilize the OnKeyUp or OnKeyDown events in my game. I can’t seem to reproduce this when creating new UMG widgets in other projects, but I can reproduce it when creating new widgets in my game. I’ll provide more information as I uncover it, but this is stalling my game’s development for the time being.

Hello Moonspine,

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

Quick questions:

  1. Was the project that you are having issue with upgraded from an older version of the engine?
  2. If so, could you provide the progression used on the project?
  3. Could you provide screen shots of any blueprints that may be involved with this issue?
  4. Could you provide the steps used to reproduce this issue in the project that is causing the issue?

Okay, so I managed to narrow this down and reproduce it. It seems somehow related to the IsShiftDown function in the Key struct.

Just to verify this, I created a brand new project and have discovered the reproduction steps. Here’s how to do it:

  1. Create a new UMG widget blueprint (I called mine “BrokenWidget”)
  2. Add the attached “BrokenWidget.png” code to the OnKeyUp event of the widget.
  3. Add the “Level.png” code to the level blueprint.
  4. Play the level and press “M”

This should instigate the crash immediately, but let me know if you have trouble reproducing it.

To clarify, removal of the “IsShiftDown” and “And” nodes from the BrokenWidget blueprint (and just linking the equals(“Q”) node into the if statement) will alleviate the crash. This is why I assumed it was related to that function.

Hello Moonspine,

The issue is due to the branch that you have placed in your function override. The function can’t complete itself when the branch is equal to false because the function never gets a return value. All possible execution paths must be able to reach the end of the function. You will need to connect the false execution pin to the return node of the function.

Make it a great day

That is absolutely not the problem, and this issue remains unresolved (but I’m not allowed to un-accept this answer). If you’ll look more carefully at the screenshot, there is a sequence node which first calls the if statement and then hits the return node. Disconnected return nodes cause blueprint compiler errors, not windowless engine crashes.

Even with every execution pin connecting explicitly to the return node (see the attached “Still Broken.png”), it still crashes with an “Unreal Engine has stopped working…” dialog (“Hard Crash.png”).

This has to be a bug in UE 4.8, since it worked fine in 4.7.

Again, allow me to propose that it has something to do with the “IsShiftDown” function call. Removing this node (and the if statement) from the graph makes Unreal Engine happy. Also allow me to reiterate that this worked 100% fine before 4.8.

Hello Moonspine,

I was able to reproduce the issue on our end. I have written up a report ( UE-17122) and I have submitted it to the developers for further consideration. I will provide updates with any pertinent information as it becomes available. Thank you for your time and information.

Make it a great day

Thank you very much. And thanks for looking into it.

,Hello, we are using the 4.8.1 version and all our UMG blueprints are broken because of this bug.
Everything was working well before.
Now, every time we check the state of a modifier key (i.e.: IsShiftDown, IsControlDown…), the application crashes.

Any update concerning this issue?

Hello MickCD

I went ahead and double checked on this issue for you. I found that this issue has been resolved internally and that this solution will be available in a later version of the engine. I have also included a commit link below if you would like to integrate this change list into your project. I hope that this information helps.


Make it a great day

Hi, after patch 4.8.3 the crash with IsShiftDown node is still there. Now, instead of freezing the simulation, it just close (stand alone window). If “playing” from within the editor, I get a “Stopped working” error message.

By the way, the github link to the commit is broken :frowning:
Thanks for you attention

Hello kehom,

You are correct, this solution was not implemented into the 4.8.3 hotfix. As for the link you will need to login to github. After logging in the link should work. I hope that this information helps.

Make it a great day