Editor crash widget override function

If you add an animation to a widget that has the same name as an inherited function, then try to override that function the editor silently crashes.

This sounds like a “well duh” thing but it became confusing when I had a custom parent widget with my own functions I was overriding and didn’t notice the name collision. Would have been very helpful to have a proper error/warning.

Repro steps:

  1. In a new BP project, Create a widget BP
  2. Add an animation called “OnPaint”
  3. On the graph for the widget, override the OnPaint function.
  4. The editor will crash at this point.

I see two possible ways to deal with this:

  • When overriding a function it should
    check to see if you have a local
    variable (including animations) that
    is named the same as the function you
    are overriding and give you an error
    message like “A local variable
    already exists with the name [Name of
    variable]. You will need to rename
    this variable to override this

  • Another option would be when setting the name for an animation check the parent classes functions for name collisions during the validation step. The validation error could be “This name is in use by a parent function”.

UE 4.12.5 Windows 10

Hello Voren,

I was able to reproduce this issue on our end. I have written up a report (UE-33711) 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