loading screen crash 4.10

Hi,

We are using a loadingscreen just like shootergame. Except we are using an umg widget for it using the following trick inside our HUD:

Header:

UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = UI)
	TSubclassOf<UUserWidget> LoadingScreenWidgetTemplate;

Cpp:

if (LoadingScreenWidgetTemplate)
{
    		UUserWidget* LoadingScreenWidgetMovie = CreateWidget<UUserWidget>(GetOwningPlayerController(), LoadingScreenWidgetTemplate);
    		FLoadingScreenAttributes LoadingScreen;
    
    		LoadingScreen.bAutoCompleteWhenLoadingCompletes = true;
    		LoadingScreen.MinimumLoadingScreenDisplayTime = 5.f;
    		LoadingScreen.WidgetLoadingScreen = LoadingScreenWidgetMovie->TakeWidget();
    		GetMoviePlayer()->SetupLoadingScreen(LoadingScreen);
}

The result is the following crash:

UE4Editor_SlateCore!FSlateBatchData::CreateRenderBatches() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\slatecore\private\rendering\drawelements.cpp:291]
UE4Editor_SlateRHIRenderer!FSlateRHIRenderer::DrawWindow_RenderThread() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\slaterhirenderer\private\slaterhirenderer.cpp:409]
UE4Editor_SlateRHIRenderer!TGraphTask<`FSlateRHIRenderer::DrawWindows_Private'::`36'::EURCMacro_SlateDrawWindowsCommand>::ExecuteTask() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\public\async\taskgraphinterfaces.h:779]
UE4Editor_Core!FTaskThread::ProcessTasks() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\private\async\taskgraph.cpp:539]
UE4Editor_Core!FTaskThread::ProcessTasksUntilQuit() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\private\async\taskgraph.cpp:340]
UE4Editor_RenderCore!RenderingThreadMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\rendercore\private\renderingthread.cpp:310]
UE4Editor_RenderCore!FRenderingThread::Run() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\rendercore\private\renderingthread.cpp:411]
UE4Editor_Core!FRunnableThreadWin::Run() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\private\windows\windowsrunnablethread.cpp:74]

This trick worked fine in 4.8, but is now crashing the game in 4.10. It seems i am getting a nullptr there thats not expected by the code. If i do not set the LoadingScreenWidgetTemplate the game doesn’t crash, so its clearly in the loadingscreen somewhere. I also tried modifying the widget logic, which sometimes makes it stable… but i can’t deduce any patterns there. My loadingscreen contains: text widgets, borders and canvas panels. I only use a construct event to initialize some text values and a random image, thought i keep it simple to prevent issues :slight_smile:

A note: i started debugging and it seems to be a timing issue, because when i debug slowly the crash does not happen at all. This crash happens 1 out of 2 currently, so sometimes the loading screen loads. I noticed there is quite some locking going on in the movieplayer, so i can imagine that this is not an easy issue…

any workaround is appriciated!

Hello ,

  • When you get your Crash Reporter window next, could you provide your Machine ID and ensure that you send the Crash Report?
  • Are you able to reproduce this in a new project?
  • Do you have any repro steps that we can use to reproduce the issue on our end?

Thank you.

Yes, machine id: 42C7D82B4DFF30ED96E04EA963842659
I didn’t try to reproduce it in an empty project as of yet, since i would need to setup with additional C++ code…

Repro:

  1. Use the above code just before a server travel.
  2. Create a hud with an umg widget exposed by it. Umg widget should contain text, for which the text is set using text properties set during construction.
  3. host a new game and notice the crash occuring 1 out of 2-3 times.

Ok, i am uploading right now, but it takes some time. As soon as its done i will send you a pm.

edit: pm send!

I have attempted to reproduce your issue, but have been unable to do so in a clean project. Could you provide the project that you are having the issue with so I can take a look at it and see exactly what may be going on? Thank you

How can i send you the project files? I don’t want just anyone to access those files.

You can provide the project by uploading it to Dropbox or Google Drive and sending me a PM with the link to download the project. Here is the link to my profile on the forums, where you can send me a PM: https://forums.unrealengine.com/member.php?160394-Sean-Flint

I have attempted to reproduce the crash that you were saying occurs roughly 1 out of 3 times, but have discovered a separate crash that appears every time I attempt to host a game. After clicking the Host button, the screen goes black and the crash occurs.

Have you had the chance to reproduce this issue in a clean project? If so, could you provide the steps that you followed in the clean project to get the same crash to occur?

I didn’t repro the crash in an empty project, what crash occurs in the repro? It sounds like the crash i am getting. Could you follow up on that? I think its hard to repro in clean project.

Here is the callstack for the crash I am seeing:

