Seemed to be linked to you widget, could you try make a simple UMG one ?
Also, to be sure you are not destroying player character when he die, check if pointer is valid and not pending to kill
try these things :
surround your method like this to disable compilation optimisation for that part of code ( easier to debug ) :
also load the class on a separated part, just to be sure
pretty sure i already encountered this one but can recall what was the problem …
instead of the controller can you pass “GetWorld()” in CreateWidget ?
also if it still crash, can you comment the "add to veiwport ?
if still crash, uncomment that and add “RespawnUserWidget->AddToRoot();” before the addtoViewport
Then i would need the code of your “URespawnCPP” class, last thing i can see is you using some code in there causing this ( maybe an image you load programatically ? )
then it’s related of when you use it, try to spawn it ingame with same code ?
You said when player die, but what happen if you don’t spawn it ? you go back to main menu or just stay there ?
You do have engine pdb and sources downloaded right ? could you browse the stack trace to find more info on what going on ?
yea, try creating the widget in the Level BP (or perhaps your player controller), and see if the same error occurs upon the character’s death. good luck