AccessingProperty of Instance of Standard Class Causes Editor Crash
I am getting an editor crash when trying to instantiate a custom (empty) C++ class and access one of its public methods.
Here is where the problem seems to occur:
asked Sep 24 '16 at 06:18 PM in C++ Programming
It's probably a nullptr exception caused by the GameStateSnapshot not instantiating correctly. Always include a null pointer check before using an unknown pointer.
Also, you should probably not be creating your object via "new"; you want to use NewObject. Otherwise you lose all benefit of UE4 gc and can easily introduce memory leaks (like when you don't nullify your SnapshotCheckpoint pointer in your destructor).
For NewObject to work, you'll need to inherit from UObject when defining your GameStateSnapshot (which then becomes UGameStateSnapshot) Is there a reason you're not deriving from UObject (or AActor) to define your snapshot class?
answered Sep 24 '16 at 07:30 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here