Description

Clicking on a Behavior Tree decorator that references an Enum blackboard key will crash the editor if that Enum has been altered in the method described in the repro steps.

If you set decorators to reference Enum elements 1-4, then add another element to that Enum, say 0, and reorder it so that 0 is at the top of the list, it will alter the values of the decorators as necessary (0-3 in this case). Then, if you change the decorator values back to the original values and remove element 0 from the Enum, clicking on the decorator that referenced the last element in the enum will cause the editor to crash.

Steps to Reproduce
  1. Open the editor
  2. Create a new Enum
  3. Add 4 elements to the Enum (1,2,3,4)
  4. Create a new Blackboard and Behavior Tree
  5. Add an Enum key to the Blackboard
  6. Set the key to reference your Enum
  7. Open the Behavior Tree
  8. Add a Selector->Sequence
  9. Add 4 Move To nodes under the Sequence
  10. On each Move To node, add a Blackboard decorator that checks your Enum key
  11. Set each Move To decorator to reference a different enum value (1,2,3,4)
  12. Save All
  13. Open the Enum and add a new element (0)
  14. Move element 0 to the top of the Enum
  15. Open the BT and notice that the blackboard decorators have shifted to account for the new Enum value. Change them all back to the original numbers (1,2,3,4, respectively)
  16. Open the Enum and delete 0 from it
  17. Open the Behavior Tree and select the last Move To node that was referencing 4 prior to deleting 0 from the Enum

Alternate Repro:

  1. Open the attached project
  2. Open Crash_Enum and add a new element (call it 0) and reorder it so it's at the top)
  3. Open the Behavior Tree and change the decorators to reference 1,2,3,4,5 instead of 0,1,2,3,4.
  4. Open Crash_Enum and delete element 0
  5. Open the BT and attempt to click on the Decorator that states Crash_Key is EqualTo

Result: Editor Crashes

Callstack

Assertion failed: (Index >= 0) & (Index < ArrayNum) [Link Removed] [Line: 633] Array index out of bounds: 5 from an array of size 5

