Crash when printing inside function

Actually I’m surprised…

This code works fine:


void UGameEntityManager::OnActorSpawned(UAresMessage* message)
{
    auto msg = Cast<UActorSpawnedMessage>(message);
    if(IsValid(msg) && IsValid(msg->StaticClass()) && IsValid(msg->Instigator) && IsValid(msg->Actor))
    {
        _actors.Add(msg->Actor);
    }

}

Maybe its just the UE_LOG macro simply not working there? I can live with that but it still feels… fishy.

Also [USER=“434”]BrUnO XaVIeR[/USER] I checked out the IMessageBus/Endpoint/EndpointBuilder again. They look very sophisticated but are totally unusable with blueprints, so using them is not an option.
I tried building a wrapper class but most of the code uses Templates. I got around that for most of the time but I got stuck at the function pointer parameter… No idea how to translate that to blueprints aka Delegates.