MagicStorage icon indicating copy to clipboard operation
MagicStorage copied to clipboard

RecursiveCraft IndexOutOfRangeException Game freeze

Open odt1 opened this issue 3 years ago • 3 comments

With Calamity, Fargo mods, MS + RecursiveCraft I'm having this issue when opening crafting interface. Game freezes to a constant exception loop.

[00:19:30.767] [Main Thread/WARN] [tML]: Silently Caught Exception: 
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at MagicStorage.Common.Systems.RecursiveCraftIntegration.ApplyCompoundRecipe(Recipe recipe) in MagicStorage\Common\Systems\RecursiveCraftIntegration.cs:line 182
   at MagicStorage.CraftingGUI.IsAvailable(Recipe recipe, Boolean checkCompound) in MagicStorage\CraftingGUI.cs:line 733
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
   at MagicStorage.CraftingGUI.<RefreshRecipes>g__DoFiltering|59_0(Int32 sortMode, Int32 filterMode, ItemTypeOrderedSet hiddenRecipes, ItemTypeOrderedSet favorited, <>c__DisplayClass59_0& ) in MagicStorage\CraftingGUI.cs:line 379
   at MagicStorage.CraftingGUI.RefreshRecipes() in MagicStorage\CraftingGUI.cs:line 403
   at MagicStorage.CraftingGUI.RefreshItemsAndSpecificRecipes(Recipe[] toRefresh) in MagicStorage\CraftingGUI.cs:line 305
   at MagicStorage.StorageGUI.RefreshItems() in MagicStorage\StorageGUI.cs:line 69
   at MagicStorage.UI.States.BaseStorageUI.SetPage(String page) in MagicStorage\UI\States\BaseStorageUI.cs:line 284
   at MagicStorage.UI.States.BaseStorageUI.Open() in MagicStorage\UI\States\BaseStorageUI.cs:line 296
   at Terraria.UI.UIElement.Activate() in tModLoader\Terraria\UI\UIElement.cs:line 531
   at Terraria.UI.UserInterface.SetState(UIState state) in tModLoader\Terraria\UI\UserInterface.cs:line 287
   at MagicStorage.Common.Systems.MagicUI.OpenUI() in MagicStorage\Common\Systems\MagicUI.cs:line 279
   at MagicStorage.StoragePlayer.OpenStorage(Point16 point, Boolean remote) in MagicStorage\StoragePlayer.cs:line 116
   at MagicStorage.Components.StorageAccess.OpenStorage(Player player, Int32 i, Int32 j, Boolean remoteCrafting) in MagicStorage\Components\StorageAccess.cs:line 113
   at MagicStorage.Components.StorageAccess.RightClick(Int32 i, Int32 j) in MagicStorage\Components\StorageAccess.cs:line 62
   at MagicStorage.Components.CraftingAccess.RightClick(Int32 i, Int32 j) in MagicStorage\Components\CraftingAccess.cs:line 68
   at Terraria.ModLoader.TileLoader.RightClick(Int32 i, Int32 j) in tModLoader\Terraria\ModLoader\TileLoader.cs:line 758
   at Terraria.Player.TileInteractionsUse(Int32 myX, Int32 myY) in tModLoader\Terraria\Player.cs:line 23831
   at Terraria.Player.TileInteractionsCheck(Int32 myX, Int32 myY) in tModLoader\Terraria\Player.cs:line 22861
   at Terraria.Player.LookForTileInteractions() in tModLoader\Terraria\Player.cs:line 22769
   at DMD<Terraria.Player::Update>(Player this, Int32 i)
   at Terraria.Main.DoUpdateInWorld(Stopwatch sw) in tModLoader\Terraria\Main.cs:line 13522
   at Terraria.Main.DoUpdate(GameTime& gameTime) in tModLoader\Terraria\Main.cs:line 13168
   at DMD<Terraria.Main::Update>(Main this, GameTime gameTime)
   at RecursiveCraft.RecursiveCraft.ApplyKey(orig_Update orig, Main self, GameTime gameTime) in RecursiveCraft.cs:line 183
   at Microsoft.Xna.Framework.Game.Tick() in D:\a\tModLoader\tModLoader\FNA\src\Game.cs:line 546
   at Microsoft.Xna.Framework.Game.RunLoop() in D:\a\tModLoader\tModLoader\FNA\src\Game.cs:line 878
   at Microsoft.Xna.Framework.Game.Run() in D:\a\tModLoader\tModLoader\FNA\src\Game.cs:line 419
   at Terraria.Program.LaunchGame_(Boolean isServer) in tModLoader\Terraria\Program.cs:line 231
   at Terraria.Program.LaunchGame(String[] args, Boolean monoArgs) in tModLoader\Terraria\Program.cs:line 192
   at MonoLaunch.<>c__DisplayClass1_0.<Main>b__0() in tModLoader\Terraria\MonoLaunch.cs:line 56
   at System.Threading.Thread.StartCallback()

