UserWidget fails to ensure(InWidgetTree) in Duplication and crashes when compiling the BP

Was dealing with this same issue in 4.25. I can’t tell from the stacktraces above, but for me the issue was caused by one of my Widgets being REINST, which causes it not to have a valid Widget tree. You can check this by going into the stacktrace when the ensure fails and going back until you find the class of the widget that is causing the problem (check the values of the variables, especially around the initialize() function)

(For context on REINST see: What is "REINST_" and why is it occuring?)

REINST happens when widgets are nested, which can cause circular dependencies. The solution seems to be to create an interface in the blueprint to prevent the circular reference.

1 Like