Shut down Dedicated server properly

First of all the goal is to have a server start subservers wich act as game rooms and get closed when the round is finished and the players are back on the main server.

Wich works is my main server to wich i can connect and it can start new servers via Windows cmd over a custom blueprint function library.

The problem is when i try to shut the server down I get a lot of errors.

I am currently using GIsRequestingExit = true; to shut the server down, but like I said it pops up some fatal errors in the logs.(Will write them down later)

So the normal error free way to close a server is by pressing ctrl + c while having the output log selected.

I was digging arround in the Engine Code a bit and found that it executes void UIpNetDriver::LowLevelDestroy() from the IpNetDriver to shut everything down.(Or at last thats what i think)

The question is now: How can i execute that function in my blueprint function library or if thats not possible, how to shut the server down without getting errors via c++ and not by pressing ctrl +c.

Errors are:

[2018.01.01-16.05.52:494][302]LogWindows: Error: === Critical error: ===

[2018.01.01-16.05.52:495][302]LogWindows: Error:

[2018.01.01-16.05.52:495][302]LogWindows: Error: Fatal error!

[2018.01.01-16.05.52:496][302]LogWindows: Error:

[2018.01.01-16.05.52:496][302]LogWindows: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000090

[2018.01.01-16.05.52:497][302]LogWindows: Error:

[2018.01.01-16.05.52:497][302]LogWindows: Error: MinorityWarsServer.exe!0x00000000518E5F1A

[2018.01.01-16.05.52:498][302]LogWindows: Error: MinorityWarsServer.exe!0x00000000518FA17E

[2018.01.01-16.05.52:498][302]LogWindows: Error: MinorityWarsServer.exe!0x00000000518FC2D1

[2018.01.01-16.05.52:499][302]LogWindows: Error: MinorityWarsServer.exe!0x0000000051744E02

[2018.01.01-16.05.52:500][302]LogWindows: Error: MinorityWarsServer.exe!0x00000000518FB6F1

[2018.01.01-16.05.52:500][302]LogWindows: Error: MinorityWarsServer.exe!0x000000005342B21C

[2018.01.01-16.05.52:501][302]LogWindows: Error: MinorityWarsServer.exe!0x0000000053A758BF

[2018.01.01-16.05.52:501][302]LogWindows: Error: MinorityWarsServer.exe!0x0000000053A63806

[2018.01.01-16.05.52:502][302]LogWindows: Error: MinorityWarsServer.exe!0x0000000053ACFF7F

[2018.01.01-16.05.52:503][302]LogWindows: Error: MinorityWarsServer.exe!0x000000005390D431

[2018.01.01-16.05.52:504][302]LogWindows: Error: MinorityWarsServer.exe!0x000000005124C4B2

[2018.01.01-16.05.52:505][302]LogWindows: Error: MinorityWarsServer.exe!0x000000005125814C

[2018.01.01-16.05.52:505][302]LogWindows: Error: MinorityWarsServer.exe!0x00000000512581AA

[2018.01.01-16.05.52:506][302]LogWindows: Error: MinorityWarsServer.exe!0x0000000051263472

[2018.01.01-16.05.52:506][302]LogWindows: Error: MinorityWarsServer.exe!0x000000005535B24B

[2018.01.01-16.05.52:507][302]LogWindows: Error: KERNEL32.DLL!0x00000000D2341FE4

[2018.01.01-16.05.52:507][302]LogWindows: Error: ntdll.dll!0x00000000D295EF91

[2018.01.01-16.05.52:507][302]LogWindows: Error: ntdll.dll!0x00000000D295EF91

[2018.01.01-16.05.52:508][302]LogWindows: Error:

[2018.01.01-16.05.52:511][302]LogExit: Executing StaticShutdownAfterError

[2018.01.01-16.05.52:513][302]LogWindows: FPlatformMisc::RequestExit(1)

You could try:

or:

1 Like

I’d guess the 2nd one is more likely.

The first is only for Players.

And i already tried the 2nd one. Gave me the same results somehow. Don`t know why tho.

OK well there’s no debug info in your log there. Build your server for Debug and post those logs and/or run it in the VS debugger to see where it’s breaking. You should post your logs in full and as attachments (not directly in your text).

Here is the log from the compiled DebugServer.
Cant debug in VS since it’s a blueprint library function where im closing the server from.

link text

That can’t be a debug build. The stack trace is just addresses. We should see function names.

And of course you can debug it in VS. The blueprints run via C++ code so when it breaks, it breaks in C++. Anyway, we at least need the logs to have debug info. Also please post the crash log.

Here is the log from the Editor. I could^nt find anz other. The one ive sent you is at the position from the link. In the editor im usng the same command to shut it down but somhow there are no errors.

link text

Are you building for “DebugGame Server”? We need logs from where it breaks and we need them to tell us more than “MinorityWarsServer.exe!0x00000000518E5F1A”. It’s like you’re building it for Shipping.

Ok after recompiling the server for debugigng i recognized that i don`t get any errors. So i recompiled for normal development and the error whent away by some computer magic.

But still thanks for the help. I was sitting here some hours without any idea.

Oh lord… I always feel bad suggesting a full rebuild without more info because it takes so long. Well. Good luck with the rest of your endeavor!