UE5.1 Custom UserWidget call Initialize() infinitely

Okay I found the problem. It’s an 5.1 engine bug. On UUserWidget C++ subclasses, the variable “MyWidget” of the widget is not set when the OnInitialized event is triggered. AddToViewport call “RebuildWidget” if this variable is not valid, which call another OnInitialized, etc… Infinite loop.

I reported the bug.

Workaround : I put another event on timer, 0.1s after the event OnInitialized. It works.