Description

 

The User has provided an extensive log of their code base setup, and the process leading up to when the Assert occurs.

"Our game mode & player state FSM are setup in a data driven manor using UDataAssets as a base for the relevant classes.

In upgrading from 4.19.2 to 4.21.1 we encountered a problem when these assets are either deserialized, or if they are able to be loaded correctly then the assert will fire at a certain point of editing the data.

To give a quick overview the game mode FSM states and player state FSM state functionality are implemented using our data defined task system (I'll refer to them as GMS and PSS from now on to avoid confused with the native APlayerState). In this system all possible tasks are setup in a tasks enum (separate enums for client vs. server tasks) which is selected in the data. The way that any task parameters are setup is that we have a big struct FOptionalValues which contains FString StringValue, int32 IntValue, bool BoolValue etc. and then only the members relevant to a given task are shown in the data asset editing window. So e.g. there might be EClientTask::FadeOutViewport and then alongside that only FloatValue would be visible which would be used for the fade time.

We also have paired functionality of being able to define in data the conditions for any given task to run e.g. EPredicateCondition::IsLocalPlayerHuman etc.

The problem first occurred the first time we launched the editor after update the engine source to 4.21.1. It occurred on launch because the GameMode Override for the default map contained references to the task data. Loading up a totally empty map allowed us to launch the editor successfully but then for approximately 50% of the PSS assets the assert occurs when loading/opening.

The actual array causing the assert in the data always seems to be one of 2, either the following (-> signifying rhs is a child member of the lhs):

FOptionalValues -> FGenericCachedOwnableIDSourceData -> FLeaderboardData -> TArray<FLeaderboardAttribute>

Or also in the array of conditions in the data like this TArray<FPredicateCondition>. I will include screenshots of the code of both of those structs.

If we cleared the problem data fields in the PSS in 4.19 and then sync'd that to the 4.21 build then they can be opened ok. So then I tried re-saving the asset in 4.21 first and then both pasting in the data and manually recreating it and both resulted in the assert at the moment I added in a task (containing the FOptionalValues struct).

Next I opened one of the assets that the problem doesn't occur for with the intention of seeing if I could author any task data successfully or not I actually found that the assert occurred at the moment of clearing the root TMap member that contained the existing data (that wasn't causing the assert), before even getting the chance to recreate any data.

In the assert it seems like always that the ArrayMax is 32 and the ArrayNum is 33. I would assume in pretty much all cases the array is actually empty.

There are 2 different paths within the data structures for which the assert occurs, you can follow the serialization process down through the callstack to see this

(the lowest level before the assert at the arrays on the right hand side in bold):

  • FOptionalValues (OptionalValues.h) -> GenericCachedOwnableIDSourceData -> LeaderboardData -> Attributes
  • FServerTaskData (TaskClasses.h) -> PlayerInclusionPredicate -> Predicate -> PredicateConditions"*
Steps to Reproduce

1.Build and launch the attached version of project against a stock 4.21.1 engine

BugRepro421ForEpic.zip[Image Removed]

2. In the Content Browser go to Add New -> Miscellaneous -> Data Asset -> PlayerStateDataAsset

3.Open up the newly created data asset

4.Click + to add a new entry to the On EventTMap

5. Expand the new entry and then expand Task List and click + to add a new entry to the Task List Segments array

6.Expand the new entry at index 0 and click + to add a new entry to the Inline Tasks array

7. Expand the new entry at index 0 and click + to add a new entry to the Task Options array

Result: Assert Happens

Expected: Expanding new entry would not cause Assert Crash.

Callstack

LoginId:677a448d48352201d90930b796056d79
EpicAccountId:74cb1785c0a148f0a87ef74601ae977a

Assertion failed: ArrayMax >= ArrayNum [Link Removed] [Line: 2461]

