Missing UPROPERTY woes
Over the last few days I have rewritten my world coordinate system. This was no small task affecting everything in a profound way.
I was testing it and Unreal blew up with a memory allocation issue. I had no idea what was going on but running out of memory this early in development is very frightening. I tried it again and eventually it blew up again in a different location with a memory allocation issues.
I did 2 memory dumps, one when it started and one after moving around a while and saw nothing unusual.
Then I decided to review all my code for missing UPROPERTY. UPROPERTY is a pre-compilation macro that tells Unreal that it needs to manage the variable in memory versus destroying it on a whim.
I found 2 missing UPROPERTY variables.
Once I fixed those everything was fine again.
That is very scary. I need to have a strategy of isolating all member variables for a class at the top of the header file and review them occasionally to ensure every one of them is a UPROPERTY.
No comments:
Post a Comment