Platform
Windows 11 (25H2) [10.0.26200.8037] (x86_64)
Hardware
-
CPU: Intel(R) Core™ Ultra 7 265 (2.40 GHz)
-
RAM: 64.0 GB
Engine Version
5.7.4-51494982+++UE5+Release-5.7
Project Type
C++
Repro Rate
Always (100%)
Description
Using FInstancedStruct or properties with EditConditionHides inside a USTRUCT that derives from FTableRowBase can cause the DataTable editor to crash when interacting with array elements under specific conditions.
The crash is preceded by the following error message:
“Pure virtual function being called while application is running (GIsRunning == 1)”
Steps to Reproduce – Case 1 (FInstancedStruct)
-
Define a
TArray<USTRUCT>inside a struct derived fromFTableRowBase -
Inside that
USTRUCT, include anFInstancedStructfield -
Create a DataTable based on this struct
-
Add a new row
-
Add an element to the array property in that row
-
Click on an empty area to clear the row editor panel below
-
Click the row again
Result:
The error message appears, followed by an engine crash
Steps to Reproduce – Case 2 (EditConditionHides)
-
Define a
TArray<USTRUCT>inside a struct derived fromFTableRowBase -
Inside that
USTRUCT, use properties withEditConditionHides -
Create a DataTable based on this struct
-
Add a new row
-
Add an element to the array property in that row
-
Click on an empty area to clear the row editor panel below
-
Click the row again
Result:
The error message appears, followed by an engine crash
Call Stack
LoginId:5645487c413debb9e6fe23a5431efea2
EpicAccountId:aa8befdb93eb46ec9c7ce771c956ed65
Fatal error: [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsPlatformMisc.cpp] [Line: 774]
Pure virtual function being called
VCRUNTIME140
UnrealEditor_PropertyEditor
UnrealEditor_PropertyEditor
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_Slate
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_Slate
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_Slate
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_Slate
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_Slate
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_Slate
UnrealEditor_Slate
UnrealEditor_Slate
UnrealEditor_Slate
UnrealEditor_Slate
UnrealEditor_Slate
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
kernel32
ntdll
Reproducible Project
or copy follow code:
#pragma once
#include "CoreMinimal.h"
#include "Engine/DataTable.h"
#include "StructUtils/InstancedStruct.h"
#include "TestTableRow.generated.h"
UENUM(BlueprintType)
enum class EUnitEffectType : uint8
{
AttributeModifier,
MechanicEffect,
};
USTRUCT(BlueprintType)
struct INSSTRUCTTEST_API FOTAttributeModifier
{
GENERATED_BODY()
FOTAttributeModifier()
{}
};
USTRUCT(BlueprintType)
struct INSSTRUCTTEST_API FUnitEffectEntry
{
GENERATED_BODY()
FUnitEffectEntry()
: EffectType(EUnitEffectType::AttributeModifier), AttributeModifier(0)
{
}
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UnitEffect")
EUnitEffectType EffectType;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UnitEffect",
meta = (EditCondition = "EffectType == EUnitEffectType::AttributeModifier", EditConditionHides))
float AttributeModifier;
};
USTRUCT(BlueprintType)
struct INSSTRUCTTEST_API FUnitSpatialRuleEntry
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UnitSpatialRule")
FInstancedStruct RuleParams;
};
USTRUCT(BlueprintType)
struct INSSTRUCTTEST_API FTestTableRow : public FTableRowBase
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "UnitDef|Effects")
TArray<FUnitEffectEntry> Effects;
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "UnitDef|SpatialRules")
TArray<FUnitSpatialRuleEntry> SpatialRules;
};