UE4Editor_SlateRHIRenderer!TGraphTask<`FSlateRHIResourceManager::FindOrCreateDynamicTextureResource'::`34'::EURCMacro_UpdateSlateUTextureResource>::ExecuteTask() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\public\async\taskgraphinterfaces.h:779]
UE4Editor_Core!FTaskThread::ProcessTasks() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\private\async\taskgraph.cpp:539]
UE4Editor_Core!FTaskThread::ProcessTasksUntilQuit() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\private\async\taskgraph.cpp:340]
UE4Editor_RenderCore!RenderingThreadMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\rendercore\private\renderingthread.cpp:310]
UE4Editor_RenderCore!FRenderingThread::Run() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\rendercore\private\renderingthread.cpp:411]
UE4Editor_Core!FRunnableThreadWin::Run() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\private\windows\windowsrunnablethread.cpp:74]

After investigating this crash in our database, I haven’t seen any other projects crashing with either of these callstacks. This leads me to believe that it could be something specific to your project. If you are able to reproduce it, and can provide repro steps that I can use to reproduce this in a clean project, then I will be able to enter a bug report. Otherwise, I do not have enough information to continue helping with this issue at this time.

I have seen both of these issues occuring to be honest. I can understand this only happens in my project, since i don’t know many people using the loading screen like this. I would not understand it if you close this issue just because its nowhere in the database. I am pretty positive this is something on your side, since i tried changing a lot of things. Today i found out that the repro dissapears if i remove the construct event in the widget. If i do add even the smallest step inside the construction script everything crashes. Can you tell me if that is supported in the movieplayer during the loading of the level?

I have entered a bug report (UE-24864) regarding your issue. I will provide updates on this issue as they become available. I have been unable to determine the exact cause of the crash, as I am getting a few separate crashes following the same repro steps. If you are able to narrow down the steps, please feel free to respond to this topic.

Have a great day

Hi,

We have been experiencing the same random crash (4.10, same callstack) since we implemented our loading screen using the Movie Player. Any news on this crash ? Have you found a workaround ?

Thanks
François

I have not really found a workaround… it seems any widget that uses dynamic data can cause this crash… The only way i found is to duplicate the widget so you can use static data, but that is not really workable solution if you have a lot of variables in your loading screen (mapname, some player information, maybe a random quote etc.)

Hello,

As an update, this issue is still being investigated by our developers. When there are changes to the status of this issue, I will be sure to report back with additional information.

Have a great day

Hi Sean,

Could you please supply my fellow ue4 users and me with more information? We just want to be able to develop a loading screen, in the current situation this issue is disrupting our operations.

I would love to know the tracking number, estimated time of improvement, and current investigation status.

This issue is really important if a game contains a loading screen. As other game studio’s, we also require a loading screen before we can publish our game. With more status information we are more able to decide the rearrangements in our development iterations.

I would like to thank you very much in advance. It is very good to hear that multiple developers are investigating this issue at this very moment!

King regards,

ERuts

Currently, we do not have a way for the public to track bug reports. As a result, the current status as well as estimated time cannot be shared. I have, however, gone into the report and increased the community interest of this report to let them know that there are multiple users requesting a fix for this issue.

Have a great day

I have the same callstack on a crash in our loading screen. I am simply making an image widget cycle between 4 textures.

>	RiverGame-XboxOne-Debug.exe!`FSlateRHIResourceManager::FindOrCreateDynamicTextureResource'::`36'::EURCMacro_UpdateSlateUTextureResource::DoTask(ENamedThreads::Type CurrentThread, const TRefCountPtr<FGraphEvent> & MyCompletionGraphEvent) Line 633	C++
 	RiverGame-XboxOne-Debug.exe!TGraphTask<`FSlateRHIResourceManager::FindOrCreateDynamicTextureResource'::`36'::EURCMacro_UpdateSlateUTextureResource>::ExecuteTask(TArray<FBaseGraphTask *,FDefaultAllocator> & NewTasks, ENamedThreads::Type CurrentThread) Line 798	C++
 	RiverGame-XboxOne-Debug.exe!FBaseGraphTask::Execute(TArray<FBaseGraphTask *,FDefaultAllocator> & NewTasks, ENamedThreads::Type CurrentThread) Line 329	C++
 	RiverGame-XboxOne-Debug.exe!FTaskThread::ProcessTasks(int QueueIndex, bool bAllowStall) Line 539	C++
 	RiverGame-XboxOne-Debug.exe!FTaskThread::ProcessTasksUntilQuit(int QueueIndex) Line 340	C++
 	RiverGame-XboxOne-Debug.exe!FTaskGraphImplementation::ProcessThreadUntilRequestReturn(ENamedThreads::Type CurrentThread) Line 1094	C++
 	RiverGame-XboxOne-Debug.exe!RenderingThreadMain(FEvent * TaskGraphBoundSyncEvent) Line 311	C++
 	RiverGame-XboxOne-Debug.exe!FRenderingThread::Run() Line 430	C++
 	RiverGame-XboxOne-Debug.exe!FRunnableThreadWin::Run() Line 221	C++
 	RiverGame-XboxOne-Debug.exe!FRunnableThreadWin::GuardedRun() Line 193	C++
 	RiverGame-XboxOne-Debug.exe!FRunnableThreadWin::_ThreadProc(void * pThis) Line 67	C++

Additionally, some times my image widget in the loading screen flashes wrong textures, but doesn’t crash. I’m guessing that something is not thread safe.