SMAPI help needed, not sure how to fix errors

sebstrife

Cowpoke
Platform Windows - Steam
Game version Newest? I downloaded 3 days ago from Steam
SMAPI log https://smapi.io/log/46ea256f4a0f45ad802381fc4fbc5425
Steps to reproduce Possibly relevant info: I can load my save and play without these errors (loading is extremely slow, but probably because my computer sucks). It's only when I start a split screen 2 player game that these errors start to load. I have not played far solo (aka never slept), as the whole reason I got this was to play with my sister.
Expected vs Actual results I can usually still get into the game and play even in split screen, but about 90% of the time sleeping/saving crashes the game.

I also see it's telling me to update Industrial Furniture Set for CF from 1.6.0 to 1.8.0, but there is no update for the CF version, which is the one I want to use. I don't want to use the CP version and replace base furniture, I want them for sale. I think I'm using a different mod in CP, so I tried to only have one CP furniture and the rest as CF.

Attached images of my mod folder.
 

Attachments

Thanks for the logs, and testing. From what I can tell there's a few errors in the logs.

The first set seem to be crafting recipe conflicts:
Code:
14:50:45    ERROR    Json Assets    Exception injecting crafting recipe for Hero Elixir: System.NullReferenceException: Object reference not set to an instance of an object.
   at JsonAssets.Mod.ResolveObjectId(Object data) in C:\Programming\StardewValley\ModSource\JsonAssets\Mod.cs:line 1692
   at JsonAssets.Data.ObjectRecipe.GetRecipeString(ObjectData parent) in C:\Programming\StardewValley\ModSource\JsonAssets\Data\ObjectRecipe.cs:line 34
   at JsonAssets.Framework.ContentInjector1.InjectDataCraftingRecipes(IAssetData asset) in C:\Programming\StardewValley\ModSource\JsonAssets\Framework\ContentInjector1.cs:line 165
14:50:45    TRACE    SMAPI    Json Assets edited Data/CraftingRecipes.
14:50:45    TRACE    SMAPI    Everlasting Baits And Unbreakable Tackles Mod edited Data/CraftingRecipes.
14:50:45    ERROR    Raised Garden Beds    Mod crashed when editing asset 'Data/CraftingRecipes', which may cause errors in-game. Error details:
NullReferenceException: Object reference not set to an instance of an object.
   at StardewValley.Utility.fuzzyItemSearch(String query, Int32 stack_count) in stardewvalley\Farmer\Farmer\Utility.cs:line 359
   at RaisedGardenBeds.ItemDefinition.ParseRecipeIngredients(ItemDefinition data) in E:\Dev\Projects\SDV\Projects\RaisedGardenBeds\RaisedGardenBeds\ItemDefinition.cs:line 102
   at RaisedGardenBeds.AssetManager.Edit[T](IAssetData asset) in E:\Dev\Projects\SDV\Projects\RaisedGardenBeds\RaisedGardenBeds\AssetManager.cs:line 198
   at StardewModdingAPI.Framework.ContentManagers.GameContentManager.ApplyEditors[T](IAssetInfo info, IAssetData asset) in SMAPI\Framework\ContentManagers\GameContentManager.cs:line 224
14:50:56    TRACE    SMAPI    Json Assets edited Data/CraftingRecipes.
18:58:57    DEBUG    Better Crafting    [RecipeManager] Loaded 87 cooking recipes and 204 crafting recipes.
Seems to be the ones from SDV Expanded, and Raised Garden Beds that are specifically in error. Though, it's possible there may be conflict with Better Crafting as well.


