Crash when adding new object instances in array in Widget Editor

We uncovered this crash while working on our game and isolated the problem in the attached project.

This EPS ticket seems to relate to our issue, but it’s not exactly the same:

[Content removed]

We made an engine change on our side to set the outer object as the transient package in SetPropertyValueFromString to prevent the crash, but this is probably not the proper fix.

Let us know if you need more details!

Thanks!

[Attachment Removed]

Steps to Reproduce
Using the attached project:

Create a component blueprint of type ‘MyComponent’

Create a widget of base class ‘MyTestWidget’

In the newly created widget, try to add the blueprint component, compile and save the widget.

Try to add another component, it should crash after clicking on the + icon.

If it doesn’t crash at that time, adding more objects of the blueprint type, compiling the BP and saving, and adding again might trigger the issue.

[Attachment Removed]

Thanks a lot for the details report and crash info! We’ve filed UE-385946, which you will be able to see when the issue goes public in a bit.

Ben

[Attachment Removed]

Hey there,

Would you mind attaching the callstack and logs from your crash as well?

Thank you!

[Attachment Removed]

Ah, sorry, I thought I added them when I created the ticket. Crash dump /w logs are attached to this message. Call stack looks like this:

[Inlined] UE::Logging::Private::BasicFatalLogV::__l2::<lambda_1>::operator()() StructuredLog.cpp:1708
[Inlined] UE::Logging::Private::BasicFatalLogV(const UE::Logging::Private::FStaticBasicLogRecord &, void *, char *) StructuredLog.cpp:1708
UE::Logging::Private::BasicFatalLog(const UE::Logging::Private::FStaticBasicLogRecord &,const FLogCategoryBase *,...) StructuredLog.cpp:1718
StaticAllocateObjectErrorTests(const UClass *, UObject *, FName, EObjectFlags) UObjectGlobals.cpp:3521
StaticAllocateObject(const UClass *, UObject *, FName, EObjectFlags, EInternalObjectFlags, bool, bool *, UPackage *, int, FRemoteObjectId, FGCReconstructionGuard *) UObjectGlobals.cpp:3674
StaticConstructObject_Internal(const FStaticConstructObjectParameters &) UObjectGlobals.cpp:5038
StaticDuplicateObjectEx(FObjectDuplicationParameters &) UObjectGlobals.cpp:3251
FObjectPropertyBase::ImportText_Internal(const wchar_t *, void *, EPropertyPointerType, UObject *, int, FOutputDevice *) PropertyBaseObject.cpp:478
FObjectProperty::ImportText_Internal(const wchar_t *, void *, EPropertyPointerType, UObject *, int, FOutputDevice *) PropertyObject.cpp:405
FArrayProperty::ImportTextInnerItem(const wchar_t *, const FProperty *, void *, int, UObject *, FScriptArrayHelper *, FOutputDevice *) PropertyArray.cpp:1081
FArrayProperty::ImportText_Internal(const wchar_t *, void *, EPropertyPointerType, UObject *, int, FOutputDevice *) PropertyArray.cpp:1029
PropertyPathHelpersInternal::SetPropertyValueFromString<…>(void *, const FCachedPropertyPath &, const FString &, unsigned int) PropertyPathHelpers.cpp:362
PropertyPathHelpersInternal::TPropertyPathResolver::Resolve(void *, const FCachedPropertyPath &) PropertyPathHelpers.h:681
PropertyPathHelpersInternal::IteratePropertyPathRecursive<…>(UStruct *, void *, int, const FCachedPropertyPath &, PropertyPathHelpersInternal::FPropertyPathResolver &) PropertyPathHelpers.cpp:42
PropertyPathHelpersInternal::IteratePropertyPathRecursive<…>(UStruct *, UObject *, int, const FCachedPropertyPath &, PropertyPathHelpersInternal::FPropertyPathResolver &) PropertyPathHelpers.cpp:98
PropertyPathHelpersInternal::ResolvePropertyPath(UObject *, const FCachedPropertyPath &, PropertyPathHelpersInternal::FPropertyPathResolver &) PropertyPathHelpers.cpp:538
PropertyPathHelpers::SetPropertyValueFromString(UObject *, const FCachedPropertyPath &, const FString &, unsigned int) PropertyPathHelpers.cpp:1259
PropagateDefaultPropertyChange(const FPropertyChangedEvent &, const FEditPropertyChain &, UObject *, UObject *) WidgetBlueprintEditor.cpp:1202
FWidgetBlueprintEditor::MigrateFromChain(const FPropertyChangedEvent *, FEditPropertyChain *, bool) WidgetBlueprintEditor.cpp:1270
SWidgetDetailsView::NotifyPostChange(const FPropertyChangedEvent &, FEditPropertyChain *) SWidgetDetailsView.cpp:675
FPropertyNode::NotifyPostChange(FPropertyChangedEvent &, FNotifyHook *) PropertyNode.cpp:3437
FPropertyValueImpl::AddChild() PropertyHandleImpl.cpp:1433
FPropertyHandleArray::AddItem() PropertyHandleImpl.cpp:5415
FPropertyEditor::OnAddItem() PropertyEditor.cpp:240
[Inlined] Invoke(void (FPropertyEditor::*)(), FPropertyEditor *&) Invoke.h:66
[Inlined] UE::Core::Private::Tuple::TTupleBase::ApplyAfter(void (FPropertyEditor::*&)(), FPropertyEditor *&) Tuple.h:326
TBaseSPMethodDelegateInstance::ExecuteIfSafe() DelegateInstancesImpl.h:325
[Inlined] TDelegate::ExecuteIfBound() DelegateSignatureImpl.inl:631
SDetailsViewBase::Tick(const FGeometry &, const double, const float) SDetailsViewBase.cpp:1281
SWidget::Paint(const FPaintArgs &, const FGeometry &, const FSlateRect &, FSlateWindowElementList &, int, const FWidgetStyle &, bool) SWidget.cpp:1445
SPanel::PaintArrangedChildren(const FPaintArgs &, const FArrangedChildren &, const FGeometry &, const FSlateRect &, FSlateWindowElementList &, int, const FWidgetStyle &, bool) SPanel.cpp:33
SPanel::OnPaint(const FPaintArgs &, const FGeometry &, const FSlateRect &, FSlateWindowElementList &, int, const FWidgetStyle &, bool) SPanel.cpp:15
[...snip...]

[Attachment Removed]