UE4Editor_Core!FDebug::AssertFailed() [d:\build\++ue4\sync\engine\source\runtime\core\private\misc\assertionmacros.cpp:417]
UE4Editor_Core!TArray<FStructuredArchive::FElement,TNonRelocatableInlineAllocator<32> >::ResizeShrink() [d:\build\++ue4\sync\engine\source\runtime\core\public\containers\array.h:2461]
UE4Editor_Core!FStructuredArchive::FRecord::EnterField() [d:\build\++ue4\sync\engine\source\runtime\core\private\serialization\structuredarchive.cpp:448]
UE4Editor_CoreUObject!operator<<() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\propertytag.cpp:114]
UE4Editor_CoreUObject!UArrayProperty::SerializeItem() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\propertyarray.cpp:156]
UE4Editor_CoreUObject!UStruct::SerializeBin() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:885]
UE4Editor_CoreUObject!UScriptStruct::SerializeItem() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:2138]
UE4Editor_CoreUObject!UStructProperty::SerializeItem() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\propertystruct.cpp:130]
UE4Editor_CoreUObject!UStruct::SerializeBin() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:885]
UE4Editor_CoreUObject!UScriptStruct::SerializeItem() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:2138]
UE4Editor_CoreUObject!UStructProperty::SerializeItem() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\propertystruct.cpp:130]
UE4Editor_CoreUObject!UStruct::SerializeBin() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:885]
UE4Editor_CoreUObject!UScriptStruct::SerializeItem() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:2138]
UE4Editor_CoreUObject!UStructProperty::SerializeItem() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\propertystruct.cpp:130]
UE4Editor_CoreUObject!UStruct::SerializeBin() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:885]
UE4Editor_CoreUObject!UScriptStruct::SerializeItem() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:2138]
UE4Editor_CoreUObject!UStructProperty::SerializeItem() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\propertystruct.cpp:130]
UE4Editor_CoreUObject!UStruct::SerializeBin() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:885]
UE4Editor_CoreUObject!UScriptStruct::SerializeItem() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:2138]
UE4Editor_CoreUObject!UStructProperty::SerializeItem() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\propertystruct.cpp:130]
UE4Editor_CoreUObject!UArrayProperty::SerializeItem() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\propertyarray.cpp:218]
UE4Editor_CoreUObject!UStruct::SerializeBin() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:885]
UE4Editor_CoreUObject!UScriptStruct::SerializeItem() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:2138]
UE4Editor_CoreUObject!UStructProperty::SerializeItem() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\propertystruct.cpp:130]
UE4Editor_CoreUObject!UArrayProperty::SerializeItem() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\propertyarray.cpp:218]
UE4Editor_CoreUObject!UStruct::SerializeBin() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:885]
UE4Editor_CoreUObject!UScriptStruct::SerializeItem() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:2138]
UE4Editor_CoreUObject!UStructProperty::SerializeItem() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\propertystruct.cpp:130]
UE4Editor_CoreUObject!UArrayProperty::SerializeItem() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\propertyarray.cpp:218]
UE4Editor_CoreUObject!UStruct::SerializeBin() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:885]
UE4Editor_CoreUObject!UScriptStruct::SerializeItem() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:2138]
UE4Editor_CoreUObject!UStructProperty::SerializeItem() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\propertystruct.cpp:130]
UE4Editor_CoreUObject!UStruct::SerializeBin() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:885]
UE4Editor_CoreUObject!UScriptStruct::SerializeItem() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:2138]
UE4Editor_CoreUObject!UStructProperty::SerializeItem() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\propertystruct.cpp:130]
UE4Editor_CoreUObject!UMapProperty::SerializeItem() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\propertymap.cpp:437]
UE4Editor_CoreUObject!UStruct::SerializeBin() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:885]
UE4Editor_CoreUObject!UObject::SerializeScriptProperties() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\obj.cpp:1382]
UE4Editor_CoreUObject!UObject::Serialize() [d:\build\++ue4\sync\engine\source\runtime\coreuobject\private\uobject\obj.cpp:1288]
UE4Editor_Engine!UDataAsset::Serialize() [d:\build\++ue4\sync\engine\source\runtime\engine\private\dataasset.cpp:19]
UE4Editor_Engine!UDataAsset::Serialize() [d:\build\++ue4\sync\engine\intermediate\build\win64\ue4editor\inc\engine\dataasset.gen.cpp:95]
UE4Editor_UnrealEd!FTransaction::FObjectRecord::SerializeObject() [d:\build\++ue4\sync\engine\source\editor\unrealed\private\editortransaction.cpp:182]
UE4Editor_UnrealEd!FTransaction::FObjectRecord::Finalize() [d:\build\++ue4\sync\engine\source\editor\unrealed\private\editortransaction.cpp:278]
UE4Editor_UnrealEd!FTransaction::Finalize() [d:\build\++ue4\sync\engine\source\editor\unrealed\private\editortransaction.cpp:906]
UE4Editor_UnrealEd!UTransBuffer::End() [d:\build\++ue4\sync\engine\source\editor\unrealed\private\editortransaction.cpp:1078]
UE4Editor_UnrealEd!FScopedTransaction::~FScopedTransaction() [d:\build\++ue4\sync\engine\source\editor\unrealed\private\scopedtransaction.cpp:37]
UE4Editor_PropertyEditor!FPropertyValueImpl::AddChild() [d:\build\++ue4\sync\engine\source\editor\propertyeditor\private\propertyhandleimpl.cpp:1151]
UE4Editor_PropertyEditor!FPropertyHandleArray::AddItem() [d:\build\++ue4\sync\engine\source\editor\propertyeditor\private\propertyhandleimpl.cpp:4250]
UE4Editor_PropertyEditor!FPropertyEditor::OnAddItem() [d:\build\++ue4\sync\engine\source\editor\propertyeditor\private\presentation\propertyeditor\propertyeditor.cpp:221]
UE4Editor_PropertyEditor!TBaseSPMethodDelegateInstance<0,FPropertyEditor,0,void __cdecl(void)>::ExecuteIfSafe() [d:\build\++ue4\sync\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:355]
UE4Editor_PropertyEditor!SDetailsViewBase::Tick() [d:\build\++ue4\sync\engine\source\editor\propertyeditor\private\sdetailsviewbase.cpp:702]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:1003]
UE4Editor_SlateCore!SCompoundWidget::OnPaint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:35]
UE4Editor_Slate!SBorder::OnPaint() [d:\build\++ue4\sync\engine\source\runtime\slate\private\widgets\layout\sborder.cpp:87]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:1037]
UE4Editor_SlateCore!SOverlay::OnPaint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\soverlay.cpp:95]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:1037]
UE4Editor_SlateCore!SPanel::PaintArrangedChildren() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:31]
UE4Editor_SlateCore!SPanel::OnPaint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:12]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:1037]
UE4Editor_SlateCore!SCompoundWidget::OnPaint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:35]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:1037]
UE4Editor_SlateCore!SPanel::PaintArrangedChildren() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:31]
UE4Editor_Slate!SSplitter::OnPaint() [d:\build\++ue4\sync\engine\source\runtime\slate\private\widgets\layout\ssplitter.cpp:164]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:1037]
UE4Editor_SlateCore!SOverlay::OnPaint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\soverlay.cpp:95]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:1037]
UE4Editor_SlateCore!SCompoundWidget::OnPaint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:35]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:1037]
UE4Editor_SlateCore!SPanel::PaintArrangedChildren() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:31]
UE4Editor_SlateCore!SPanel::OnPaint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:12]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:1037]
UE4Editor_SlateCore!SCompoundWidget::OnPaint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:35]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:1037]
UE4Editor_SlateCore!SCompoundWidget::OnPaint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:35]
UE4Editor_Slate!SBorder::OnPaint() [d:\build\++ue4\sync\engine\source\runtime\slate\private\widgets\layout\sborder.cpp:87]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:1037]
UE4Editor_SlateCore!SOverlay::OnPaint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\soverlay.cpp:95]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:1037]
UE4Editor_SlateCore!SPanel::PaintArrangedChildren() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:31]
UE4Editor_SlateCore!SPanel::OnPaint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:12]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:1037]
UE4Editor_SlateCore!SCompoundWidget::OnPaint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:35]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:1037]
UE4Editor_SlateCore!SPanel::PaintArrangedChildren() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:31]
UE4Editor_Slate!SSplitter::OnPaint() [d:\build\++ue4\sync\engine\source\runtime\slate\private\widgets\layout\ssplitter.cpp:164]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:1037]
UE4Editor_SlateCore!SOverlay::OnPaint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\soverlay.cpp:95]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:1037]
UE4Editor_SlateCore!SCompoundWidget::OnPaint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:35]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:1037]
UE4Editor_SlateCore!SPanel::PaintArrangedChildren() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:31]
UE4Editor_SlateCore!SPanel::OnPaint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:12]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:1037]
UE4Editor_SlateCore!SPanel::PaintArrangedChildren() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:31]
UE4Editor_SlateCore!SPanel::OnPaint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\spanel.cpp:12]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:1037]
UE4Editor_SlateCore!SOverlay::OnPaint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\soverlay.cpp:95]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:1037]
UE4Editor_SlateCore!SCompoundWidget::OnPaint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\scompoundwidget.cpp:35]
UE4Editor_SlateCore!SWindow::OnPaint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\swindow.cpp:1927]
UE4Editor_SlateCore!SWidget::Paint() [d:\build\++ue4\sync\engine\source\runtime\slatecore\private\widgets\swidget.cpp:1037]
UE4Editor_Slate!FSlateApplication::DrawWindowAndChildren() [d:\build\++ue4\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1322]
UE4Editor_Slate!FSlateApplication::DrawWindowAndChildren() [d:\build\++ue4\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1421]
UE4Editor_Slate!FSlateApplication::PrivateDrawWindows() [d:\build\++ue4\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1577]
UE4Editor_Slate!FSlateApplication::DrawWindows() [d:\build\++ue4\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1279]
UE4Editor_Slate!FSlateApplication::TickApplication() [d:\build\++ue4\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1862]
UE4Editor_Slate!FSlateApplication::Tick() [d:\build\++ue4\sync\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1693]
UE4Editor!FEngineLoop::Tick() [d:\build\++ue4\sync\engine\source\runtime\launch\private\launchengineloop.cpp:3799]
UE4Editor!GuardedMain() [d:\build\++ue4\sync\engine\source\runtime\launch\private\launch.cpp:174]
UE4Editor!GuardedMainWrapper() [d:\build\++ue4\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:145]
UE4Editor!WinMain() [d:\build\++ue4\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:276]
UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:283]
kernel32
ntdll

Have Comments or More Details?

There's no existing public thread on this issue, so head over toAnswerHub just mention UE-69712 in the post.

2
Login to Vote

Fixed
ComponentCore
Affects Versions4.214.22
Target Fix4.22
Fix Commit4996962
Main Commit4997162
Release Commit4996962
CreatedFeb 7, 2019
ResolvedFeb 14, 2019
UpdatedFeb 14, 2019