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.75k stars 407 forks source link

[misc-optimizations] Game crashes during level transitions when showperf is enabled #9098

Closed Rokvach closed 2 years ago

Rokvach commented 2 years ago

Description I was checking out the performance improvements on the misc-optimizations PR and while using togglecampaignteleport and selecting a nearest colony on the map my game crashed during level transition.

Steps To Reproduce

  1. Start singleplayer campaign
  2. Enable showperf
  3. Leave outpost
  4. Game crashed

Version 0.17.15.0 Branch: misc-optimizations Commit: https://github.com/Regalis11/Barotrauma-development/commit/af914c747def4587ee151ae82991f3d11f5cee33

Additional information image.png

Barotrauma Client crash report (generated on 10.5.2022 23:44:36)

Barotrauma seems to have crashed. Sorry for the inconvenience! 

DBF804E2140B397C86440A622E738A52

Game version 0.17.15.0 (ReleaseWindows, branch feature/misc-optimizations, revision af914c747d)
Graphics mode: 2560x1440 (BorderlessWindowed)
VSync OFF
Language: English
Selected content packages: Vanilla, Vengeance Mk. III
Level seed: Skadi's Cauldron
Loaded submarine: None
Selected screen: Barotrauma.RoundSummaryScreen
SteamManager initialized

System info:
    Operating system: Microsoft Windows NT 10.0.19044.0 64 bit
    GPU name: NVIDIA GeForce GTX 980 Ti
    Display mode: {Width:2560 Height:1440 Format:Color AspectRatio:1,7777778}
    GPU status: Normal

Exception: Collection was modified; enumeration operation may not execute. (System.InvalidOperationException)
Target site: Void ThrowInvalidOperationException_InvalidOperation_EnumFailedVersion()
Stack trace: 
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at System.Linq.Enumerable.Count[TSource](IEnumerable`1 source, Func`2 predicate)
   at Barotrauma.GUI.Draw(Camera cam, SpriteBatch spriteBatch) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GUI\GUI.cs:line 329
   at Barotrauma.RoundSummaryScreen.Draw(Double deltaTime, GraphicsDevice graphics, SpriteBatch spriteBatch) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Screens\RoundSummaryScreen.cs:line 55
   at Barotrauma.GameMain.Draw(GameTime gameTime) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GameMain.cs:line 976
   at Microsoft.Xna.Framework.Game.DoDraw(GameTime gameTime) in <DEV>\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 669
   at Microsoft.Xna.Framework.Game.Tick() in <DEV>\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 511
   at Microsoft.Xna.Framework.SdlGamePlatform.RunLoop() in <DEV>\Libraries\MonoGame.Framework\Src\MonoGame.Framework\SDL\SDLGamePlatform.cs:line 94
   at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior) in <DEV>\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 398
   at Microsoft.Xna.Framework.Game.Run() in <DEV>\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 368
   at Barotrauma.Program.Main(String[] args) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Program.cs:line 59

Last debug messages:
[10.5.2022 23:44:30] Transitioning to DankWolstone (current location: The city of Dank, selected location: Wolstone Habitation Outpost, leaving sub: Dugong, at start: True, at end: False, transition type: LeaveLocation)
[10.5.2022 23:44:22] Enabled teleportation on the campaign map.
[10.5.2022 23:44:22] togglecampaignteleport
[10.5.2022 23:40:50] Line of sight effect disabled
[10.5.2022 23:40:50] los
[10.5.2022 23:40:49] Steam achievements have been disabled during this play session.
[10.5.2022 23:40:49] Enabled cheat commands.
[10.5.2022 23:40:49] enablecheats
[10.5.2022 23:40:46] Enabling cheats will disable Steam achievements during this play session.
[10.5.2022 23:40:46] You need to enable cheats using the command "enablecheats" before you can use the command "los".
[10.5.2022 23:40:46] los
[10.5.2022 23:40:29] Generating an outpost for the start of the level... (Location: Skadi's Cauldron Outpost, level type: Outpost)
[10.5.2022 23:36:32] Line of sight effect disabled
[10.5.2022 23:36:32] los
[10.5.2022 23:34:02] Line of sight effect disabled
[10.5.2022 23:34:02] los
[10.5.2022 23:33:18] Line of sight effect enabled
[10.5.2022 23:33:18] los
[10.5.2022 23:30:23] Line of sight effect disabled
[10.5.2022 23:30:23] los
[10.5.2022 23:29:06] Performance statistics enabled
[10.5.2022 23:29:06] showperf
[10.5.2022 23:28:38] Hash calculation for content package "Neurotrauma" didn't match expected hash (631C2AB7B6895D68322037F64E84AB1D != 8535586BD5F53E0BB5D29A8D72885DF4)
[10.5.2022 23:28:37] Hash calculation for content package "Barotraumatic Vanilla Creature Overhauls" didn't match expected hash (834064517D1925D8615AC671FC3D24EC != D482913248A913B8A2EF7F643A55AC8D)
[10.5.2022 23:28:37] Hash calculation for content package "Better Vanilla Weapons" didn't match expected hash (B894661260DAFF36AB3A3F561AB51911 != D6FC2FA0536EAE4327464E4D4EAC8DCE)
[10.5.2022 23:28:37] Hash calculation for content package "Barotrauma 40K" didn't match expected hash (4A5FA1BD43F8650C346BF11A5A56B932 != 2025261A714465CBBCACED746EF587AA)
[10.5.2022 23:28:37] Hash calculation for content package "Barotraumatic Survivator Fixes" didn't match expected hash (7DF596B5138DDBDE40086936B4B5C5AB != AFA7B211B8F2F31E893AB8BF6BE3279D)
[10.5.2022 23:28:37] Hash calculation for content package "Hazardous Reactors" didn't match expected hash (33AA96A859F907D16D5CCC392A1560F6 != E6E216D65E5C5F1F53B71872BF1CFE7A)
[10.5.2022 23:28:36] Hash calculation for content package "miniccaveman2k2s modern weapons mod" didn't match expected hash (7ACEC8DDD7207BC3304EECA3F3AF1C2A != AED656AE103A02167A386608E5EC2209)
[10.5.2022 23:28:36] Hash calculation for content package "EK | Dockyard" didn't match expected hash (73A57A4912E20509876C9521C0FED49A != E80088776B33A63C6A98ADF0C99434C4)
[10.5.2022 23:28:35] Attempting to open ALC device "OpenAL Soft on Kaiuttimet (Realtek High Definition Audio)"
Regalis11 commented 2 years ago

Fixed in https://github.com/Regalis11/Barotrauma-development/commit/c6d68ea3f44a580ab289352c269ca9decb516d1d

Rokvach commented 2 years ago

Tested, working correctly. Closing.