Game crashes if I try to cook in the kitchen

Arnvid

Newcomer
Dear community,

I have several mods installed and have spent the last few hours trying to identify an issue that just appeared after 50 hours of playtime. Whenever I try to cook something in my farmhouse kitchen, the game crashes. I’m seeing the following error in the SMAPI console. I am thankful for any hint ... :)



Code:
[game] An error occurred in the base update loop: ArgumentException: An item with the same key has already been added. Key: 1
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at StardewValley.CraftingRecipe..ctor(String name, Boolean isCookingRecipe) in D:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\CraftingRecipe.cs:line 122
   at SpaceCore.Patches.CraftingRecipePatcher.RedirectedCreateRecipe(String name, Boolean isCooking) in C:\Users\space\Programming\Modding\StardewValley\StardewValleyMods\framework\SpaceCore\Patches\CraftingRecipePatcher.cs:line 167
   at StardewValley.Menus.CraftingPage.layoutRecipes_PatchedBy<spacechase0.SpaceCore>(CraftingPage this, List`1 playerRecipes)
   at StardewValley.Menus.CraftingPage.RepositionElements()
   at StardewValley.Menus.CraftingPage..ctor_PatchedBy<spacechase0.BiggerBackpack>(CraftingPage this, Int32 x, Int32 y, Int32 width, Int32 height, Boolean cooking, Boolean standaloneMenu, List`1 materialContainers)
   at StardewValley.GameLocation.<>c__DisplayClass385_0.<ActivateKitchen>b__0(MultipleMutexRequest request)
   at StardewValley.Network.NetMutex.Update(FarmerCollection farmers)
   at StardewValley.Objects.Chest.updateWhenCurrentLocation(GameTime time)
   at StardewValley.Locations.FarmHouse.UpdateWhenCurrentLocation(GameTime time)
   at StardewValley.Game1._UpdateLocation(GameLocation location, GameTime time)
   at StardewValley.Game1.<>c__DisplayClass735_0.<UpdateLocations>b__0(GameLocation location)
   at StardewValley.Utility.ForEachLocation(Func`2 action, Boolean includeInteriors, Boolean includeGenerated)
   at StardewValley.Game1.UpdateLocations_PatchedBy<spacechase0.SpaceCore>(Game1 this, GameTime time)
   at StardewValley.Game1._update(GameTime gameTime)
   at StardewValley.Game1.Update(GameTime gameTime)
   at StardewModdingAPI.Framework.SCore.OnPlayerInstanceUpdating(SGame instance, GameTime gameTime, Action runUpdate)
 

CoLdFrYr

Greenhorn
It's hard to get a reply from anyone here....I have posted asking for help with not even a reply. I seen you asking with no replies as well so I'm not the only one. Hope you get help
 

BeenASon

Local Legend
Dear community,

I have several mods installed and have spent the last few hours trying to identify an issue that just appeared after 50 hours of playtime. Whenever I try to cook something in my farmhouse kitchen, the game crashes. I’m seeing the following error in the SMAPI console. I am thankful for any hint ... :)



Code:
[game] An error occurred in the base update loop: ArgumentException: An item with the same key has already been added. Key: 1
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at StardewValley.CraftingRecipe..ctor(String name, Boolean isCookingRecipe) in D:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\CraftingRecipe.cs:line 122
   at SpaceCore.Patches.CraftingRecipePatcher.RedirectedCreateRecipe(String name, Boolean isCooking) in C:\Users\space\Programming\Modding\StardewValley\StardewValleyMods\framework\SpaceCore\Patches\CraftingRecipePatcher.cs:line 167
   at StardewValley.Menus.CraftingPage.layoutRecipes_PatchedBy<spacechase0.SpaceCore>(CraftingPage this, List`1 playerRecipes)
   at StardewValley.Menus.CraftingPage.RepositionElements()
   at StardewValley.Menus.CraftingPage..ctor_PatchedBy<spacechase0.BiggerBackpack>(CraftingPage this, Int32 x, Int32 y, Int32 width, Int32 height, Boolean cooking, Boolean standaloneMenu, List`1 materialContainers)
   at StardewValley.GameLocation.<>c__DisplayClass385_0.<ActivateKitchen>b__0(MultipleMutexRequest request)
   at StardewValley.Network.NetMutex.Update(FarmerCollection farmers)
   at StardewValley.Objects.Chest.updateWhenCurrentLocation(GameTime time)
   at StardewValley.Locations.FarmHouse.UpdateWhenCurrentLocation(GameTime time)
   at StardewValley.Game1._UpdateLocation(GameLocation location, GameTime time)
   at StardewValley.Game1.<>c__DisplayClass735_0.<UpdateLocations>b__0(GameLocation location)
   at StardewValley.Utility.ForEachLocation(Func`2 action, Boolean includeInteriors, Boolean includeGenerated)
   at StardewValley.Game1.UpdateLocations_PatchedBy<spacechase0.SpaceCore>(Game1 this, GameTime time)
   at StardewValley.Game1._update(GameTime gameTime)
   at StardewValley.Game1.Update(GameTime gameTime)
   at StardewModdingAPI.Framework.SCore.OnPlayerInstanceUpdating(SGame instance, GameTime gameTime, Action runUpdate)
It seems like one of your mods messed up the keys of the cooking items. And it probably swapped the keys for another thing which already exists so it glitches. Try deleting any cooking related mods.
 
Top