How to debug UE4 crashed when delegate broadcasted?

I’ve done everything the same (unless I’ve missed something), but every time my delegate broadcasted, the Editor crashed…
In the logs it shows on the “GENERATED_BODY()” line in my TankAIController.h, but I have no idea how to look inside into the unreal macros.

I’ve already tried to clear up all build stuff, but nothing changed.

UE4.15.1
the project on the github

I’m mostly interested not about this exact issue, rather about how to debug such things in common? I mean, when something happened inside UE macros or even inside compiled dll… VS does not show any additional details when I’m attaching it and breaking on the crash.

Kind of a hard one to debug however set to build for Debug Editor and debug that version

You will get the following

Looking at the source you have

void ATankAIController::OnTankDeath() {
	UE_LOG(LogTemp, Warning, TEXT("Tank is dead! %s"));
}

So you have a missing argument in the UE_LOG as you have a %s without the argument to be used with it.

Thank you for the advice!

So you have a missing argument in the UE_LOG

Whoa, it was unexpectedly silly… :smiley: Thank you!
But why the crash didn’t showed this exact line or even method? It looks like it crashed exactly before calling this.
I’ve thought several times “maybe remove the log just to check? Nah, it can’t break anything!” :cry:

Because there’s some optimisations that are enabled with building the Development build. So the code isn’t exactly how it’s written. However with the Debug version those should be disabled.

Privacy & Terms