No idea what’s causing this to happen when loading into another level. I haven’t touched any code in the project, everything is done by blueprints. The crash only happens in packaged build of the game, not in editor and is inconsistent. Sometimes the level loads just fine, sometimes it crashes. I have been trying to look around but all the solutions seem to be c++ stuff. The game is a single player game.
Level loading is done by Open Level by name. Crash happens entering and exiting empty levels aswell.
Ok, maybe you have a variable or function with the same name that uses a windows library in a task… that happened to me once… it’s a horrible conflict that Epic should solve…
Try changing the name of your variables and functions, maybe that works.
Thankfully the project is at it’s early stages and the blueprints are still pretty simple. I went through all the variables and functions as you suggested, renamed anything that could be even remotely close to something that might exist already but I’m still having the same crash.
According to the log files, the level loads fine, after that there’s always the same “Pure virtual function being called” and nothing relevant after that
I have looked around to see if anyone has anything even remotely close to my problem but doesn’t seem like it. At the moment for some reason completely wiping the foliage might seem to fix the issue
False alarm, still crashes without any foliage. Crash is just random and sometimes doesn’t happen. Project was started in 5.2 and only 5.2 has been used.
All meshes and assets are made and there’s nothing complicated in the project. Everything works just fine in the editor.
Package smaller versions of the game and then move on from there to include more content in the packaged build to narrow down what is causing the problem.
The crash is not present in the editor, everything works as intended.
Attaching Visual Studio to the packaged executable gives me:
Call Stack:
> Project-Win64-DebugGame.exe!UE::Logging::Private::BasicFatalLog(struct FLogCategoryBase const &,struct UE::Logging::Private::FStaticBasicLogRecord const *,...) C++
vcruntime140.dll!00007ffda81d6ea4() Unknown
Project-Win64-DebugGame.exe!UE::Shader::FPreshaderData::EvaluateConstant(class FMaterial const &,class UE::Shader::FPreshaderStack &) C++
Project-Win64-DebugGame.exe!UE::Shader::EvaluatePreshader(class FUniformExpressionSet const *,struct FMaterialRenderContext const &,class UE::Shader::FPreshaderStack &,struct UE::Shader::FPreshaderDataContext &) C++
Project-Win64-DebugGame.exe!FUniformExpressionSet::FillUniformBuffer(struct FMaterialRenderContext const &,class TArrayView<class IAllocatedVirtualTexture * const,int>,struct FRHIUniformBufferLayout const *,unsigned char *,int) C++
Project-Win64-DebugGame.exe!<lambda_24175183c3d77fddc597a772f63b6989>::operator()(void) C++
Project-Win64-DebugGame.exe!TGraphTask<class TFunctionGraphTaskImpl<void ,0> >::ExecuteTask(class TArray<class FBaseGraphTask *,class TSizedDefaultAllocator<32> > &,enum ENamedThreads::Type,bool) C++
Project-Win64-DebugGame.exe!<lambda_17c904c32264d0348d15245fba0e1bff>::operator()(bool) C++
Project-Win64-DebugGame.exe!LowLevelTasks::TTaskDelegate<class LowLevelTasks::FTask * ,48>::TTaskDelegateImpl<class <lambda_17c904c32264d0348d15245fba0e1bff>,0>::CallAndMove(class LowLevelTasks::TTaskDelegate<class LowLevelTasks::FTask * ,48> &,void *,unsigned int,bool) C++
Project-Win64-DebugGame.exe!LowLevelTasks::FTask::ExecuteTask(void) C++
Project-Win64-DebugGame.exe!LowLevelTasks::FScheduler::ExecuteTask(class LowLevelTasks::FTask * &) C++
Project-Win64-DebugGame.exe!LowLevelTasks::FScheduler::TryExecuteTaskFrom<class LowLevelTasks::TLocalQueueRegistry<1024>::TLocalQueue,&LowLevelTasks::TLocalQueueRegistry<1024>::TLocalQueue::DequeueGlobal(bool,bool),0>(class LowLevelTasks::TLocalQueueRegistry<1024>::TLocalQueue *,class LowLevelTasks::TLocalQueueRegistry<1024>::FOutOfWork &,bool,bool) C++
Project-Win64-DebugGame.exe!LowLevelTasks::FScheduler::WorkerMain(struct LowLevelTasks::FSleepEvent *,class LowLevelTasks::TLocalQueueRegistry<1024>::TLocalQueue *,unsigned int,bool) C++
Project-Win64-DebugGame.exe!UE::Core::Private::Function::TFunctionRefCaller<class <lambda_3277f5600efe2aa6f5f67d459ec105a9>,unsigned __int64 >::Call(void *,unsigned __int64 &) C++
Project-Win64-DebugGame.exe!FThreadImpl::Run(void) C++
Project-Win64-DebugGame.exe!FRunnableThreadWin::Run(void) C++
Project-Win64-DebugGame.exe!FRunnableThreadWin::GuardedRun(void) C++
kernel32.dll!00007ffdb48055a0() Unknown
ntdll.dll!00007ffdb49e485b() Unknown
and
Output:
[2023.06.17-16.08.59:861][609]LogWorld: Bringing World /Game/DEBUG_3.DEBUG_3 up for play (max tick rate 0) at 2023.06.17-19.08.59
[2023.06.17-16.08.59:862][609]LogWorld: Bringing up level for play took: 0.023394
[2023.06.17-16.08.59:865][609]LogLoad: Took 0.143870 seconds to LoadMap(/Game/DEBUG_3)
[2023.06.17-16.08.59:920][611]LogRHI: Display: Encountered a new graphics PSO: 4147800097
[2023.06.17-16.08.59:920][611]LogRHI: Display: Encountered a new graphics PSO: 2340842033
[2023.06.17-16.08.59:920][611]LogRHI: Display: Encountered a new graphics PSO: 924197942
[2023.06.17-16.08.59:921][611]LogRHI: Display: Encountered a new graphics PSO: 1576252887
[2023.06.17-16.08.59:921][611]LogRHI: Display: Encountered a new graphics PSO: 932699947
[2023.06.17-16.08.59:922][611]LogRHI: Display: Encountered a new compute PSO: 3984833839
[2023.06.17-16.08.59:922][611]LogRHI: Display: Encountered a new graphics PSO: 913897655
[2023.06.17-16.08.59:922][611]LogRHI: Display: Encountered a new compute PSO: 1457830336
[2023.06.17-16.08.59:923][611]LogRHI: Display: Encountered a new graphics PSO: 4049245355
[2023.06.17-16.08.59:923][611]LogRHI: Display: Encountered a new graphics PSO: 120230079
[2023.06.17-16.08.59:924][611]LogRHI: Display: Encountered a new graphics PSO: 1641589182
[2023.06.17-16.08.59:926][611]LogRHI: Display: Encountered a new graphics PSO: 445968875
[2023.06.17-16.08.59:926][611]LogRHI: Display: Encountered a new graphics PSO: 4066546391
[2023.06.17-16.08.59:926][611]LogRHI: Display: Encountered a new graphics PSO: 3603674760
[2023.06.17-16.08.59:927][611]LogRHI: Display: Encountered a new graphics PSO: 4275177059
[2023.06.17-16.08.59:928][611]LogRHI: Display: Encountered a new graphics PSO: 2697711503
[2023.06.17-16.08.59:930][611]LogRHI: Display: Encountered a new graphics PSO: 1864617830
[2023.06.17-16.08.59:931][611]LogRHI: Display: Encountered a new graphics PSO: 4212943507
[2023.06.17-16.08.59:931][611]LogRHI: Display: Encountered a new graphics PSO: 505293139
[2023.06.17-16.08.59:932][611]LogRHI: Display: Encountered a new graphics PSO: 2106081846
[2023.06.17-16.08.59:933][611]LogRHI: Display: Encountered a new graphics PSO: 1930006354
[2023.06.17-16.08.59:933][611]LogRHI: Display: Encountered a new graphics PSO: 4187165178
[2023.06.17-16.08.59:934][611]LogRHI: Display: Encountered a new graphics PSO: 1177132347
[2023.06.17-16.08.59:939][611]LogRHI: Display: Encountered a new graphics PSO: 826057856
[2023.06.17-16.08.59:939][611]LogRHI: Display: Encountered a new graphics PSO: 3128072576
[2023.06.17-16.08.59:939][611]LogRHI: Display: Encountered a new graphics PSO: 2194845194
[2023.06.17-16.08.59:940][611]LogRHI: Display: Encountered a new graphics PSO: 434630558
[2023.06.17-16.08.59:940][611]LogRHI: Display: Encountered a new graphics PSO: 313947292
[2023.06.17-16.08.59:941][611]LogRHI: Display: Encountered a new graphics PSO: 1700587133
[2023.06.17-16.08.59:942][611]LogRHI: Display: Encountered a new graphics PSO: 3173142694
[2023.06.17-16.08.59:942][611]LogRHI: Display: Encountered a new graphics PSO: 4014415773
[2023.06.17-16.08.59:943][611]LogRHI: Display: Encountered a new graphics PSO: 249826844
[2023.06.17-16.08.59:943][611]LogRHI: Display: Encountered a new graphics PSO: 1181680040
[2023.06.17-16.08.59:944][611]LogRHI: Display: Encountered a new graphics PSO: 1160007457
[2023.06.17-16.08.59:945][611]LogRHI: Display: Encountered a new graphics PSO: 1549145889
[2023.06.17-16.08.59:945][611]LogRHI: Display: Encountered a new graphics PSO: 1038749680
[2023.06.17-16.08.59:946][611]LogRHI: Display: Encountered a new graphics PSO: 3608617056
[2023.06.17-16.08.59:946][611]LogRHI: Display: Encountered a new graphics PSO: 2034906587
[2023.06.17-16.08.59:947][611]LogRHI: Display: Encountered a new graphics PSO: 1245869763
A breakpoint instruction (__debugbreak() statement or a similar call) was executed in Project-Win64-DebugGame.exe.
'Project-Win64-DebugGame.exe' (Win32): Loaded 'C:\Windows\System32\CoreMessaging.dll'.
'Project-Win64-DebugGame.exe' (Win32): Loaded 'C:\Windows\System32\CoreUIComponents.dll'.
Fatal error: [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsPlatformMisc.cpp] [Line: 441]
Pure virtual function being called
A breakpoint instruction (__debugbreak() statement or a similar call) was executed in Project-Win64-DebugGame.exe.
I don’t see anything here that would help the case
For some reason, it seems like the crash happens when there are multiple Actor Foliage being rendered at the spawn location in a map. I have no idea how this has anything to do with “pure functions” considering none of the Actor Foliages have any functions in them.
The fix isn’t optimal, but managed to workaround by making the foliage actors hidden in-game and setting this value back to false after half a second.
In the editor there is everything that the program needs, but in the packaged version something is missing.
I solved the issue by delaying foliage rendering by half a second so I don’t think that’s the case.
EDIT:
The crash made a short return. I had added some pieces of foliage that didn’t render on a delay like the rest, so something about having a lot of foliage spawning at the exact moment the level is loaded is causing it to crash.
Thank you for helping to investigate the problem! I actually already looked into this but seems like there’s no way to check wether everything in the level has finished loading using Open Level. I’ll let you know if I figure something out!
The assets themselves aren’t heavy at all; they’re trees made up of sprites.
If I had to guess, the issue has something to do with the material the trees use, they consist of couple of layered sprites. The material has a waving effect to it and it uses the coordinates of the tree itself to offset the effect so that two trees don’t move exactly the same way.
The crash returned previously as soon as bushes using the same material were added to the map, since they didn’t have the delay.