Description

If two code components have the same TEXT("") name in the CreateDefaultSubobject call the code will compile correctly but the editor will freeze when adding an instance of the class or classBP to the level.

Steps to Reproduce

1. Open UE4Editor (any project)
2. Add Code to project based on Actor (MyActor)
3. In MyActor.h add the following:

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Test)
UShapeComponent* Box;

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Test)
UShapeComponent* Box2;

4. In MyActor.cpp Add the following to the constructor:

Box = CreateDefaultSubobject<UBoxComponent>(TEXT("Box"));
Box2 = CreateDefaultSubobject<UBoxComponent>(TEXT("Box"));

5. Compile
6. Add class instance to the level

Result:
When the instance is added to the level and construction script runs the editor freezes

Expected:
Compile error referencing naming conflict

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

0
Login to Vote

Fixed
ComponentUE - Foundation - Core
Affects Versions4.8
Target Fix4.9
Fix Commit2602004
CreatedJun 24, 2015
ResolvedJun 26, 2015
UpdatedFeb 5, 2017
View Jira Issue