GiM-GamesInMotion / gFurPro

Shell based fur plugin for Unreal Engine 5
https://gim.studio/animalia/animalia/
Other
89 stars 34 forks source link

SourceSection not filled in UE 5.4.4 => Crash #36

Open soma-web opened 2 months ago

soma-web commented 2 months ago

I added some Logs for debugging and do get the following Error: LogTemp: Error: SourceSection.FirstIndex + i >= SourceIndicesSize BP_PaintPanel_C_15

FurStaticData.cpp (Line 650 following)

        else
                {           
                    for (uint32 i = 0; i < SourceSection.NumTriangles * 3; ++i)
                    {
                        const uint32 SourceIndicesSize = SourceIndices.Num();
                        if((SourceSection.FirstIndex + i) >= SourceIndicesSize)
                        {
                            UE_LOG(LogTemp, Error, TEXT("SourceSection.FirstIndex + i >= SourceIndicesSize %s"), *Parent->GetName());
                            continue;
                        }
                        const uint32 IndicesSize = Indices.Num();
                        const uint32 Index = Idx++;
                        if(Index >= IndicesSize)
                        {
                            UE_LOG(LogTemp, Error, TEXT("Idx >= IndicesSize %s"), *Parent->GetName());
                            continue;
                        }
                        Indices[Index] = SourceIndices[SourceSection.FirstIndex + i] + VertexIndexOffset;
                    }
                }
soma-web commented 2 months ago

Ok figured it out. Static mesh was not allowed to be accessed by the CPU, maybe try to catch that and print a error log?

soma-web commented 2 months ago

Stack:

 Error: === Critical error: ===
[2024.09.05-05.56.25:256][399]LogWindows: Error: 
[2024.09.05-05.56.25:256][399]LogWindows: Error: Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:E:\UE_5.4\Engine\Source\Runtime\Core\Public\Containers\Array.h] [Line: 758] 
[2024.09.05-05.56.25:256][399]LogWindows: Error: Array index out of bounds: 0 into an array of size 0
[2024.09.05-05.56.25:256][399]LogWindows: Error: 
[2024.09.05-05.56.25:256][399]LogWindows: Error: 
[2024.09.05-05.56.25:256][399]LogWindows: Error: [Callstack] 0x00007ff7a526007b ChromaGun2.exe!FFurStaticData::BuildFur<0,0>() [E:\my_worker\BuildAndCook\refs\pull\3465\merge\Plugins\GFur\Source\GFur\Private\FurStaticData.cpp:658]
[2024.09.05-05.56.25:256][399]LogWindows: Error: [Callstack] 0x00007ff7a52a679c ChromaGun2.exe!FFurStaticData::BuildFur() [E:\my_worker\BuildAndCook\refs\pull\3465\merge\Plugins\GFur\Source\GFur\Private\FurStaticData.cpp:549]
[2024.09.05-05.56.25:256][399]LogWindows: Error: [Callstack] 0x00007ff7a52a94cd ChromaGun2.exe!FFurStaticData::CreateFurData() [E:\my_worker\BuildAndCook\refs\pull\3465\merge\Plugins\GFur\Source\GFur\Private\FurStaticData.cpp:365]
[2024.09.05-05.56.25:256][399]LogWindows: Error: [Callstack] 0x00007ff7a52ab15d ChromaGun2.exe!UGFurComponent::CreateSceneProxy() [E:\my_worker\BuildAndCook\refs\pull\3465\merge\Plugins\GFur\Source\GFur\Private\FurComponent.cpp:720]
[2024.09.05-05.56.25:256][399]LogWindows: Error: [Callstack] 0x00007ff79ec0c104 ChromaGun2.exe!FActorPrimitiveComponentInterface::CreateSceneProxy() []
[2024.09.05-05.56.25:256][399]LogWindows: Error: [Callstack] 0x00007ff79c9a5511 ChromaGun2.exe!FScene::BatchAddPrimitivesInternal<UPrimitiveComponent>() []
[2024.09.05-05.56.25:256][399]LogWindows: Error: [Callstack] 0x00007ff79c9f5d29 ChromaGun2.exe!FScene::AddPrimitive() []
[2024.09.05-05.56.25:256][399]LogWindows: Error: [Callstack] 0x00007ff79eaeb5a1 ChromaGun2.exe!TActorIteratorBase<TActorIterator<APawn> >::operator++() []
[2024.09.05-05.56.25:256][399]LogWindows: Error: [Callstack] 0x00007ff7991d5692 ChromaGun2.exe!`ParallelForImpl::ParallelForInternal<TFunctionRef<void __cdecl(int)>,`ParallelFor'::`2'::<lambda_1>,std::nullptr_t>'::`2'::FParallelExecutor::operator()() []
[2024.09.05-05.56.25:256][399]LogWindows: Error: [Callstack] 0x00007ff7991e07c1 ChromaGun2.exe!LowLevelTasks::TTaskDelegate<LowLevelTasks::FTask * __ptr64 __cdecl(bool),48>::TTaskDelegateImpl<`LowLevelTasks::FTask::Init<`ParallelForImpl::ParallelForInternal<TFunctionRef<void __cdecl(int)>,`ParallelFor'::`2'::<lambda_1>,std::nullptr_t>'::`2'::FParallelExecutor>'::`13'::<lambda_1>,0>::CallAndMove() []
[2024.09.05-05.56.25:256][399]LogWindows: Error: [Callstack] 0x00007ff798bed40e ChromaGun2.exe!LowLevelTasks::FTask::ExecuteTask() []
[2024.09.05-05.56.25:256][399]LogWindows: Error: [Callstack] 0x00007ff798bed18b ChromaGun2.exe!LowLevelTasks::FScheduler::ExecuteTask() []
[2024.09.05-05.56.25:256][399]LogWindows: Error: [Callstack] 0x00007ff798c12fa5 ChromaGun2.exe!LowLevelTasks::FScheduler::WorkerMain() []
[2024.09.05-05.56.25:256][399]LogWindows: Error: [Callstack] 0x00007ff798bdd3f0 ChromaGun2.exe!UE::CompressedBuffer::Private::FHeader::CalculateCrc32() []
[2024.09.05-05.56.25:257][399]LogWindows: Error: [Callstack] 0x00007ff798dd3d53 ChromaGun2.exe!FThreadImpl::Run() []
[2024.09.05-05.56.25:257][399]LogWindows: Error: [Callstack] 0x00007ff7991fb478 ChromaGun2.exe!FRunnableThreadWin::Run() []
[2024.09.05-05.56.25:257][399]LogWindows: Error: [Callstack] 0x00007ff7991eefc7 ChromaGun2.exe!FRunnableThreadWin::GuardedRun() []
[2024.09.05-05.56.25:257][399]LogWindows: Error: [Callstack] 0x00007ffb62197374 KERNEL32.DLL!UnknownFunction []
[2024.09.05-05.56.25:257][399]LogWindows: Error: 
[2024.09.05-05.56.25:257][399]LogWindows: Error: Crash in runnable thread Background Worker #10