Description

If the UPROPERTY() specifier "VisibleDefaultsOnly" or "EditDefaultsOnly" is used on a component reference that is attached to the root component selecting the actor with this component in the world outliner causes a crash. This crash did not occur in 4.7.6 binary version (Regression).

Working CL: 2515172

Broken CL: 2521032

edit MattK: See answer hub log messages "Template Mismatch during attachment. Attaching instanced component to template component. Parent 'SceneRoot' Self 'MyTrigger'". Not editor bug.

Steps to Reproduce

1. Open UE4 in 4.8 (any project)
2. Add class to project based on Actor (MyActor)
3. In header file, add the following:

	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = Translation)
		USceneComponent* SceneComponent;

	UPROPERTY(VisibleDefaultsOnly, BlueprintReadWrite, Category = Pollination)
		USphereComponent* MyTrigger;

4. In the Source file, add the following to the constructor:

SceneComponent = CreateDefaultSubobject<USceneComponent>(TEXT("SceneRoot"));
	RootComponent = SceneComponent;

	MyTrigger = CreateDefaultSubobject<USphereComponent>(TEXT("MyTrigger"));
	MyTrigger->AttachTo(RootComponent);

5. Compile
6. Create blueprint based on MyActor (MyActorBP)
7. Add instance of MyActorBP to the level
8. PIE
9. Find MyActorBP in world outliner and click it

Result:
Editor will freeze and crash

Expected:
BP actor is selected in the outliner and in the level.

Have Comments or More Details?

Head over to the existingAnswerHub thread and let us know what's up.

0
Login to Vote

Fixed
ComponentCore
Affects Versions4.8
Target Fix4.8.2
Fix Commit2601974
CreatedJun 19, 2015
ResolvedJun 26, 2015
UpdatedFeb 5, 2017