Description

When compiling on load in -game, a blueprint class that inherits from a native class that is marked within and the class that it is within is abstract, a crash will occur when FBlueprintCompilationManagerImpl::GetOuterForRename tries to create a dummy outer object.

To fix this the NewObject is going to need a way to allow for an abstract object to be created to act as the outer or possibly more reasonably, the Rename needs to be made to allow for the rename to push to a non-within outer, though that does have its own risks.

Steps to Reproduce

Add the following code to a .h in a code project

UCLASS(Blueprintable, abstract)
class AAbstractClass : public AActor
{
	GENERATED_BODY()

public:

	UPROPERTY(EditAnywhere, Instanced)
	TArray<class UWithinClass*> ClassObjects;
};

UCLASS(Blueprintable, Within=AbstractClass, EditInlineNew)
class UWithinClass : public UObject
{
	GENERATED_BODY()
};

Compile and run the editor.
Create a blueprint of type WithinClass (WithinBP) and add a boolean variable to it
Place an instance of AbstractClass in to the level
Add an entry to ClassObjects on that instance and select WithinBP
Compile WithinBP

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-109049 in the post.

0
Login to Vote

Fixed
ComponentUE - Gameplay - Blueprint Compiler
Affects Versions4.26
Target Fix4.27.15.0
Fix Commit17577482
Main Commit17577483
Release Commit17577482
CreatedFeb 20, 2021
ResolvedSep 20, 2021
UpdatedDec 1, 2022