UnrealEngine.cpp crash Xcode debug

Hi Guys,

I’m building from the source on OSX (Mavericks 10.9.2, Xcode 5.1, mac Pro 2013) and I can successfully build the editor and create a new empty c++ project.

However when I compile the project code in the debug scheme I get a crash when the editor runs :

/** Wrapper from int32 to uint64 */
void UEngine::AddOnScreenDebugMessage(int32 Key, float TimeToDisplay, FColor DisplayColor, const FString& DebugMessage)
{
	if (bEnableOnScreenDebugMessages == true)
	{
		AddOnScreenDebugMessage( (uint64)Key, TimeToDisplay, DisplayColor, DebugMessage);
	}
}

I get a EX_BAD_ACCESS (code=1) for the if statement check on bEnableOnScreenDebugMessages

In my project code I simply call AddOnScreenDebugMessage in the constructor of my custom PlayerController.

GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("Hello World"));

If I remove the debug message it compiles and runs…

Also when I First compiled my project code from within the editor, I received an error about missing dylib files see below :

CompilerResultsLog: Info clang: error: no such file or directory: '/UnrealEngine/Engine/Binaries/Mac/UE4Editor-Core-Mac-Debug.dylib'
CompilerResultsLog: Info clang: error: no such file or directory: '/UnrealEngine/Engine/Binaries/Mac/UE4Editor-CoreUObject-Mac-Debug.dylib'
CompilerResultsLog: Info clang: error: no such file or directory: '/UnrealEngine/Engine/Binaries/Mac/UE4Editor-Engine-Mac-Debug.dylib'
CompilerResultsLog: Info clang: error: no such file or directory: '/UnrealEngine/Engine/Binaries/Mac/UE4Editor-InputCore-Mac-Debug.dylib'

If I look inside the editor application package I can see the files, and if I copy them out of the app bundle and into the correct location I can compile from the editor.

Am I doing something wrong during the build process? or is something else happening here.

Thanks!

The missing dylibs is a bug, I’m afraid. Many thanks for finding it. And sorry for trouble. As for the crash, I suppose that GEngine is not initialized yet when you try to call AddOnScreenDebugMessage, but that’s just a hunch.

Hi Michael,

Thanks for your fast reply and don’t worry about the bug, it was easily fixed.

I think you’re right about GEngine not being initialised, If I move the Debugmessage into the constructor of my default Pawn or my custom gameMode it works perfectly.

Perhaps I should be using UE_Log instead :wink:

Thanks!