The other big error I see that occurs in your 2nd log is this:
Code:
20:03:17    WARN    Deep Woods    BeforeSave event was called twice in a row. Ignoring second call.
20:03:25    ERROR    SMAPI    An error occurred in the overridden update loop: InvalidOperationException: There was an error generating the XML document.
 ---> InvalidOperationException: The type DeepWoodsMod.DeepWoods was not expected. Use the XmlInclude or SoapInclude attribute to specify types that are not known statically.
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterSaveGame.Write188_GameLocation_PatchedBy<Platonymous.PyTK.Rev>(XmlSerializationWriterSaveGame this, String n, String ns, GameLocation o, Boolean isNullable, Boolean needType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterSaveGame.Write236_SaveGame_PatchedBy<Platonymous.PyTK.Rev>(XmlSerializationWriterSaveGame this, String n, String ns, SaveGame o, Boolean isNullable, Boolean needType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterSaveGame.Write237_SaveGame(Object o)
   --- End of inner exception stack trace ---
   at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
   at SpaceCore.Patches.SaveGamePatcher.SerializeProxy(XmlSerializer serializer, XmlWriter origWriter, Object obj) in C:\Programming\StardewValley\ModSource\SpaceCore\Patches\SaveGamePatcher.cs:line 401
   at StardewValley.SaveGame+<getSaveEnumerator>d__90.MoveNext_PatchedBy<spacechase0.SpaceCore>(<getSaveEnumerator>d__90 this)
   at StardewValley.SaveGame.Save()+MoveNext()
   at StardewValley.Menus.SaveGameMenu.update_PatchedBy<spacechase0.SpaceCore>(SaveGameMenu this, GameTime time)
   at StardewValley.Menus.ShippingMenu.update(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) in SMAPI\Framework\SCore.cs:line 712
Seems PyTK, and SpaceCore both work on the save data. In this case PyTK crashes first when encountering DeepWoods data.

---
You may want to try removing a couple of the aforementioned mods, and test further.
I'd start with trying to remove Raised Garden Beds or Better Crafting on the recipe side of things.
And, removing DeepWoods on the save side of stuff. As PyTK is a core framework mod.

Either way there will be a few errors as SMAPI cleans things up. But, give that a try.
 

sebstrife

Cowpoke
Thanks for the logs, and testing. From what I can tell there's a few errors in the logs.

The first set seem to be crafting recipe conflicts:
Code:
14:50:45    ERROR    Json Assets    Exception injecting crafting recipe for Hero Elixir: System.NullReferenceException: Object reference not set to an instance of an object.
   at JsonAssets.Mod.ResolveObjectId(Object data) in C:\Programming\StardewValley\ModSource\JsonAssets\Mod.cs:line 1692
   at JsonAssets.Data.ObjectRecipe.GetRecipeString(ObjectData parent) in C:\Programming\StardewValley\ModSource\JsonAssets\Data\ObjectRecipe.cs:line 34
   at JsonAssets.Framework.ContentInjector1.InjectDataCraftingRecipes(IAssetData asset) in C:\Programming\StardewValley\ModSource\JsonAssets\Framework\ContentInjector1.cs:line 165
14:50:45    TRACE    SMAPI    Json Assets edited Data/CraftingRecipes.
14:50:45    TRACE    SMAPI    Everlasting Baits And Unbreakable Tackles Mod edited Data/CraftingRecipes.
14:50:45    ERROR    Raised Garden Beds    Mod crashed when editing asset 'Data/CraftingRecipes', which may cause errors in-game. Error details:
NullReferenceException: Object reference not set to an instance of an object.
   at StardewValley.Utility.fuzzyItemSearch(String query, Int32 stack_count) in stardewvalley\Farmer\Farmer\Utility.cs:line 359
   at RaisedGardenBeds.ItemDefinition.ParseRecipeIngredients(ItemDefinition data) in E:\Dev\Projects\SDV\Projects\RaisedGardenBeds\RaisedGardenBeds\ItemDefinition.cs:line 102
   at RaisedGardenBeds.AssetManager.Edit[T](IAssetData asset) in E:\Dev\Projects\SDV\Projects\RaisedGardenBeds\RaisedGardenBeds\AssetManager.cs:line 198
   at StardewModdingAPI.Framework.ContentManagers.GameContentManager.ApplyEditors[T](IAssetInfo info, IAssetData asset) in SMAPI\Framework\ContentManagers\GameContentManager.cs:line 224
14:50:56    TRACE    SMAPI    Json Assets edited Data/CraftingRecipes.
18:58:57    DEBUG    Better Crafting    [RecipeManager] Loaded 87 cooking recipes and 204 crafting recipes.
Seems to be the ones from SDV Expanded, and Raised Garden Beds that are specifically in error. Though, it's possible there may be conflict with Better Crafting as well.


The other big error I see that occurs in your 2nd log is this:
Code:
20:03:17    WARN    Deep Woods    BeforeSave event was called twice in a row. Ignoring second call.
20:03:25    ERROR    SMAPI    An error occurred in the overridden update loop: InvalidOperationException: There was an error generating the XML document.
---> InvalidOperationException: The type DeepWoodsMod.DeepWoods was not expected. Use the XmlInclude or SoapInclude attribute to specify types that are not known statically.
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterSaveGame.Write188_GameLocation_PatchedBy<Platonymous.PyTK.Rev>(XmlSerializationWriterSaveGame this, String n, String ns, GameLocation o, Boolean isNullable, Boolean needType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterSaveGame.Write236_SaveGame_PatchedBy<Platonymous.PyTK.Rev>(XmlSerializationWriterSaveGame this, String n, String ns, SaveGame o, Boolean isNullable, Boolean needType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterSaveGame.Write237_SaveGame(Object o)
   --- End of inner exception stack trace ---
   at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
   at SpaceCore.Patches.SaveGamePatcher.SerializeProxy(XmlSerializer serializer, XmlWriter origWriter, Object obj) in C:\Programming\StardewValley\ModSource\SpaceCore\Patches\SaveGamePatcher.cs:line 401
   at StardewValley.SaveGame+<getSaveEnumerator>d__90.MoveNext_PatchedBy<spacechase0.SpaceCore>(<getSaveEnumerator>d__90 this)
   at StardewValley.SaveGame.Save()+MoveNext()
   at StardewValley.Menus.SaveGameMenu.update_PatchedBy<spacechase0.SpaceCore>(SaveGameMenu this, GameTime time)
   at StardewValley.Menus.ShippingMenu.update(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) in SMAPI\Framework\SCore.cs:line 712
Seems PyTK, and SpaceCore both work on the save data. In this case PyTK crashes first when encountering DeepWoods data.

---
You may want to try removing a couple of the aforementioned mods, and test further.
I'd start with trying to remove Raised Garden Beds or Better Crafting on the recipe side of things.
And, removing DeepWoods on the save side of stuff. As PyTK is a core framework mod.

Either way there will be a few errors as SMAPI cleans things up. But, give that a try.
Thank you! Removing Raised garden beds and DeepWoods fixed most of the errors, and all the game breaking ones. I'm still getting the Json Asset errors for SVE, so maybe those are connected to Better Crafting. I'm going to try putting Raised Garden Beds back in and remove Better Crafting and see if that fixes everything. Thank you again for breaking this down for me!!!
 
Last edited:

sebstrife

Cowpoke
So I tried putting Raised Garden Beds back in and removing Better Crafting. Better Crafting was not the issue, I'm still getting the same Json Asset issues for SVE with or without Better Crafting. The garden beds don't work either so I just removed those for now as they do seem to be the one that is game crashing. The Json Assets aren't game breaking thankfully.
 
So I tried putting Raised Garden Beds back in and removing Better Crafting. Better Crafting was not the issue, I'm still getting the same Json Asset issues for SVE with or without Better Crafting. The garden beds don't work either so I just removed those for now as they do seem to be the one that is game crashing. The Json Assets aren't game breaking thankfully.
Interesting, and thanks for testing further!

I've been trying to take a closer look at the error for the JA mods; specifically the ones from SDV Expanded. Maybe JA doesn't like the formatting of the data files for those recipes.
As I saw your comment on the SDV Expanded mod page, and the user you replied to also has the same 4 recipes in error.
And, that 'ObjectRecipe.cs:line 34' that y'all see is an error from JsonAssets itself; internally.
---
Can you try one more thing for me? I've added a slightly tweaked data file for the Hero Elixir.

Replace your current version with this one.
Location in your game folder: Mods\Stardew Valley Expanded\[JA] Stardew Valley Expanded\Objects\

Then do another test of the game, and post a new log. I'm a little curious if it'll go down to 3 errors, and fix the "Hero Elixir" item.

--
Those 4 recipes/objects by SDV Expanded.
They use a few vanilla game items, but instead of using the ObjectID numbers from the ObjectInformation file. SDV Expanded is using the names; like you would for a custom object. Perhaps, in a weird way it's confusing JsonAssets in Multiplayer?
 

Attachments

sebstrife

Cowpoke
Interesting, and thanks for testing further!

I've been trying to take a closer look at the error for the JA mods; specifically the ones from SDV Expanded. Maybe JA doesn't like the formatting of the data files for those recipes.
As I saw your comment on the SDV Expanded mod page, and the user you replied to also has the same 4 recipes in error.
And, that 'ObjectRecipe.cs:line 34' that y'all see is an error from JsonAssets itself; internally.
---
Can you try one more thing for me? I've added a slightly tweaked data file for the Hero Elixir.

Replace your current version with this one.
Location in your game folder: Mods\Stardew Valley Expanded\[JA] Stardew Valley Expanded\Objects\

Then do another test of the game, and post a new log. I'm a little curious if it'll go down to 3 errors, and fix the "Hero Elixir" item.

--
Those 4 recipes/objects by SDV Expanded.
They use a few vanilla game items, but instead of using the ObjectID numbers from the ObjectInformation file. SDV Expanded is using the names; like you would for a custom object. Perhaps, in a weird way it's confusing JsonAssets in Multiplayer?
That did fix it!!

https://smapi.io/log/3758538076fd4889acacfd93ba0a21ef

Is it easy to make the other 3? I don't want to burden you if it is hard to make! But I'd love to fix them if I can~
 
That did fix it!!

https://smapi.io/log/3758538076fd4889acacfd93ba0a21ef

Is it easy to make the other 3? I don't want to burden you if it is hard to make! But I'd love to fix them if I can~
Thanks for checking, and glad to hear that worked!

No worries, it's easy. Here's the other 3 recipes for the SDV Expanded items.

I guess I'll go add a comment to you, & the other persons discussion detailing the cause & fix for the SDV Expanded devs.
So, they can push the fix out to everyone.
 

Attachments

Last edited:

sebstrife

Cowpoke
Thanks for checking, and glad to hear that worked!

No worries, it's easy. Here's the other 3 recipes for the SDV Expanded items.

I guess I'll go add a comment to you, & the other persons discussion detailing the cause & fix for the SDV Expanded devs.
So, they can push the fix out to everyone.
Thank you so so so much for your help and for the fixes!!! Seriously, you are the best!!!
 

sebstrife

Cowpoke
So a quick update, the fixes worked to get rid of errors, but then it wasn't possible to play multiplayer anymore. The game kept crashing. So I reverted back to the broken ones and it works again... so yeah that's annoying lol
 
So a quick update, the fixes worked to get rid of errors, but then it wasn't possible to play multiplayer anymore. The game kept crashing. So I reverted back to the broken ones and it works again... so yeah that's annoying lol
Hrm, odd.
Do you have a new log for the crash with the fixes?
 

wren._.faire

Newcomer
Interesting, and thanks for testing further!

I've been trying to take a closer look at the error for the JA mods; specifically the ones from SDV Expanded. Maybe JA doesn't like the formatting of the data files for those recipes.
As I saw your comment on the SDV Expanded mod page, and the user you replied to also has the same 4 recipes in error.
And, that 'ObjectRecipe.cs:line 34' that y'all see is an error from JsonAssets itself; internally.
---
Can you try one more thing for me? I've added a slightly tweaked data file for the Hero Elixir.

Replace your current version with this one.
Location in your game folder: Mods\Stardew Valley Expanded\[JA] Stardew Valley Expanded\Objects\

Then do another test of the game, and post a new log. I'm a little curious if it'll go down to 3 errors, and fix the "Hero Elixir" item.

--
Those 4 recipes/objects by SDV Expanded.
They use a few vanilla game items, but instead of using the ObjectID numbers from the ObjectInformation file. SDV Expanded is using the names; like you would for a custom object. Perhaps, in a weird way it's confusing JsonAssets in Multiplayer?
I'm having a similar issue with my Json Assets but the log parser site refuses to load for me T.T
However mine is for different recipes and it's talking about 'an item with the same key has already been added'.... I know it's been forever since this thread but do you think you can help me out?
 
Top