[00:19:30.774] [Main Thread/WARN] [tML]: Silently Caught Exception: 
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
   at MagicStorage.UI.States.CraftingUIState.RecipesPage.GetRecipe(Int32 slot, Int32& context) in MagicStorage\UI\States\CraftingUIState.cs:line 1058
   at MagicStorage.UI.NewUISlotZone.SetItemsAndContexts(Int32 count, GetItem getItem) in MagicStorage\UI\NewUISlotZone.cs:line 107
   at MagicStorage.CraftingGUI.RefreshItemsAndSpecificRecipes(Recipe[] toRefresh) in MagicStorage\CraftingGUI.cs:line 351
   at MagicStorage.StorageGUI.RefreshItems() in MagicStorage\StorageGUI.cs:line 69
   at MagicStorage.UI.States.BaseStorageUI.SetPage(String page) in MagicStorage\UI\States\BaseStorageUI.cs:line 284
   at MagicStorage.UI.States.BaseStorageUI.Open() in MagicStorage\UI\States\BaseStorageUI.cs:line 296
   at Terraria.UI.UIElement.Activate() in tModLoader\Terraria\UI\UIElement.cs:line 531
   at Terraria.UI.UserInterface.SetState(UIState state) in tModLoader\Terraria\UI\UserInterface.cs:line 287
   at MagicStorage.Common.Systems.MagicUI.OpenUI() in MagicStorage\Common\Systems\MagicUI.cs:line 279
   at MagicStorage.StoragePlayer.OpenStorage(Point16 point, Boolean remote) in MagicStorage\StoragePlayer.cs:line 116
   at MagicStorage.Components.StorageAccess.OpenStorage(Player player, Int32 i, Int32 j, Boolean remoteCrafting) in MagicStorage\Components\StorageAccess.cs:line 113
   at MagicStorage.Components.StorageAccess.RightClick(Int32 i, Int32 j) in MagicStorage\Components\StorageAccess.cs:line 62
   at MagicStorage.Components.CraftingAccess.RightClick(Int32 i, Int32 j) in MagicStorage\Components\CraftingAccess.cs:line 68
   at Terraria.ModLoader.TileLoader.RightClick(Int32 i, Int32 j) in tModLoader\Terraria\ModLoader\TileLoader.cs:line 758
   at Terraria.Player.TileInteractionsUse(Int32 myX, Int32 myY) in tModLoader\Terraria\Player.cs:line 23831
   at Terraria.Player.TileInteractionsCheck(Int32 myX, Int32 myY) in tModLoader\Terraria\Player.cs:line 22861
   at Terraria.Player.LookForTileInteractions() in tModLoader\Terraria\Player.cs:line 22769
   at DMD<Terraria.Player::Update>(Player this, Int32 i)
   at Terraria.Main.DoUpdateInWorld(Stopwatch sw) in tModLoader\Terraria\Main.cs:line 13522
   at Terraria.Main.DoUpdate(GameTime& gameTime) in tModLoader\Terraria\Main.cs:line 13168
   at DMD<Terraria.Main::Update>(Main this, GameTime gameTime)
   at RecursiveCraft.RecursiveCraft.ApplyKey(orig_Update orig, Main self, GameTime gameTime) in RecursiveCraft.cs:line 183
   at Microsoft.Xna.Framework.Game.Tick() in D:\a\tModLoader\tModLoader\FNA\src\Game.cs:line 546
   at Microsoft.Xna.Framework.Game.RunLoop() in D:\a\tModLoader\tModLoader\FNA\src\Game.cs:line 878
   at Microsoft.Xna.Framework.Game.Run() in D:\a\tModLoader\tModLoader\FNA\src\Game.cs:line 419
   at Terraria.Program.LaunchGame_(Boolean isServer) in tModLoader\Terraria\Program.cs:line 231
   at Terraria.Program.LaunchGame(String[] args, Boolean monoArgs) in tModLoader\Terraria\Program.cs:line 192
   at MonoLaunch.<>c__DisplayClass1_0.<Main>b__0() in tModLoader\Terraria\MonoLaunch.cs:line 56
   at System.Threading.Thread.StartCallback()

World and Player files attached: D.zip The_Wellfrightened_Barren.zip

odt1 avatar Nov 18 '22 21:11 odt1

Send full log

ExterminatorX99 avatar Nov 18 '22 22:11 ExterminatorX99

2022-11-14-41.zip

odt1 avatar Nov 18 '22 23:11 odt1

still happening, but for me randomly when I pick up item drops, character freezes, cant do anything and I hear constantly the item pickup sound, holding the inventory open shortcut pauses this bug, but inventory wont open, neither can I open the game menu, only ALT F4 can exit the game

FluffyDiscord avatar Nov 18 '23 18:11 FluffyDiscord