UProperty component of component gets attached as root of actor, crashes UE4 when attached to Blueprint

Hi.

more info and data here:

Steps to reproduce issue:

  1. Create a custom SceneComponent on c++.
  2. add a component as property to this component

Code is as follows:

UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class MYPROJECT_API UChannelSwitchComponent : public USceneComponent
{
	GENERATED_BODY()

public:	
	// Sets default values for this component's properties
	UChannelSwitchComponent();

	// Called when the game starts
	virtual void BeginPlay() override;
	
	// Called every frame
	virtual void TickComponent( float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction ) override;

	UFUNCTION(BlueprintCallable,Category="Channel Switching")
	virtual bool ChannelSwitch();

    //PROBLEMATIC COMPONENT
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	ULightComponent *LightComponent;
	
};
  1. Go to Editor and attach this component to a Blueprint
  2. Select the PRoperty component from the DropDownMenu

  1. At this moment, this property component gets attached to the actor.

  2. if you make ANY change to the Custom Component, UE4 will crash. Error is on ComponentInstanceDataCache.cpp
    line 231.

Unreal engine shows the following warning in the logs

PIE:Warning: Warning AttachTo: ‘/Game/Pieza.Pieza:PersistentLevel.Samsung_LED_TV_Blueprint_40.Samsung_LED_TV’ already attached to ‘/Game/Pieza.Pieza:PersistentLevel.Samsung_LED_TV_Blueprint_40.ChannelSwitchableLight’, would form cycle. Aborting.

Where Samsung_LED_TV_BLUEPRINT_40 is the blueprint in which i attached the custom component


NOTES: if you use a ActorComponent, UE4 won’t crash but when you select the UPROPERTY Component on the EDITOR, it becomes the new ROOT, and it becomes IMPOSIBLE to change the root, it shows an error warning saying:

“The selected component is inherited and cannot be reordered here”

Hello ,

Instead of splitting the information about this subject, we should stick to your original post. As such, I’ll be closing this question. Please refer to your original post for further information/updates.