Editor crashes with bindable property in UMG Slot

UE4 supports binding property values with delegates. For example, this is how Brush property is declared in UImage:

/** Image to draw */
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Appearance)
FSlateBrush Brush;

/** A bindable delegate for the Image. */
UPROPERTY()
UWidget::FGetSlateBrush BrushDelegate;

This allows getting property value as a result of a function call or bind existing variable to this property. Bind dropdown appears in the Editor.

If you try to declare the same inside a Slot class of a Widget, selecting such slot in the Editor makes it crash with assertion error. See stacktrace in attachment (it is from OS X).

Steps to reproduce:

  1. Add “Slate”, “SlateCore”, “UMG” as dependencies in Build.cs file of your project.
  2. Copy-paste a standard Widget with its own Slot class into your project. For example, UWidgetSwitcher. Rename it to UMyWidgetSwitcher and rename the slot to UMyWidgetSwitcherSlot, change headers as necessary for them to compile in your project.
  3. Create a Widget Blueprint in the Editor.
  4. Drop “My Widget Switcher” from “Panel” section of the Palette.
  5. Observe the crash.

Hey endragorr-

What variable/delegate are you attempting to create in your widget? Are you using FSlateBrush and FGetSlateBrush or another variable/delegate? Can you provide the steps to reproduce the crash in a new, clean project?

Can you elaborate on step 2 from your reproduction steps? What do you mean “Copy-paste a standard Widget with its own Slot class”? Are you creating a widget class that includes a UWidgetSwitcher variable? What changes are you making to your headers? If you are setting this up in code, please provide the code used in your test.

Hey endragorr-

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 follow up.

Cheers

Doug Wilson