I am experiencing a crash of the engine (with my packaged project) right after launching the game. The only modified file in the crash report is my HUD-Class:
Unknown exception - code 00000001 (first/second chance not available)
Assertion failed: MostRecentPropertyAddress [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.6\Engine\Source\Runtime\CoreUObject\Public\UObject\Stack.h] [Line: 415]
StruggleOfMages!ASomHUD::ReceiveDrawHUD() + 221 bytes [c:\users\saden\documents\unreal projects\struggleofmages\source\struggleofmages\somhud.cpp:1759]
The corresponding line says the following:
//Get the mouse position from Player Controller
Am I doing something wrong or is it an issue with “GetMousePosition”?
According to the documentation, APlayerController::GetMousePosition takes two floats as arguments and returns a bool. However, according to the implementation, it assigns new values to the floats passed in. Try creating temporary variables and reassigning a new FVector2D:
// Assign SomePC somewhere in between...
// In cases where an FVector2D must be passed into something else.
FVector2D MousePos = FVector2D(MousePosX, MousePosY);
Does it make a difference?
Thanks for your answer, Alonzo. It was a good thought, but didn’t work. I commented out the whole lines afterwards and it turned out to be “Super::ReceiveDrawHUD(SizeX, SizeY)”, which caused the problem.
In short, the mistake is somewhere in my Blueprints. That is gonna be fun :-/… Thanks though.