Editor crashes entirely if you use Is*Down in UMG

Related bug report: OnDrop - IsControlDown = Crash - Platform & Builds - Unreal Engine Forums

Hope this is enough info to reproduce the bug! Hoping to see this fixed in 4.9.0 so I can remove my hacky bypass.

I tried to find anything in the source code that jumped out at me, but everything seems like it should work. These functions are exceedingly simple. However, it’s probable that ModifierKeys isn’t being initialized correctly, and is null (See Engine/Source/Runtime/SlateCore/Public/Input/Events.h line 182).

Description:

Editor crashes if you have a UMG widget with an OnMouseButtonUp/OnMouseButtonDown/OnKeyUp/OnKeyDown event that uses the “IsShiftDown” node (or any other modifier key down nodes) in the blueprint. There isn’t even a crash report when this occurs (I get the “Unreal Engine has stopped working” generic message from Windows).

Test Setup:

  • Windows 7 x64
  • Unreal Engine 4.8.3 (bug occurs)
  • Unreal Engine 4.9.0 Preview 2 (bug occurs)

Steps To Reproduce:

  • Create a new project from the First Person blueprint template
  • Create a new Widget Blueprint
  • Add a border widget so you have something to click (see figure 1)
  • Under the graph tab, override the function “OnMouseButtonUp”
  • Simulate the blueprint graph from figure 2 (basically just do anything with IsShiftDown)
  • Open the blueprint FirstPersonBP/Blueprints/FirstPersonCharacter
  • Delete everything in this blueprint for testing purposes
  • Simulate the below blueprint (create our test widget, add it to the viewport, set input mode to UIOnly, set show mouse cursor on the player controller)
  • Start game
  • Click on our test widget

Function Overrides Tested:

  • OnMouseButtonUp (Problem occurs)
  • OnMouseButtonDown (Problem occurs)
  • OnKeyUp (Problem occurs)
  • OnKeyDown (Problem occurs)

Modifier Key Nodes Tested:

  • IsControlDown (Problem occurs)
  • IsAltDown (Problem occurs)

Figure 1 (Widget Blueprint Designer):

Figure 2 (Widget Blueprint Graph):

Figure 3 (Player Blueprint):

Hello Brandon Wamboldt,

This is a know issue (UE-17122) that has been resolved internally and the solution will be available in a later release of the engine. I have provided a link to the commit in case you are working from a source version of the engine and would like to integrate the solution.

Commit:
https://github.com/Crtriplett/UnrealEngine/commit/942a6aedbadc1aaaa2a50509cf7cc511ddb3af07

Make it a great day