This code worked until UE5.4.
NaniteResource added in 5.5 causes this issue.
void AYourClass::DuplicateSkeletalMesh(USkeletalMesh* Asset) { USkeletalMesh* NewSkeletalMeshDuplicated = Cast<USkeletalMesh>(DuplicateObject<USkeletalMesh>(Asset, nullptr)); }
Another way to reproduce
The game crashes with the error:
Fatal error: [File:D:\dev\UnrealEngine-5.5.2\Engine\Source\Runtime\CoreUObject\Private\Serialization\DuplicateDataReader.cpp] [Line: 44]
FDuplicateDataReader Overread. SerializedObject = SkeletalMesh /Engine/Transient.SKM_Manny SerializedProperty = none
[Inline Frame] DupSkeletalMesh.exe!UE::Logging::Private::BasicFatalLog::__l2::<lambda>() Line 1103 C++
DupSkeletalMesh.exe!UE::Logging::Private::BasicFatalLog(const FLogCategoryBase & Category, const UE::Logging::Private::FStaticBasicLogRecord * Log, ...) Line 1103 C++
[Inline Frame] DupSkeletalMesh.exe!FDuplicateDataReader::SerializeFail() Line 44 C++
DupSkeletalMesh.exe!FDuplicateDataReader::Serialize(void * Data, __int64 Num) Line 46 C++
[Inline Frame] DupSkeletalMesh.exe!FArchive::ByteOrderSerialize(unsigned short &) Line 2050 C++
[Inline Frame] DupSkeletalMesh.exe!operator<<(FArchive & Value, unsigned short &) Line 1383 C++
DupSkeletalMesh.exe!Nanite::FResources::SerializeInternal(FArchive & Ar, UObject * Owner, bool bCooked) Line 291 C++
DupSkeletalMesh.exe!Nanite::FResources::Serialize(FArchive & Ar, UObject * Owner, bool bCooked) Line 252 C++
DupSkeletalMesh.exe!FSkeletalMeshRenderData::Serialize(FArchive & Ar, USkinnedAsset * Owner) Line 601 C++
DupSkeletalMesh.exe!USkeletalMesh::Serialize(FArchive & Ar) Line 1887 C++
DupSkeletalMesh.exe!StaticDuplicateObjectEx(FObjectDuplicationParameters & Parameters) Line 3152 C++
DupSkeletalMesh.exe!StaticDuplicateObject(const UObject * SourceObject, UObject * DestOuter, const FName DestName, EObjectFlags FlagMask, UClass * DestClass, EDuplicateMode::Type DuplicateMode, EInternalObjectFlags InternalFlagsMask) Line 3015 C++
DupSkeletalMesh.exe!DuplicateObject_Internal(UClass * Class, const UObject * SourceObject, UObject * Outer, const FName Name) Line 4486 C++
[Inline Frame] DupSkeletalMesh.exe!DuplicateObject(const USkeletalMesh *) Line 1857 C++
DupSkeletalMesh.exe!ADupSkeletalMeshGameMode::DuplicateSkeletalMesh(USkeletalMesh * Asset) Line 13 C++
DupSkeletalMesh.exe!ADupSkeletalMeshGameMode::execDuplicateSkeletalMesh(UObject * Context, FFrame & Stack, void * const Z_Param__Result) Line 61 C++
DupSkeletalMesh.exe!UFunction::Invoke(UObject * Obj, FFrame & Stack, void * const Z_Param__Result) Line 7193 C++
DupSkeletalMesh.exe!UObject::CallFunction(FFrame & Stack, void * const Z_Param__Result, UFunction * Function) Line 1148 C++
[Inline Frame] DupSkeletalMesh.exe!FFrame::Step(UObject *) Line 482 C++
DupSkeletalMesh.exe!UObject::ProcessContextOpcode(FFrame & Stack, void * const Z_Param__Result, bool bCanFailSilently) Line 3117 C++
[Inline Frame] DupSkeletalMesh.exe!FFrame::Step(UObject *) Line 482 C++
DupSkeletalMesh.exe!ProcessLocalScriptFunction(UObject * Context, FFrame & Stack, void * const Z_Param__Result) Line 1214 C++
DupSkeletalMesh.exe!ProcessScriptFunction<void (_cdecl*)(UObject *,FFrame &,void *)>(UObject * Context, UFunction * Function, FFrame & Stack, void * const Z_Param_Result, void[Image Removed](UObject *, FFrame &, void *) ExecFtor) Line 1043 C++
DupSkeletalMesh.exe!ProcessLocalFunction::__l2::<lambda>() Line 1288 C++
DupSkeletalMesh.exe!ProcessLocalFunction(UObject * Context, UFunction * Fn, FFrame & Stack, void * const Z_Param__Result) Line 1304 C++
[Inline Frame] DupSkeletalMesh.exe!FFrame::Step(UObject *) Line 482 C++
DupSkeletalMesh.exe!ProcessLocalScriptFunction(UObject * Context, FFrame & Stack, void * const Z_Param__Result) Line 1214 C++
DupSkeletalMesh.exe!UObject::ProcessInternal(UObject * Context, FFrame & Stack, void * const Z_Param__Result) Line 1329 C++
DupSkeletalMesh.exe!UFunction::Invoke(UObject * Obj, FFrame & Stack, void * const Z_Param__Result) Line 7193 C++
DupSkeletalMesh.exe!UObject::ProcessEvent(UFunction * Function, void * Parms) Line 2175 C++
DupSkeletalMesh.exe!AActor::ProcessEvent(UFunction * Function, void * Parameters) Line 1160 C++
DupSkeletalMesh.exe!TScriptDelegate<FNotThreadSafeDelegateMode>::ProcessDelegate<UObject>(void * Parameters) Line 449 C++
DupSkeletalMesh.exe!FInputActionHandlerDynamicSignature_DelegateWrapper(const TScriptDelegate<FNotThreadSafeDelegateMode> & InputActionHandlerDynamicSignature, FKey Key) Line 74 C++
[Inline Frame] DupSkeletalMesh.exe!FInputActionHandlerDynamicSignature::Execute(FKey) Line 127 C++
DupSkeletalMesh.exe!FInputActionUnifiedDelegate::Execute(const FKey Key) Line 302 C++
DupSkeletalMesh.exe!UPlayerInput::EvaluateInputDelegates(const TArray<UInputComponent *,TSizedDefaultAllocator<32>> & InputComponentStack, const float DeltaTime, const bool bGamePaused, const TArray<TTuple<FKey,FKeyState *>,TSizedDefaultAllocator<32>> & KeysWithEvents) Line 1549 C++
DupSkeletalMesh.exe!UEnhancedPlayerInput::EvaluateInputDelegates(const TArray<UInputComponent *,TSizedDefaultAllocator<32>> & InputComponentStack, const float DeltaTime, const bool bGamePaused, const TArray<TTuple<FKey,FKeyState *>,TSizedDefaultAllocator<32>> & KeysWithEvents) Line 776 C++
DupSkeletalMesh.exe!UPlayerInput::ProcessInputStack(const TArray<UInputComponent *,TSizedDefaultAllocator<32>> & InputComponentStack, const float DeltaTime, const bool bGamePaused) Line 1174 C++
DupSkeletalMesh.exe!APlayerController::ProcessPlayerInput(const float DeltaTime, const bool bGamePaused) Line 2777 C++
DupSkeletalMesh.exe!APlayerController::TickPlayerInput(const float DeltaSeconds, const bool bGamePaused) Line 5124 C++
DupSkeletalMesh.exe!APlayerController::PlayerTick(float DeltaTime) Line 2380 C++
DupSkeletalMesh.exe!APlayerController::TickActor(float DeltaSeconds, ELevelTick TickType, FActorTickFunction & ThisTickFunction) Line 5277 C++
DupSkeletalMesh.exe!FActorTickFunction::ExecuteTick(float DeltaTime, ELevelTick TickType, ENamedThreads::Type CurrentThread, const TRefCountPtr<FBaseGraphTask> & MyCompletionGraphEvent) Line 285 C++
DupSkeletalMesh.exe!FTickFunctionTask::DoTask(ENamedThreads::Type CurrentThread, const TRefCountPtr<FBaseGraphTask> & MyCompletionGraphEvent) Line 307 C++
DupSkeletalMesh.exe!TGraphTask<FTickFunctionTask>::ExecuteTask() Line 636 C++
[Inline Frame] DupSkeletalMesh.exe!UE::Trace::FChannel::operator|(const UE::Trace::FChannel &) Line 29 C++
[Inline Frame] DupSkeletalMesh.exe!TaskTrace::FTaskTimingEventScope::
(unsigned __int64) Line 301 C++
DupSkeletalMesh.exe!UE::Tasks::Private::FTaskBase::TryExecuteTask() Line 505 C++
[Inline Frame] DupSkeletalMesh.exe!FBaseGraphTask::Execute(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> &) Line 482 C++
DupSkeletalMesh.exe!FNamedTaskThread::ProcessTasksNamedThread(int QueueIndex, bool bAllowStall) Line 779 C++
DupSkeletalMesh.exe!FNamedTaskThread::ProcessTasksUntilQuit(int QueueIndex) Line 668 C++
[Inline Frame] DupSkeletalMesh.exe!FTaskGraphCompatibilityImplementation::ProcessThreadUntilRequestReturn(ENamedThreads::Type) Line 1453 C++
DupSkeletalMesh.exe!FTaskGraphCompatibilityImplementation::WaitUntilTasksComplete(const TArray<TRefCountPtr<FBaseGraphTask>,TSizedInlineAllocator<4,32,TSizedDefaultAllocator<32>>> & Tasks, ENamedThreads::Type CurrentThreadIfKnown) Line 1526 C++
DupSkeletalMesh.exe!FTickTaskSequencer::ReleaseTickGroup(ETickingGroup WorldTickGroup, bool bBlockTillComplete) Line 815 C++
DupSkeletalMesh.exe!FTickTaskManager::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 1866 C++
DupSkeletalMesh.exe!UWorld::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 774 C++
DupSkeletalMesh.exe!UWorld::Tick(ELevelTick TickType, float DeltaSeconds) Line 1497 C++
DupSkeletalMesh.exe!UGameEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 1784 C++
DupSkeletalMesh.exe!FEngineLoop::Tick() Line 5877 C++
[Inline Frame] DupSkeletalMesh.exe!EngineTick() Line 69 C++
DupSkeletalMesh.exe!GuardedMain(const wchar_t * CmdLine) Line 188 C++
DupSkeletalMesh.exe!GuardedMainWrapper(const wchar_t * CmdLine) Line 123 C++
DupSkeletalMesh.exe!LaunchWindowsStartup(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow, const wchar_t * CmdLine) Line 277 C++
DupSkeletalMesh.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * pCmdLine, int nCmdShow) Line 318 C++
[Inline Frame] DupSkeletalMesh.exe!invoke_main() Line 102 C++
DupSkeletalMesh.exe!__scrt_common_main_seh() Line 288 C++
kernel32.dll!00007ffee67f7374() Unknown
ntdll.dll!00007ffee793cc91() Unknown
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-254879 in the post.
0 |
Component | UE - Graphics Features - Nanite |
---|---|
Affects Versions | 5.5 |
Target Fix | 5.6 |
Created | Mar 11, 2025 |
---|---|
Updated | Mar 12, 2025 |