4.5.1: Slate loading screen crash / focus issue

Mouse focus is broken after showing a slate loading screen in 4.5. After level load mouse focus still seems to be on loading screen until player clicks a mouse button to focus game again.

My workaround for now is to call “Set Input Mode Game Only” on begin play in character blueprint. However calling “Set Input Mode Game Only” in BeginPlay event crashes game then. So I had to add a delay before calling it which is not ideal and should be fixed if possible too.

Version: 4.5 or 4.5.1


How to reproduce (issue #1):

  • Create new first person game project

  • Add a C++ blueprint function library and add a level loading screen function which is exposed to blueprint. For that you need to modify Build.cs and include movie player header:

    // Build.cs
    PrivateDependencyModuleNames.AddRange(new string[] { “MoviePlayer” });

    // MyBlueprintFunctionLibrary.h
    UFUNCTION(BlueprintCallable, Category = “Game|Cinematic”)
    static void ShowLevelLoadingScreen();

    // MyBlueprintFunctionLibrary.cpp
    #include “MoviePlayer.h”

    void UMyBlueprintFunctionLibrary::ShowLevelLoadingScreen()
    {
    FLoadingScreenAttributes LoadingScreen;
    LoadingScreen.bAutoCompleteWhenLoadingCompletes = true;
    LoadingScreen.WidgetLoadingScreen = FLoadingScreenAttributes::NewTestLoadingScreenWidget();
    GetMoviePlayer()->SetupLoadingScreen(LoadingScreen);
    }

  • Have a blueprint setup like this in player character:

  • Start game as “Standalone Game”
  • Press M key
  • game crashes now with following crash log: [Crash Log Dump][2]
  • It does however not crash if you don’t call show loading screen function before level load

Related to focus issue (#2):

  • Do steps above
  • Add back loading screen function
  • Remove whole begin play function
  • Mouse focus now doesn’t work after loading level (press M key) until player clicks mouse button

Hey dgrieshofer,

Thank you for your report. We have assigned this issue to a member of our support staff, and they will begin investigation as soon as possible. If we are unable to reproduce issue, or we need additional information, our staff member will comment here with additional questions. Otherwise, we will post an ‘Answer’ once we have logged issue in our bug database or we have a solution for it.

In meantime, please be sure to review our suggestions for how to report a bug, and feel free to edit your post if you have additional information to provide:

Please and attach crash log and dump file for your project after a crash.

Thanks!

Hello dgrieshofer,

I was unable to reproduce this on my end. I have a few questions for you about this issue that will help us better understand what’s happening. Any additional information will be helpful.

Quick questions:

  1. Can you reproduce this issue on a clean project?
  2. Can you provide steps to reproduce this issue?
  3. Can you provide a screen shot of section of blueprints being referenced?

Hey Rudy, I have looked into this further and it seems like this is rather complicated to replicate but I have added all necessary steps and attached crashlog/dump in original post. Hope it helps, let me know if you need more feedback.

Hello dgrieshofer,

I have a couple more questions for you.

  1. Would please explain how you declared function ShowLevelLoadingScreen?
  2. In what blueprint did you put three nodes in second image (Custom event, Level loading and open level)?

I have edited initial post again showing all steps and all required changes needed from first person game template to make it crash. custom event was just a placeholder for a bound key. Btw I have now also found out that mouse focus issue that I am experiencing is also related to that loading screen which would be great to fix too. More info can be seen in origin post. Thanks

Hello dgrieshofer,

We were able to reproduce issue that you are experiencing. I have filled out a report (UE-4758) and sent it to developers for further investigation. I will provide any more pertinent information as it becomes available. Thank you for your time and assistance.

Hi
I’m experiencing exact same issue. I have same call stack as what he has in crash dump. crash occurs after movie player stops and level is actually about to be loaded. Has this issue been resolved yet?

Hello ,

After taking a quick look I have found that this has recently been fixed. This crash should be resolved in 4.7 version of engine. I hope that this information helps.

Make it a great day

Anything happen with this? I’m on 4.7.6 right now (I know, a bit behind), but I’m having same problem.

Hello BrynBennett,

This issue was resolved in 4.8 version of engine. I have included a link to commit in case you are using an engine built from source and you would like to cherry pick solution for your project. I hope this helps.

Commit: https://github.com/Crtriplett/UnrealEngine/commit/774da3310a3b833688d02dbd1ebd75f204dcdec5

Make it a great day

Thank you so much Rudy! Unfortunately, those changes already made it into version of engine we are using. Could there be any other commits that fixed issue?

Hello BrynBennett,

issue that you are experiencing may not be same issue that was reported in this post. You may want to create a new thread and provide more information on this issue that you are experiencing.

I was calling GetMoviePlayer()->PlayMovie() when I didn’t need to. I didn’t know that it would happen automatically. Evidently, that causes a crash. Thanks for your time.