UE4Editor_BehaviorTreeEditor!FBlackboardDecoratorDetails::GetCurrentEnumValueDesc() blackboarddecoratordetails.cpp:209 
UE4Editor_BehaviorTreeEditor!TMemberFunctionCaller<FBlackboardDecoratorDetails,FText() delegateinstanceinterface.h:165 
UE4Editor_BehaviorTreeEditor!TTupleImpl<TIntegerSequence<unsigned int> >::ApplyAfter<TMemberFunctionCaller<FBlackboardDecoratorDetails,FText() tuple.h:134 
UE4Editor_BehaviorTreeEditor!TBaseSPMethodDelegateInstance<1,FBlackboardDecoratorDetails,0,FText __cdecl() delegateinstancesimpl.h:327 
UE4Editor_Slate!TBaseDelegate<FText>::Execute() delegatesignatureimpl.inl:537 
UE4Editor_Slate!TAttribute<FText>::Get() attribute.h:137 
UE4Editor_Slate!FTextBlockLayout::ComputeDesiredSize() textblocklayout.cpp:48 
UE4Editor_Slate!STextBlock::ComputeDesiredSize() stextblock.cpp:177 
UE4Editor_SlateCore!SWidget::CacheDesiredSize() swidget.cpp:485 
UE4Editor_SlateCore!SWidget::SlatePrepass() swidget.cpp:473 
UE4Editor_SlateCore!SWidget::SlatePrepass() swidget.cpp:473 
UE4Editor_SlateCore!SWidget::SlatePrepass() swidget.cpp:473 
UE4Editor_SlateCore!SWidget::SlatePrepass() swidget.cpp:473 
UE4Editor_SlateCore!SWidget::SlatePrepass() swidget.cpp:473 
UE4Editor_SlateCore!SWidget::SlatePrepass() swidget.cpp:473 
UE4Editor_SlateCore!SWidget::SlatePrepass() swidget.cpp:473 
UE4Editor_SlateCore!SWidget::SlatePrepass() swidget.cpp:473 
UE4Editor_SlateCore!SWidget::SlatePrepass() swidget.cpp:473 
UE4Editor_SlateCore!SWidget::SlatePrepass() swidget.cpp:473 
UE4Editor_SlateCore!SWidget::SlatePrepass() swidget.cpp:473 
UE4Editor_PropertyEditor!SListView<TSharedRef<IDetailTreeNode,0> >::GenerateWidgetForItem() slistview.h:1011 
UE4Editor_PropertyEditor!SListView<TSharedRef<IDetailTreeNode,0> >::ReGenerateItems() slistview.h:906 
UE4Editor_Slate!STableViewBase::Tick() stableviewbase.cpp:251 
UE4Editor_PropertyEditor!STreeView<TSharedRef<IDetailTreeNode,0> >::Tick() streeview.h:444 
UE4Editor_SlateCore!SWidget::Paint() swidget.cpp:776 
UE4Editor_SlateCore!SOverlay::OnPaint() soverlay.cpp:102 
UE4Editor_SlateCore!SWidget::Paint() swidget.cpp:779 
UE4Editor_SlateCore!SPanel::PaintArrangedChildren() spanel.cpp:46 
UE4Editor_SlateCore!SPanel::OnPaint() spanel.cpp:21 
UE4Editor_SlateCore!SWidget::Paint() swidget.cpp:779 
UE4Editor_SlateCore!SCompoundWidget::OnPaint() scompoundwidget.cpp:37 
UE4Editor_SlateCore!SWidget::Paint() swidget.cpp:779 
UE4Editor_SlateCore!SPanel::PaintArrangedChildren() spanel.cpp:46 
UE4Editor_SlateCore!SPanel::OnPaint() spanel.cpp:21 
UE4Editor_SlateCore!SWidget::Paint() swidget.cpp:779 
UE4Editor_SlateCore!SCompoundWidget::OnPaint() scompoundwidget.cpp:37 
UE4Editor_Slate!SBorder::OnPaint() sborder.cpp:86 
UE4Editor_SlateCore!SWidget::Paint() swidget.cpp:779 
UE4Editor_SlateCore!SOverlay::OnPaint() soverlay.cpp:102 
UE4Editor_SlateCore!SWidget::Paint() swidget.cpp:779 
UE4Editor_SlateCore!SPanel::PaintArrangedChildren() spanel.cpp:46 
UE4Editor_SlateCore!SPanel::OnPaint() spanel.cpp:21 
UE4Editor_SlateCore!SWidget::Paint() swidget.cpp:779 
UE4Editor_SlateCore!SCompoundWidget::OnPaint() scompoundwidget.cpp:37 
UE4Editor_SlateCore!SWidget::Paint() swidget.cpp:779 
UE4Editor_SlateCore!SPanel::PaintArrangedChildren() spanel.cpp:46 
UE4Editor_Slate!SSplitter::OnPaint() ssplitter.cpp:167 
UE4Editor_SlateCore!SWidget::Paint() swidget.cpp:779 
UE4Editor_SlateCore!SCompoundWidget::OnPaint() scompoundwidget.cpp:37 
UE4Editor_SlateCore!SWidget::Paint() swidget.cpp:779 
UE4Editor_SlateCore!SPanel::PaintArrangedChildren() spanel.cpp:46 
UE4Editor_Slate!SSplitter::OnPaint() ssplitter.cpp:167 
UE4Editor_SlateCore!SWidget::Paint() swidget.cpp:779 
UE4Editor_SlateCore!SCompoundWidget::OnPaint() scompoundwidget.cpp:37 
UE4Editor_SlateCore!SWidget::Paint() swidget.cpp:779 
UE4Editor_SlateCore!SPanel::PaintArrangedChildren() spanel.cpp:46 
UE4Editor_Slate!SSplitter::OnPaint() ssplitter.cpp:167 
UE4Editor_SlateCore!SWidget::Paint() swidget.cpp:779 
UE4Editor_SlateCore!SOverlay::OnPaint() soverlay.cpp:102 
UE4Editor_SlateCore!SWidget::Paint() swidget.cpp:779 
UE4Editor_SlateCore!SCompoundWidget::OnPaint() scompoundwidget.cpp:37 
UE4Editor_SlateCore!SWidget::Paint() swidget.cpp:779 
UE4Editor_SlateCore!SPanel::PaintArrangedChildren() spanel.cpp:46 
UE4Editor_SlateCore!SPanel::OnPaint() spanel.cpp:21 

Have Comments or More Details?

Head over to the existingAnswerHub thread and let us know what's up.

1
Login to Vote

Fixed
ComponentGameplay - AI
Affects Versions4.144.154.16
Target Fix4.17
Fix Commit3497668
Main Commit3510073
CreatedApr 5, 2017
ResolvedJun 18, 2017
UpdatedJun 26, 2017