MovementComponent Hard Crash in FirstPersonShooter Game

Hi, I’ve been messing around with a project that extends from the FirstPersonShooter game example. At some point, I messed something up and the project compiled, but started crashing as soon as I try and move the pawn. I couldn’t figure it out so I started regressing builds, and now I’m at the point now where I just have an empty class that extents from ShooterCharacter, but it still crashes as soon as I try to move.

The crash is:
“Unhandled exception at 0x00007FF9DFDA6D73 (UE4Editor-ShooterGame.dll) in UE4Editor.exe: 0xC0000005: Access violation reading location 0x0000000000000000.”

And in the debug log Im getting lots of errors such as:

[2015.01.10-04.22.17:246][204]LogScript:Warning: Accessed None 'CallFunc_GetMovementComponent_ReturnValue'
	HeroTPP_AnimBlueprint_C /Game/Space/UEDPIE_0_SpaceLevel.SpaceLevel:PersistentLevel.SpacePawn_C_0.CharacterMesh0.HeroTPP_AnimBlueprint_C_2
	Function /Game/Characters/HeroTPP/HeroTPP_AnimBlueprint.HeroTPP_AnimBlueprint_C:ExecuteUbergraph_HeroTPP_AnimBlueprint:05BE
[2015.01.10-04.22.17:246][204]PIE:Error: Error Accessed None 'CallFunc_GetMovementComponent_ReturnValue' from node Set JumpTime in blueprint HeroTPP_AnimBlueprint
[2015.01.10-04.22.17:247][204]LogScript:Warning: Accessed None 'CallFunc_GetMovementComponent_ReturnValue'
	HeroFPP_AnimationBlueprint_C /Game/Space/UEDPIE_0_SpaceLevel.SpaceLevel:PersistentLevel.SpacePawn_C_0.PawnMesh1P.HeroFPP_AnimationBlueprint_C_2
	Function /Game/Characters/HeroFPP/HeroFPP_AnimationBlueprint.HeroFPP_AnimationBlueprint_C:ExecuteUbergraph_HeroFPP_AnimationBlueprint:067A
[2015.01.10-04.22.17:248][204]PIE:Error: Error Accessed None 'CallFunc_GetMovementComponent_ReturnValue' from node Set IsWalking in blueprint HeroFPP_AnimationBlueprint
[2015.01.10-04.22.17:248][204]LogScript:Warning: Accessed None 'CallFunc_GetMovementComponent_ReturnValue'

Extended class .h:
// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "ShooterGame.h"
#include "SpaceCharacter.generated.h"

/**
 * 
 */
UCLASS(Abstract)
class ASpaceCharacter : public AShooterCharacter
{
	GENERATED_UCLASS_BODY()



};

and the .cpp

// Fill out your copyright notice in the Description page of Project Settings.


#pragma once
#include "ShooterGame.h"
#include "SpaceCharacter.h"


ASpaceCharacter::ASpaceCharacter(const class FPostConstructInitializeProperties& PCIP)
	: Super(PCIP)
{

}

I’m using 4.6. Any ideas to try? Im stumped…

I don’t think the issue is just a null pointer check. At this point the project is just an empty class extending from the shootergame demo. I’ve made no changes to HeroFPP_AnimationBlueprint, or anything else.

Error Accessed None means your game tried to access a null pointer, so like i said, adding an IsValid node will fix the crash, then you can do further tests to figure out why the movement component is null without it crashing.

try changing the default pawn to a different pawn and see if it still doesn’t work.

Not sure what the problem was. I recompiled the engine and rebuilt the project but the same thing happened. Then on a whim I recreated the pawn’s blueprinted class and it worked. I hadn’t changed anything in the blueprinted pawn class so Im at a loss to what happened.