Why do two meshes with identical uproperties behave differently in the editor?

I created a class as follows:

    UCLASS(config = Game)
    class FPTEMPLATE_API AFPTemplateCustomCharacter : public ACharacter {
      /** Thing 1 */
      UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = Mesh, meta = (AllowPrivateAccess = "true"))
      class UPoseableMeshComponent* PoseableMeshComponent;
      /** Thing 2 */
      UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = Mesh, meta = (AllowPrivateAccess = "true"))
      class UPoseableMeshComponent* PoseableMeshComponent2;
      // Sets default values for this character's properties
      AFPTemplateCustomCharacter(const FObjectInitializer& ObjectInitializer);
     / * declaration of virtual methods follows... */

The constructor initializes the two poseable meshes as follows:

AFPTemplateCustomCharacter::AFPTemplateCustomCharacter(const FObjectInitializer& ObjectInitializer)
    : ACharacter(ObjectInitializer.DoNotCreateDefaultSubobject(ACharacter::MeshComponentName)) {
  PrimaryActorTick.bCanEverTick = true;

  PoseableMeshComponent = CreateOptionalDefaultSubobject<UPoseableMeshComponent>(TEXT("PoseableMeshComponent1"));
  if (PoseableMeshComponent) {
    PoseableMeshComponent->VisibilityBasedAnimTickOption = EVisibilityBasedAnimTickOption::AlwaysTickPose;
    PoseableMeshComponent->bCastDynamicShadow = true;
    PoseableMeshComponent->CastShadow = true;
    PoseableMeshComponent->bAffectDynamicIndirectLighting = true;
    PoseableMeshComponent->PrimaryComponentTick.TickGroup = TG_PrePhysics;

    static FName MeshCollisionProfileName(TEXT("CharacterMesh"));

  PoseableMeshComponent2 = CreateOptionalDefaultSubobject<UPoseableMeshComponent>(TEXT("PoseableMeshComponent0"));
  if (PoseableMeshComponent2) {
    PoseableMeshComponent2->VisibilityBasedAnimTickOption = EVisibilityBasedAnimTickOption::AlwaysTickPose;
    PoseableMeshComponent2->bCastDynamicShadow = true;
    PoseableMeshComponent2->CastShadow = true;
    PoseableMeshComponent2->bAffectDynamicIndirectLighting = true;
    PoseableMeshComponent2->PrimaryComponentTick.TickGroup = TG_PrePhysics;

    static FName MeshCollisionProfileName(TEXT("CharacterMesh"));

I then created a blueprint that inherits from this character subclass in the Unreal Editor. In the blueprint, only PoseableMeshComponent2 has “Details” that I can edit. The first one does not. This is in spite of the fact that their declarations/uproperties appear to be identical.

I was able to resolve this by renaming PoseableMeshComponent to PoseableMeshComponent1, triggering re-compile, and then renaming it back and compiling again. This kind of behavior is very disconcerting though. Is there something I am doing wrong? I should note that in the process of doing this, the unreal editor also crashed a few times for an unknown reason.

Thanks for your help.

This is common case of blueprint corruption caused by hot reload. First regardless what you going to do close editor and compile your code with editor closed (even rebuild so you got cleanest build of your module)

Now there really not fix for blueprint, normally you would need to recreate blueprint but renaming component might help you gonna have unused trash in uasset file.

In general rule, if you changing header file, you change class structure, you should avoid hot reloading, or at very least don’t save blueprints when you do use it. Property structure changing on hot reload very common cause of asset corruption, as with hot reload your module being hot swaped with all objects related alive and engine can’t cover all use cases.