Two-level-deep nested instanced object crash during eiditing

Steps to reproduce:

  1. In C++ create class C which is marked as instanced within a class B which is also marked as instanced within class A.
  2. Create blueprint based on A
  3. Create instance of B through the drop down menu within class A
  4. Create instance of C through the drop down menu within class B
  5. Edit property of class C
  6. 100% crash at FPersistentObjectRef:perator->() function

This Didn’t happen in 4.7.

Quick investigation revealed that bIsSubobjectOfCDO check in FPersistentObjectRef constructor has been added in 4.8.
The function OuterIsCDO returns A as outer of C, which is wrong ?
Should OuterIsCDO function not go up all the way to root before breaking ?

I’m sorry, would love to investigate this further, but schedule is tight.

Thank you.

Hi ,

I’m not sure that I completely understand what you mean by creating an instance of Class B inside of Class A. Is this related to inheritance/children? Another thing that would help is if you could provide the code related to these classes so that it is easier to see what is going on.

class UC : public UObject
{
}

class UB : public UObject
{
UPROPERTY(Category = "Bla", EditAnywhere, BlueprintReadOnly, **Instanced**)
TArray<UC*> ArrayOfCs;
}

class AA : public AActor
{
UPROPERTY(Category = "Bla", EditAnywhere, BlueprintReadOnly, **Instanced**)
TArray<UB*> ArrayOfBs;
}

In the editor, when you’re editing a blueprint derived from AA, you’ll see that there’s a drop down menu for each item in the property ArrayOfBs. When you click that drop down menu, you have a list of classes/blueprints that derived from UB. You can choose any to “create an instance” of that class and assign it to an item of ArrayOfBs. The crash happens when I’m doing that same thing for class UC within class UB.

I see what you mean now but I am getting different results when using this code. I’ve copied what you have there (except for the asterisks around Instanced for course) and played it into 3 classes as you’ve done. The selection of what to put into the array is the problem, as it always populates with only ‘None’ as in this picture:

47912-none.png

I also tried changing the C and B classes to actors so that I could actually place them in the level to have ‘instances’ to pull from, but to no avail.

Sorry, I forgot to mention that you need “EditInlineNew” in class B and class C.

Anyway, I’ve included the project file [(link)][3] and source code that will reproduce this bug.
You only need to do the following to reproduce the bug.

  1. Open BP_ActorA blueprint
  2. Expand properties like so

47952-img01.png

  1. Now, check “Some Boolean”, it will crash 100% with this callstack

Also, I found that if you drop BP_ActorA in the map, it doesn’t crash. So, currently we edit the blueprint by dropping in into the map, then update from instance.

Hi ,

I’ve reproduced the issue thanks to the project you provided. I’ve placed a bug report in our database for the issue. For your reference, the bug number is UE-18137. Unfortunately I can’t provide any workarounds for the moment but I hope that we can have this fixed soon.

Have a nice day,

Hi ,

Do you have any updates on UE-18137 ? Was it fixed during the last year?

Hello ,

The bug report was marked as fixed for 4.9 and was marked as fixed in July of 2015. Are you still experiencing this issue in a newer version of the engine? If so, please make a new post in the Bug Reports section of Answerhub with as much detail as you can provide. Please feel free to link back to this post as well.

Yes, but this time dealing with a deeper structure.

New report is here: N-deep nested instanced object crash during editing - Asset Creation - Epic Developer Community Forums