DebugGame breaks SkeletalMesh location, but not in Development

I currently have an actor whose root component is a skeletal mesh component:

this->Mesh1P = OI.CreateDefaultSubobject<UWeapon1PMeshComponent>(this, TEXT("First Person Mesh"));
this->RootComponent = this->Mesh1P;

This component simply loads up a skeletal mesh:

UWeapon1PMeshComponent::UWeapon1PMeshComponent(const class FObjectInitializer& OI)
    : Super(OI)
{
    // Load first person weapon mesh mesh.
    static ConstructorHelpers::FObjectFinder<USkeletalMesh> Weapon1PMesh(TEXT("SkeletalMesh'/Game/Actors/Charger/Models/Charger1stPerson1'"));

    if (Weapon1PMesh.Succeeded())
        SetSkeletalMesh(Weapon1PMesh.Object);
}

Now the thing is, the actor works fine in “Development Editor” mode. However, when I try to run the game through Visual Studio with “DebugGame Editor”, the actor’s location is completely wrong, and I cannot change the location at all. As soon as I enter a new location in the editor, it snaps back to some other weird location, as if it picked some random memory location to get the values from. I do not have any debug specific code and I am at loss here what the cause may be and how to fix it.

This does not happen with my static mesh actors, and when I put mesh in a SceneComponent instead and set that as the RootComponent, the SceneComponents is placed nicely where you’d expect it to be. Yet, the skeletesh mesh is again way out of view. The skeletal mesh also does not have any animations. I’ve also checked the logs, and there were no errors whatsoever.

Development:

http://puu.sh/eEdNj/57cd7d94fa.jpg

DebugGame:

http://puu.sh/eEe0R/1ad1421330.png

I found the culprit! It was all because of unitialized variables.

I have the following function:

void AWeapon::OnConstruction(const FTransform& Transform)
{
    Super::OnConstruction(Transform);

    // Add additional 1st person model offsets.
    GetMesh1P()->AddLocalOffset(
        FVector(
            0,
            this->Settings.OffsetForward,
            this->Settings.OffsetUpward
        )
    );
}

this->Settings points to a struct. In this struct however, I have only declared the variables, but not initialized them in the constructor. In C++ this leads to undefined behaviour, as it cannot be guarenteed that the variables will have the value “0”.

FWeaponSettings::FWeaponSettings()
{

}