FakeFishGames / Barotrauma

A 2D online multiplayer game taking place in a submarine travelling through the icy depths of Jupiter's moon Europa.
http://www.barotraumagame.com/
1.77k stars 409 forks source link

Respawning Players Server Crash #4438

Closed hubismal closed 3 years ago

hubismal commented 3 years ago
Barotrauma Dedicated Server crash report (generated on 12/5/2020 5:18:16 PM)

Barotrauma seems to have crashed. Sorry for the inconvenience!

Game version 0.10.6.2 (ReleaseWindows, branch release, revision d0702df35e)
Language: English
Selected content packages: Vanilla 0.9, Shipwrecks Extended, STEM, Thalassophobia
Level seed: Attis
Loaded submarine: Azimuth (915E44034994D0FFCCCE3F0968D84735)
Selected screen: Barotrauma.GameScreen
Server (Round had started)

System info:
Operating system: Microsoft Windows NT 6.2.9200.0 64 bit

Exception: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index') (System.ArgumentOutOfRangeException)
Target site: Void ThrowArgumentOutOfRange_IndexException()
Stack trace:
at Barotrauma.Networking.RespawnManager.RespawnCharactersProjSpecific() in <DEV>\Barotrauma\BarotraumaServer\ServerSource\Networking\RespawnManager.cs:line 331
at Barotrauma.Networking.RespawnManager.RespawnCharacters() in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Networking\RespawnManager.cs:line 288
at Barotrauma.Networking.RespawnManager.DispatchShuttle() in <DEV>\Barotrauma\BarotraumaServer\ServerSource\Networking\RespawnManager.cs:line 141
at Barotrauma.Networking.RespawnManager.UpdateWaiting(Single deltaTime) in <DEV>\Barotrauma\BarotraumaServer\ServerSource\Networking\RespawnManager.cs:line 99
at Barotrauma.Networking.GameServer.Update(Single deltaTime) in <DEV>\Barotrauma\BarotraumaServer\ServerSource\Networking\GameServer.cs:line 381
at Barotrauma.GameMain.Run() in <DEV>\Barotrauma\BarotraumaServer\ServerSource\GameMain.cs:line 353
at Barotrauma.Program.Main(String[] args) in <DEV>\Barotrauma\BarotraumaServer\ServerSource\Program.cs:line 51

Last debug messages:
12/5/2020 5:18:16 PM - [12/5/2020 5:18:16 PM]
Saving banlist
12/5/2020 5:18:16 PM - [12/5/2020 5:18:16 PM]
Respawning bot Miranda Gallardo as Medical Doctor
12/5/2020 5:18:16 PM - [12/5/2020 5:18:16 PM]
Respawning Johnagann Marine (STEAM_1:1:59736924) as Captain
12/5/2020 5:18:16 PM - [12/5/2020 5:18:16 PM]
Respawning hub (STEAM_1:0:91203435) as Scientist
12/5/2020 5:18:16 PM - [12/5/2020 5:18:16 PM]
Respawning everyone in main sub.
12/5/2020 5:18:16 PM - [12/5/2020 5:18:16 PM]
Console command "respawnnow" executed by ladedotty.
12/5/2020 5:17:55 PM - [12/5/2020 5:17:55 PM]
ladedotty picked up Faraday Alien Artifact
12/5/2020 5:17:49 PM - [12/5/2020 5:17:49 PM]
ladedotty picked up Sea Yeast Shroom
12/5/2020 5:17:47 PM - [12/5/2020 5:17:47 PM]
ladedotty picked up Sea Yeast Shroom
12/5/2020 5:17:47 PM - [12/5/2020 5:17:47 PM]
ladedotty removed Sea Yeast Shroom from Medium Windowed Steel Cabinet (ID: 2254)
12/5/2020 5:17:47 PM - [12/5/2020 5:17:47 PM]
ladedotty placed Sea Yeast Shroom in Medium Windowed Steel Cabinet (ID: 2254)
12/5/2020 5:17:46 PM - [12/5/2020 5:17:46 PM]
ladedotty picked up Sea Yeast Shroom
12/5/2020 5:17:45 PM - [12/5/2020 5:17:45 PM]
ladedotty picked up Sea Yeast Shroom
12/5/2020 5:17:42 PM - [12/5/2020 5:17:42 PM]
ladedotty picked up Sea Yeast Shroom
hubismal commented 3 years ago

Unsure how to reproduce. Online server with many players. We were docked to an outpost with players respawning every 5 minutes. This was the third or so node in campaign. Respawning players seemed to crash the game.

Regalis11 commented 3 years ago

This seemed to happen when the server tried to respawn a bot in the campaign. Steps to repro:

  1. Start a new campaign with some bots
  2. Kill one of the bots
  3. Kill a human player to trigger a respawn
  4. ("respawnnow" if you don't want to wait for the countdown)
  5. Crash

Fixed in https://github.com/Regalis11/Barotrauma-development/commit/21ad1b77fc9927acd617105f48139786e9e937d9 by disabling bot respawns altogether in the campaign. I think it's better not to allow bots to respawn, because it could be easily abused to "farm" resources using the bots.

Rokvach commented 3 years ago

Tested, working correctly. Closing.