Editor crashes when running a dedicated server and using an UMG-widget as component of an actor

Hi there!

I tried to do some kind of 3D healthbars for some actors in my game. I want to do this by adding an UMG widget-component to the actor blueprint.

If I start playing without a dedicated server everything works fine. But if do use a dedicated server, the editor crashes as soon as I start playing. I tried to add the widget with some delay via the event graph, but unfortunately without success.

This is the report I get:

UE4Editor_UMG!FWidget3DHitTester::GetBubblePathAndVirtualCursors() + 591 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\umg\private\components\widgetcomponent.cpp:154] UE4Editor_SlateCore!FHittestGrid::GetWidgetPathAndDist() + 365 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\slatecore\private\input\hittestgrid.cpp:628] UE4Editor_SlateCore!FHittestGrid::GetBubblePath() + 362 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\slatecore\private\input\hittestgrid.cpp:148] UE4Editor_Slate!FSlateApplication::LocateWindowUnderMouse() + 532 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:831] UE4Editor_Slate!FSlateApplication::UpdateToolTip() + 217 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:2640] UE4Editor_Slate!FSlateApplication::Tick() + 1652 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\slate\private\framework\application\slateapplication.cpp:1236] UE4Editor!FEngineLoop::Tick() + 4447 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\launchengineloop.cpp:2284] UE4Editor!GuardedMain() + 1404 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\launch.cpp:142] UE4Editor!GuardedMainWrapper() + 26 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\windows\launchwindows.cpp:126] UE4Editor!WinMain() + 249 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\windows\launchwindows.cpp:202] UE4Editor!__tmainCRTStartup() + 329 bytes [f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618]

When debugging into the mentioned function (GetBubblePathAndVirtualCursors) I found the problem lies here:

ULocalPlayer* const TargetPlayer = GEngine->GetLocalPlayerFromControllerId(World.Get(), 0);
APlayerController* PlayerController = TargetPlayer->PlayerController;

TargetPlayer is NULL and thereby causes an access violation. It seems to be NULL, because the server holds no local player (as intended).

I tried to reproduce this behaviour on a clean ThirdPerson template project, which was not successfull. In the template the server holds a localplayer and therefor does not crash.

I would like to know the best way to fix this, be it a
workaround or fixing some kind of error/design flaw that I made.

Greetings and thanks in advance!

Hello ,

This sounds like a known issue that I have been looking into lately. I have a question for you that will check to see if this is the case.

Quick question:

When you run your project as a dedicated server are you using the following settings?

EDIT: I just realized that I messed up and put “Use these settings” It was supposed to read “Are you using these setting?” These settings shown are known to cause a crash in 4.7.2

Hey Rudy,

my options menu looks a little bit different, I added a screen of it.
I’m using 4.7.2

32466-ded_server_options.png

Hello ,

This is not the issue I thought it was at first. I was not able to reproduce this issue on my end. I have opened a blank project and I have used the setting that were provided by your screen shot. I have also added a 3D widget but I am unable to cause this crash. Did you upgrade this project from a previous version of the engine to 4.7?

Hello Rudy,

as I said in my question, when I create a new clean template, the problem does not occur. When debugging into the engine itself, I found, that the problem seems to originate in my game not having a local player server side.

TargetPlayer is NULL and thereby causes an access violation. It seems to be NULL, because the server holds no local player (as intended).

Is this behaviour intended?

Regarding your question: No, I did not upgrade, started freshly in UE 4.7.2

Hello ,

I do not believe that this is intended. Would it be possible for you to send us the project that is having the issue to that I can take a closer look?