UE_LOG enters in an infinite loop at compile time

Thales
Tue, 26 Jan 2021 20:14:13 +0000
Pipeline & Plugins

I was experimenting with Unreal 4.25 when I noticed that Visual Studio was taking forever to compile a simple project. I was removing stuff until I narrowed it down to how I wrote a call to UE_LOG. In this case it is just this:

void AEventsGameModeBase::TestFunction()
{
	FString Text = TEXT("Some Text");
	UE_LOG(LogGameMode, Info, TEXT("%s"), *Text);
}

I then realized that there is no ELogVerbosity::Info, however, this piece of code will make cl.exe enter into an infinite loop. I was expecting it to error out but that is not the case. This is clearly not a bug, but there I was wondering if anyone would know why the compiler doesn’t finish with this Info value that doesn’t exist.

I will try to investigate it at some point when I have time but maybe someone knows it already.

3 posts - 1 participant