Description

While using a custom struct that contains a TArray member variable with FInstancedStruct, you cannot edit it in the editor without a crash. Other structs and types work as expected even if they derive from the same parent as the array struct. The crashes are not always on the first time the array is modified or every time. It is quite often with >75% probability to occur. 

Steps to Reproduce
  1. Use Debug Editor configuration of the Editor
  2. Create the following C++ structs
    1. USTRUCT()
      struct FMyTestDataBase
      {
          GENERATED_BODY()
      };
       
      USTRUCT()
      struct FMyTestDataIntArray : public FMyTestDataBase
      {
          GENERATED_BODY()
          UPROPERTY(EditAnywhere, Category = "Config")
          TArray<int> Params;
      };
       
      USTRUCT()
      struct FMyTestDataInt : public FMyTestDataBase
      {
          GENERATED_BODY()
          UPROPERTY(EditAnywhere, Category = "Config")
          int Param;
      };
       
      USTRUCT(BlueprintType)
      struct FMyTestDataReader
      {
          GENERATED_BODY()
          UPROPERTY(EditAnywhere, meta = (BaseStruct = "/Script/MyTestData.FMyTestDataBase", ExcludeBaseStruct), Category = "Config")
          FInstancedStruct MyTestData;
      };
       
      UCLASS(Blueprintable)
      class UMyTestObject : public UObject
      {
          GENERATED_BODY()
      public:
          UPROPERTY(EditAnywhere, Category = "Config")
          FMyTestDataReader MyTestReader;
      };
  1. Create a BP that derives from UMyTestObject
  2. Edit the default value of the FMyTestDataReader on the BP
  3. Set My Test Data to use the My Test Data Int
  4. Set the value of the int to any number
  5. Change My Test Data to use the My Test Data Int Array
  6. Add several elements to the array
  7. Change the values of the elements in the array

Expected Result: The instanced struct array behaves like the int and that the values change without issue in the array.

Actual Result: The editor crashes while editing the instanced struct array.

Callstack

