Crash after creating widget on death

same issue actually, created a seperate player controller and hooked it to my gamemode.
This probably has to be a bug, even with default stuff…

Still having this problem…

Tell you what man…

I told you I’m not a c++ guy, but I’d be willing to get on discord with you next week and screen share, because honestly - this should not even be an issue whatsoever.

Destroying your character and getting a widget to pop up on screen - should be absolute cake-walk. And in blueprints, it is.

Now I’m not sure if a UE4 project can contain both c++ and blueprints combined, however I’d be willing to give you some time, because again - of all the issues you will be dealing with in your time using UE4, this should not be one of them.

let me know…

Sorry for the late reply. I haven’t gotten a plus from the people I work with (I don’t own the project and it’s under an nda) so I don’t think I can quite do this.

Still having this issue to this day, really getting tired of this and on a time constraint here.

without beeing able to put hands on the project it’s going to be very hard to reproduce…
few more thing :

  • When you got it crash with vs attached, go back up in the call stack and check all local variable you can, to see if you can come up with a image name or widget name causing it. ( it may not be your widget but an other on conflicting somehow ?)
  • could you put that code into a method and call it manually at runtime ( when player isn’t dead ) ? ( make it BlueprintCallable and bind it on player controller , or though cheat manager as exec if you have one setup )
  • last one, make a blueprint event “OnDie” on you player, that you brodcast from here and on you bp, you spawn the widget ( should crash the same way, but who knows ? )

Still isn’t working…

Okay, still haven’t fixed this.

I’ve made sure the player controller exists and isn’t null, the widget exists and isn’t null.
Whenever ‘AddToViewport’ is called it crashes.

if
(URespawnCPP* RespawnUserWidget = CreateWidget(controller, RespawnWidget.LoadSynchronous()))

{

 controller->SetInputMode(FInputModeUIOnly());

 controller->bShowMouseCursor = true;

 RespawnUserWidget->AddToViewport();

}

Still having the issue…

without beeing able to debug it make it impossible to help you :confused:
did you try to spawn the menu at a different time like i suggested ? Did it crashed too ?
What about the blueprint way i suggested ? also crashed ?

Yes, I tried that way before posting this question. 2-5 second delay, doesn’t matter.
I haven’t tested the blueprint way.