[Bug /w repro] Widget referencing MID crashes when restarting/changing map

*I have here a reproducible steps and zipped blank project with the bug in case you need to see more clearly.

Problem :
Apparently if a Widget uses MID ( stored in HUD ), the game will no longer be able to change map/ restartgame. Any attempt to unload the world will crash it. This has caused my game to be unable to change map/restartlevel.

Steps :
1)Setup Game & HUD so that it creates a Widget at the start of the game.
2) Create MID and store in HUD
2)Set the widget’s brush to refere to a Material Instance Dynamic
3)Type in console command ‘RestartLevel’ or Open another map
4) Witness glorious crash

link text

Hello ,

I was able to reproduce this issue on our end. I have written up a report ( UE-21288) and I have submitted it to the developers for further consideration. I will provide updates with any pertinent information as it becomes available. I did find that if I did not create the widget within the HUD blueprint that the editor would not crash. I hope this helps. Thank you for your time and information.

Make it a great day

Oh, I’m experiencing the very same bug. Though I’m coding in c++.
I’ve tried destroying the MID in EndPlay but to no avail.

What do you mean by “I did find that if I did not create the widget within the HUD blueprint that the editor would not crash.” @Rudy?

Hope this will be resolved soon : ).

@ , maybe you can try to create it in other classes than HUD. Maybe that’s what he means. I’m not sure but as for us our system is very wired for it to be create via HUD .

The current workaround I’m using is to actually unhook the MID before changing level .

Thanks for the elaboration!

What do you mean by unhooking the MID?

We do not crucially depend on it working at the moment. The only drawback momentarily is that additional loaded clients do not work since they initially load a map, then unload it in order to join a server.

Unhooking the MID meanign nullify the reference. Means the widget element no longer refers to MID , but refers to nothing.

Currently in our game build, there’s a quit to main menu button , when you click it, it will deference AND then quit.

Hello ,

I went ahead and double checked on this issue for you and I found that this issue has been resolved internally and that this solution should be available in a later release of the engine. I hope that this information helps.

Make it a great day