Exception thrown and crash when trying to setup UMG

I have made a simple UMG widget, with 1 simple textbox that is created in the level blueprint begin play just like in the twitch video ( i have also tried with and with out the text, so a blank widget) and every single time, it just crashes on play at the add to viewport node, i am calling Create widget correctly before hand, but the editor crashes with an Unhandled exception at 0x00007FFE5E71713E (UE4Editor-UMG-Win64-Debug.dll) in UE4Editor-Win64-Debug.exe: 0xC0000005: Access violation reading location 0x0000000000000000. error. When i break in visual studio at that point, it is at line 406 in UserWidget and Viewport is NULL at the Viewport->AddViewportWidgetContent(WidgetHost); line, does anyone have any idea why this is happening?

Well i feel pretty stupid, but i will leave this here encase anyone has the same issue as me, the issue was, my game runs on dedicated servers. So when i would hit play, it was calling the functions on the dedicated server as well, thus crashing it as there is no viewport i am assuming on the server side, so a simple Is server node check before hand, fixed everything up.

Don’t feel stupid, nobody should have to check for that! I’ll fix that up. Thanks!

Awesome to hear man, I’ve been about ready to pull my hair out. It’s server/client side that causes the problem. Thanks for the awesome work.

Thanks so much man! I had just identified the same problem in my own project. We’ve been having issues with a lot of level corruption, so I thought it could have been me haha!