truong-bui / AsyncLoadingScreen

Async Loading Screen is a free and open-source plugin for Unreal Engine. Async Loading Screen allows you to easily configure a Loading Screen System in the project settings, and automatically add a Loading Screen whenever you open a new level, without Level Streaming.
https://www.unrealengine.com/marketplace/en-US/product/async-loading-screen
MIT License
809 stars 101 forks source link

Crash on Open Level in Game (UE5.4.3) #102

Open TadDancer opened 2 months ago

TadDancer commented 2 months ago

Hey there, first of all great plugin, I'm using it in one project and it works flawlessly. In a new project there is an issue though, whenever I load a new level, the game crashes. I've tried it in standalone mode and also get a crash there with this stack:

UnrealEditor_D3D12RHI!FD3D12CommandContext::SetRenderTargets() [D:\build++UE5\Sync\Engine\Source\Runtime\D3D12RHI\Private\D3D12Commands.cpp:1303] UnrealEditor_D3D12RHI!FD3D12CommandContext::SetRenderTargetsAndClear() [D:\build++UE5\Sync\Engine\Source\Runtime\D3D12RHI\Private\D3D12Commands.cpp:1365] UnrealEditor_D3D12RHI!FD3D12CommandContext::RHIBeginRenderPass() [D:\build++UE5\Sync\Engine\Source\Runtime\D3D12RHI\Private\D3D12CommandContext.h:655] UnrealEditor_SlateRHIRenderer!FRHICommand<FRHICommandBeginRenderPass,FRHICommandBeginRenderPassString1630>::ExecuteAndDestruct() [D:\build++UE5\Sync\Engine\Source\Runtime\RHI\Public\RHICommandList.h:1295] UnrealEditor_RHI!FRHICommandListBase::Execute() [D:\build++UE5\Sync\Engine\Source\Runtime\RHI\Private\RHICommandList.cpp:477] UnrealEditor_RHI!RHIValidation::FTracker::FUAVTracker::operator[]() [D:\build++UE5\Sync\Engine\Source\Runtime\RHI\Private\RHICommandList.cpp:788] UnrealEditor_RHI!TGraphTask<TFunctionGraphTaskImpl<void __cdecl(void),0> >::ExecuteTask() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:1235] UnrealEditor_Core!FNamedTaskThread::ProcessTasksNamedThread() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:760] UnrealEditor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:651] UnrealEditor_RenderCore!FRHIThread::Run() [D:\build++UE5\Sync\Engine\Source\Runtime\RenderCore\Private\RenderingThread.cpp:330] UnrealEditor_Core!FRunnableThreadWin::Run() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:149]

Any idea what could cause this? When I disable the plugin, there's no crash, so it's somehow connected, even though I'm pretty sure it also has something to do with my project, since it's not crashing in the other one.

Oh and to add some details: The Startup Movie shows and leads to the startup level, just when I try to load a different level is when it crashes. I do see the video for a short second before it does though, I would assume the crash happens once the level load is done (but as previously stated, it won't crash without the plugin). I've also tried loading a very small level, so that size can't be an issue, but same thing. Both levels have my default game mode, so there is no override in the new level or anything.

One more thing I will try is disabling the level load before loading the level, just to see if that changes things and also that would at least give me the startup movie.

truong-bui commented 2 months ago

Hi, please check for any plugin conflicts with the Async Loading Screen plugin. Comparing the current project's settings with the other one to see if there are any differences.

TadDancer commented 2 months ago

Hi, please check for any plugin conflicts with the Async Loading Screen plugin. Comparing the current project's settings with the other one to see if there are any differences.

I've created a blank project and added all the plugins I'm using in my project that's crashing. In this blank one I get no crashes. Any other idea what I could check?

Both projects are blueprint only

truong-bui commented 2 months ago

What about the Async Loading Screen settings on both projects? Otherwise, this may be due to some logic code in your projects rather than the plugin.

TadDancer commented 2 months ago

What about the Async Loading Screen settings on both projects? Otherwise, this may be due to some logic code in your projects rather than the plugin.

The settings are the same in the blank project and the project that's crashing. When I use your "Set Enable Loading Screen" Node and disable the bool before loading the level, the project will not crash. Once I enable the bool, it does crash. So the plugin does definitely play a role, but I agree that it's not just the plugin alone. I'm just wondering if there's a way I can find out what's causing it?

truong-bui commented 2 months ago

You may want to break your level into small phases to see which phase causes the game to crash. If you could send me your project link, I will help you review it when I have time.