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

Exception: Too many tasks in the TaskPool, when trying to unsubscribe from a lot of mods at once #9304

Closed Rokvach closed 2 years ago

Rokvach commented 2 years ago

Description I selected around 100 mods and tried to unsubscribe from them and during that process the game crashed

Steps To Reproduce Sub to a lot of workshop mods and then unsub from all of them at once

Version 0.18.6.0 Branch: bugfixes

Additional information

Barotrauma Client crash report (generated on 06/10/2022 11:33:11)

Barotrauma seems to have crashed. Sorry for the inconvenience! 

50269F88B8302534D8B3D08501C8917D

Game version 0.18.6.0 (ReleaseWindows, branch feature/bugfixes, revision 116d96e225)
Graphics mode: 2560x1440 (BorderlessWindowed)
VSync OFF
Language: English
Selected content packages: Vanilla, EK | Armory, EK | Utility, EK | Gunnery, EK | Dockyard
Level seed: no level loaded
Loaded submarine: None
Selected screen: Barotrauma.MainMenuScreen
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: Too many tasks in the TaskPool:
UnsubFromSelected
DetermineUpdateRequired1769403760
DetermineUpdateRequired1946765892
...
DetermineUpdateRequired2547888957 (System.Exception)
Target site: Void AddInternal(System.String, System.Threading.Tasks.Task, System.Action`2[System.Threading.Tasks.Task,System.Object], System.Object)
Stack trace: 
   at Barotrauma.TaskPool.AddInternal(String name, Task task, Action`2 onCompletion, Object userdata) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Utils\TaskPool.cs:line 56
   at Barotrauma.Steam.MutableWorkshopMenu.<>c__DisplayClass22_0.<PopulateInstalledModLists>g__addRegularModToList|2(RegularPackage mod, GUIListBox list) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Steam\WorkshopMenu\Mutable\InstalledTab.cs:line 0
   at Barotrauma.Steam.MutableWorkshopMenu.<>c__DisplayClass22_0.<PopulateInstalledModLists>g__addRegularModsToList|3(IEnumerable`1 mods, GUIListBox list) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Steam\WorkshopMenu\Mutable\InstalledTab.cs:line 693
   at Barotrauma.Steam.MutableWorkshopMenu.PopulateInstalledModLists(Boolean forceRefreshEnabled, Boolean refreshDisabled) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Steam\WorkshopMenu\Mutable\InstalledTab.cs:line 0
   at Barotrauma.Steam.MutableWorkshopMenu.<>c__DisplayClass22_0.<PopulateInstalledModLists>b__18(Nullable`1 it) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Steam\WorkshopMenu\Mutable\InstalledTab.cs:line 603
   at Barotrauma.Extensions.IEnumerableExtensions.ForEach[T](IEnumerable`1 source, Action`1 action) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Extensions\IEnumerableExtensions.cs:line 138
   at Barotrauma.Steam.MutableWorkshopMenu.<>c__DisplayClass22_0.<PopulateInstalledModLists>b__17(Task t) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Steam\WorkshopMenu\Mutable\InstalledTab.cs:line 604
   at Barotrauma.TaskPool.<>c__DisplayClass6_0.<Add>b__0(Task t, Object obj) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Utils\TaskPool.cs:line 60
   at Barotrauma.TaskPool.Update() in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Utils\TaskPool.cs:line 77
   at Barotrauma.GameMain.Update(GameTime gameTime) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GameMain.cs:line 929
   at Microsoft.Xna.Framework.Game.DoUpdate(GameTime gameTime) in <DEV>\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 656
   at Microsoft.Xna.Framework.Game.Tick() in <DEV>\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 504
   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:
[06/10/2022 11:31:56] Attempting to open ALC device "OpenAL Soft on Kaiuttimet (Realtek High Definition Audio)"
Regalis11 commented 2 years ago

Should be fixed in https://github.com/Regalis11/Barotrauma-development/commit/967dafa9fbfbb923f2d61cc52d12654f80bb29c0

Rokvach commented 2 years ago

Tested, working correctly. Closing.