Dedicated Server Assertion failed: !bCheckAdded || NodeRef.bAddedToGraph

After upgrading to 4.15 and changing nothing else, packaged dedicated servers now assert shortly after launch, with the following message:
LogWindows:Error: Assertion failed: !bCheckAdded || NodeRef.bAddedToGraph
Attached is a sample log, including call stack: link text

This only occurs if I first package my project for Windows and run the server from the command line. When using PIE, the server runs without issue. I have tried doing a totally clean build by deleting the Intermediate, Saved, Build, Debug, and DerivedDataCache folders and the problem persists. I have also re-compiled the engine from clean source (master branch with 4.15 update), then done a clean build, to no avail.

As you can see from my log, the assertion seems to have something to do with async loading, but I have the async loading thread disabled in my project settings - I’m not sure if that’s related.

Fortunately, this is reproducible with a new project using the FirstPerson template; to reproduce:

  • Build the 4.15 Editor from source (you need to for dedicated server support)
  • Create a new project using the FirstPerson template
  • Package the project for Win64 using Development configuration
  • Add a dedicated server build target file at [Project Dir]/Source/[ProjectName]Server.Target.cs (I used the ShooterGame’s ShooterGameServer.Target.cs as a template).
  • Generate/update the visual studio solution file
  • Open the solution, select the “Development Server” configuration, Win64 target, and build the game.
  • Copy the server executable into the binaries folder of the packaged build: [Project Build Path]/WindowsNoEditor/[ProjectName]/Binaries/Win64/
  • Run the server from the command line, e.g.: FirstPersonServer.exe FirstPersonExampleMap -log
  • The server will assert and shutdown shortly after launching

I would really appreciate help with this, since this problem prevents us from testing remote networked builds (exactly what we’re working on now).

Thanks in advance for any help.

Hey extralongpants-

Using the repro steps you provided I received a number of Class Default Object (CDO) issues when trying to launch the server. Is this what you are referring to? Additionally, are you able to use the steps provided in the documentation for dedicated server setup (A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums) ? This page was updated recently for 4.14 (and beyond). Let me know if you get the same errors after running through these steps.

Hi Doug -
I don’t think I’ve seen these CDO Issues you mentioned - I only see the assertion, and I can’t find any other errors in the log.

I went through the documentation you provided when initially putting the server support into my game, and I reviewed it again this morning, and it matches my current setup (including the new target file platform syntax for dedicated servers in 4.15). I basically used that guide when writing some of my repro steps.

Hi Doug - Were you ever able to get a dedicated server working in 4.15? After your comment, I wasn’t sure which one of us was closer to having a working dedicated server, as it sounded like you were still having a problem getting it to work (CDO errors).

Thanks in advance for any help.

I’m having the same problem it seems. The only error I get is:
Assertion failed: !bCheckAdded || NodeRef.bAddedToGraph [File:E:\UE_415_Stable\Engine\Source\Runtime\CoreUObject\Public\Serialization/AsyncLoading.h] [Line: 248]

Just recently upgraded 4.14 to 4.15.

I copied the Server.Target.cs and replaced “alpha”. It compiles successfully but crashes when launching the server.

Hey Extralongpants - have you had any luck getting past this problem?

Hi Taurian -
Unfortunately, no, I haven’t gotten past this. Luckily I’ve been able to switch my work focus to client-side stuff for the time being.

Hey extralongpants-

It seems that the issue you’re seeing is specific to the first person template. I was able to successfully build a dedicated server and found that the steps you provide do cause the issue you’re seeing in a first person template project, but do not have the same issue when using a third person template project. I have reported this behavior for investigation here: Unreal Engine Issues and Bug Tracker (UE-42742) .

Cheers

Doug Wilson

Ah, interesting. Thanks for looking into it and reporting the issue.

I’m also having this same issue, my project comes from the third person template. Any way to get around this ? I really would like to test my dedicated server.

also having this issue with a build based off the blank C++ template, so the issue might not be template related but more engine related…

Take a look at this thread for a work-around:

(Short version; Disable “Event Driven Loader Enabled” in Project Settings / Streaming and re-package.)

dude, i could kiss you on the mouth right now…

confirmed this fixed the server build, didn’t have to recompile server, just repackage PAK and off she went :slight_smile:

Thanks, finally got time to confirm this workaround. I’m able to test my dedicated server again!

I noticed in the log you gave us that the assert is failing in a source file within the 4.14 build. If you’re trying to build with 4.15 then something is getting mixed up. I’ve never seen this problem before but are you perhaps building the server with the wrong Frontend?

That’s just a badly named folder on my machine. I initially pulled 4.14 source into that directory, but I kept the repository up to date (eventually bringing it up to 4.15). I also tested with a clean 4.15 pulled into a separate folder and the issue still persisted (I should have attached those logs). Sorry for any confusion.

Have you tried building it with the frontend at all? I’ve always had better luck using that method for server builds. It might be worth a try.

Would like to add that this is happening to me as well. Also from a blank c++ Project.

Anyone having this problem and missed the comment above, it appears there is a work-around – until Epic fixes it. Scroll up and find Anders Holmquist’s link to a forum thread. Hopefully it will work for you as well.