`FScriptArrayHelper::Num'::`2'::<lambda_1>::operator()<FScriptArray>(FScriptArray *) UnrealType.h:4089
FScriptArrayHelper::WithScriptArray<`FScriptArrayHelper::Num'::`2'::<lambda_1> >(FScriptArrayHelper::<lambda_1> &&) UnrealType.h:4059
FBlueprintNamespaceUtilities::GetPropertyValueNamespaces(const FProperty *,const void *,TSet<FString,DefaultKeyFuncs<FString,0>,FDefaultSetAllocator> &) BlueprintNamespaceUtilities.cpp:202
FBlueprintVarActionDetails::ImportNamespacesForPropertyValue(const FProperty *,const void *) BlueprintDetailsCustomization.cpp:3020
FBlueprintVarActionDetails::OnFinishedChangingVariable(const FPropertyChangedEvent &) BlueprintDetailsCustomization.cpp:2959
UE::Core::Private::Tuple::TTupleBase<TIntegerSequence<unsigned int> >::ApplyAfter<void (__cdecl FBlueprintVarActionDetails::const &)(FPropertyChangedEvent const &),FBlueprintVarActionDetails * &,FPropertyChangedEvent const &>(void (FBlueprintVarActionDetails::&)(const FPropertyChangedEvent &),FBlueprintVarActionDetails *&,const FPropertyChangedEvent &) Tuple.h:311
TBaseSPMethodDelegateInstance<0,FBlueprintVarActionDetails,1,void __cdecl(FPropertyChangedEvent const &),FDefaultDelegateUserPolicy>::ExecuteIfSafe(const FPropertyChangedEvent &) DelegateInstancesImpl.h:298
TMulticastDelegateBase<FDefaultDelegateUserPolicy>::Broadcast<IBaseDelegateInstance<void __cdecl(FPropertyChangedEvent const &),FDefaultDelegateUserPolicy>,FPropertyChangedEvent const &>(const FPropertyChangedEvent &) MulticastDelegateBase.h:254
SDetailsViewBase::NotifyFinishedChangingProperties(const FPropertyChangedEvent &) SDetailsViewBase.cpp:754
FPropertyDetailsUtilities::NotifyFinishedChangingProperties(const FPropertyChangedEvent &) PropertyDetailsUtilities.cpp:65
FPropertyValueImpl::AddChild() PropertyHandleImpl.cpp:1209
FPropertyHandleArray::AddItem() PropertyHandleImpl.cpp:4877
FPropertyEditor::OnAddItem() PropertyEditor.cpp:202
TBaseSPMethodDelegateInstance<0,FPropertyEditor,1,void __cdecl(void),FDefaultDelegateUserPolicy>::ExecuteIfSafe() DelegateInstancesImpl.h:298
TDelegate<void __cdecl(void),FDefaultDelegateUserPolicy>::ExecuteIfBound<void,0>() DelegateSignatureImpl.inl:536
SDetailsViewBase::Tick(const FGeometry &,const double,const float) SDetailsViewBase.cpp:1154
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1458
SPanel::PaintArrangedChildren(const FPaintArgs &,const FArrangedChildren &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SPanel.cpp:30
SPanel::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SPanel.cpp:12
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SBox::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SBox.cpp:293
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SPanel::PaintArrangedChildren(const FPaintArgs &,const FArrangedChildren &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SPanel.cpp:30
SPanel::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SPanel.cpp:12
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SCompoundWidget::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SCompoundWidget.cpp:46
SBorder::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SBorder.cpp:129
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SPanel::PaintArrangedChildren(const FPaintArgs &,const FArrangedChildren &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SPanel.cpp:30
SPanel::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SPanel.cpp:12
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SCompoundWidget::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SCompoundWidget.cpp:46
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SCompoundWidget::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SCompoundWidget.cpp:46
SBorder::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SBorder.cpp:129
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SOverlay::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SOverlay.cpp:207
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SPanel::PaintArrangedChildren(const FPaintArgs &,const FArrangedChildren &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SPanel.cpp:30
SPanel::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SPanel.cpp:12
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SCompoundWidget::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SCompoundWidget.cpp:46
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SPanel::PaintArrangedChildren(const FPaintArgs &,const FArrangedChildren &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SPanel.cpp:30
SSplitter::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SSplitter.cpp:251
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SCompoundWidget::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SCompoundWidget.cpp:46
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SPanel::PaintArrangedChildren(const FPaintArgs &,const FArrangedChildren &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SPanel.cpp:30
SSplitter::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SSplitter.cpp:251
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SCompoundWidget::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SCompoundWidget.cpp:46
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SPanel::PaintArrangedChildren(const FPaintArgs &,const FArrangedChildren &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SPanel.cpp:30
SSplitter::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SSplitter.cpp:251
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SPanel::PaintArrangedChildren(const FPaintArgs &,const FArrangedChildren &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SPanel.cpp:30
SPanel::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SPanel.cpp:12
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SOverlay::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SOverlay.cpp:207
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SCompoundWidget::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SCompoundWidget.cpp:46
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SPanel::PaintArrangedChildren(const FPaintArgs &,const FArrangedChildren &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SPanel.cpp:30
SPanel::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SPanel.cpp:12
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SCompoundWidget::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SCompoundWidget.cpp:46
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SCompoundWidget::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SCompoundWidget.cpp:46
SBorder::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SBorder.cpp:129
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SOverlay::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SOverlay.cpp:207
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SPanel::PaintArrangedChildren(const FPaintArgs &,const FArrangedChildren &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SPanel.cpp:30
SPanel::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SPanel.cpp:12
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SCompoundWidget::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SCompoundWidget.cpp:46
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SPanel::PaintArrangedChildren(const FPaintArgs &,const FArrangedChildren &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SPanel.cpp:30
SSplitter::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SSplitter.cpp:251
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SPanel::PaintArrangedChildren(const FPaintArgs &,const FArrangedChildren &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SPanel.cpp:30
SPanel::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SPanel.cpp:12
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SOverlay::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SOverlay.cpp:207
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SCompoundWidget::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SCompoundWidget.cpp:46
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SPanel::PaintArrangedChildren(const FPaintArgs &,const FArrangedChildren &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SPanel.cpp:30
SPanel::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SPanel.cpp:12
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SPanel::PaintArrangedChildren(const FPaintArgs &,const FArrangedChildren &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SPanel.cpp:30
SPanel::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SPanel.cpp:12
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SOverlay::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SOverlay.cpp:207
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SCompoundWidget::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SCompoundWidget.cpp:46
SWindow::OnPaint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWindow.cpp:2143
SWidget::Paint(const FPaintArgs &,const FGeometry &,const FSlateRect &,FSlateWindowElementList &,int,const FWidgetStyle &,bool) SWidget.cpp:1573
SWindow::PaintSlowPath(const FSlateInvalidationContext &) SWindow.cpp:2067
FSlateInvalidationRoot::PaintInvalidationRoot(const FSlateInvalidationContext &) SlateInvalidationRoot.cpp:398
SWindow::PaintWindow(double,float,FSlateWindowElementList &,const FWidgetStyle &,bool) SWindow.cpp:2106
FSlateApplication::DrawWindowAndChildren(const TSharedRef<SWindow,1> &,FDrawWindowArgs &) SlateApplication.cpp:1154
FSlateApplication::PrivateDrawWindows(TSharedPtr<SWindow,1>) SlateApplication.cpp:1390
FSlateApplication::DrawWindows() SlateApplication.cpp:1098
FSlateApplication::TickAndDrawWidgets(float) SlateApplication.cpp:1681
FSlateApplication::Tick(ESlateTickType) SlateApplication.cpp:1540
FEngineLoop::Tick() LaunchEngineLoop.cpp:5934
EngineTick() Launch.cpp:61
GuardedMain(const wchar_t *) Launch.cpp:190
LaunchWindowsStartup(HINSTANCE__ *,HINSTANCE__ *,char *,int,const wchar_t *) LaunchWindows.cpp:247
WinMain(HINSTANCE__ *,HINSTANCE__ *,char *,int) LaunchWindows.cpp:298
[Inlined] invoke_main() 0x00007ff6f29877ca
__scrt_common_main_seh() 0x00007ff6f29877a9
<unknown> 0x00007fff8a2726ad
<unknown> 0x00007fff8ad4a9f8

Have Comments or More Details?

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

8
Login to Vote

Unresolved
ComponentUE - AI
Affects Versions5.2.1
Target Fix5.5
CreatedJun 30, 2023
ResolvedSep 7, 2023
UpdatedFeb 29, 2024