Page MenuHomeFeedback Tracker

Server crash when player disconnects (Unhandled exception)
Reviewed, NormalPublic

Description

The server crashes from time to time if a player is disconnecting.
Turning off Battleye does have no effect.
In addition to that the OnPlayerDisconnected eventhandler (BaseGamemode) fires twice if player is kicked via Playermanager command KickPlayer.

Last log looks like:

Example 1 (Crash GUID: 05eb2bb5-dfe1-42af-9f36-f7f7c7f982b8)

01:05:45.765 RPL          : ServerImpl event: disconnected (identity=0x00000003), group=1, reason=9
01:05:45.799 DEFAULT      : BattlEye Server: Disconnect player identity=0x00000003
01:05:45.799 DEFAULT      : BattlEye Server: 'Player #73 XXXXXXXXX  disconnected'
01:05:45.864 ENGINE    (E): Application crashed! Generated memory dump:

Example 2 (Crash GUID: 28a06b52-659e-4f27-bb1c-676eab770390)

03:11:54.165 RPL          : ServerImpl event: disconnected (identity=0x00000015), group=1, reason=9
03:11:54.215 DEFAULT      : BattlEye Server: Disconnect player identity=0x00000015
03:11:54.216 DEFAULT      : BattlEye Server: 'Player #282 XXXXXXXXX disconnected'
03:11:54.282 ENGINE    (E): Application crashed! Generated memory dump:

Details

Severity
None
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Operating System Version
Windows Server 2022
Category
General

Event Timeline

RamBob created this task.May 26 2023, 9:45 AM
Geez changed the task status from New to Need More Info.May 26 2023, 3:39 PM
Geez added a subscriber: Geez.

Hello RamBob.
Can you please upload logs from the occurence?

Hey Geez,

thanks for your reply.
Here are the logs. If your need mor log, let me know.

I forgot to mention that this problem occurs since the last major update 0.9.8.64.

Geez changed the task status from Need More Info to Reviewed.May 29 2023, 4:34 PM

Hello RamBob.
It seems the crash is related to the modded content and in such case there is nothing we can do. This crash should not occur on the vanilla version of the game.

Geez added a comment.May 29 2023, 4:35 PM

Also:

01:05:45.765 RPL : ServerImpl event: disconnected (identity=0x00000003), group=1, reason=9

Is a player kick message when the server goes down.

RamBob added a comment.EditedMay 29 2023, 5:06 PM

Thank you for the info, i will have a look at that!

Do you mean the kick event group=1, reason=9?
Maybe i got it wrong, but this discconnect type occurs over 400 times in the last server log without any crash.
It resolves to "REPLICATION SHUTDOWN" and is used if a player disconnects regulary.
Or have I misunderstood that?

Statistically, this crash happens on every 513th disconnect process and can also occur with a connection timeout.
After adding some debug code i found out that the OnPlayerDisconnected eventhandler in the BaseGameMode is not called.

Example 3 (Crash GUID: e16930bd-4edd-4688-be29-e58697f0b0fa)

02:37:05.027 RPL          : ServerImpl event: connection timeout (identity=0x00000021)
02:37:05.053 DEFAULT      : BattlEye Server: Disconnect player identity=0x00000021
02:37:05.053 DEFAULT      : BattlEye Server: 'Player #316 Queen4774 disconnected'
02:37:05.120 ENGINE    (E): Application crashed!
Geez added a comment.May 30 2023, 10:17 AM

Apologies, the devs have overlooked something and apparently the message occurs when disconnecting even without a crash