Trouble creating custom GameState class

I’ve created a new GameState class derived from AGameState and I added the following to my GameCode class:

GameStateClass = ATestGameState::StaticClass();

This compiles and works just fine until you try to add a replicated variable inside the new game state. Then bad things happen. Basically, the editor stops functioning and you can’t access your project any longer. The code in the new game state looks like this:


UCLASS(config=Game, notplaceable, BlueprintType, Blueprintable)
class NEWSHOOTER_API ATestGameState : public AGameState
{
	GENERATED_UCLASS_BODY()

public:
	float GetRemainingMapTime( );


	UPROPERTY(replicated, BlueprintReadOnly, Category=GameState)  <---- adding this line kills the editor
	float RemainingMapTime;
};

Apparently, it has something to do with the hot reload and a missing symbol. The error in the log is this:

Warning: dlopen failed: Unreal Projects/NewShooter/Binaries/Linux/libUE4Editor-NewShooter-1106.so: undefined symbol: _ZTV12ATestGameState

This is essentially identical in form to the code inside the parent class AGameState. Why is this not working?

This link has the answer: