Pathoschild / StardewMods

Mods for Stardew Valley using SMAPI.
MIT License
690 stars 374 forks source link

[Content Patcher] Parameter 'name' cannot be null Error. #820

Closed DeLiXx closed 1 year ago

DeLiXx commented 1 year ago

Cape Stardew is using Content Patcher to edit Unlockable Bundles UnlockableBundles/Bundles asset. Initial asset load: link Asset model: link

In previous versions of Cape some users reported the following error:

Patch error: CapeStardew > Include Data/CapeUnlockableBundles.json > EditData UnlockableBundles/Bundles #2 failed on context update (see log file for details).
Value cannot be null. (Parameter 'name')

Smapi Log

But the error did not happen for either of us. I was able to reproduce it by chance when testing their mod. Commenting out "When" conditions caused this error, which led me to believe that having two seperate changes with the same action, target and when conditions in the same file caused it. The latest version of Cape however now always throws this error when starting a new game, but not when loading a existing game.

User SMAPI log Reproduced SMAPI log

To reproduce:

  1. Install Cape Stardew
  2. Create a new single player game

Attached is a minimum viable product version of Cape, which only requires Unlockable Bundles and JsonAssets to run. Cape Stardew MVP.zip

DeLiXx commented 1 year ago

Hello, I recognise you're quite busy with 1.6 at the moment, but could you perhaps provide a ETA for when you're able to address this issue?

DeLiXx commented 1 year ago

Issue can be closed

Pathoschild commented 1 year ago

This specific case was fixed in Unlockable Bundles, but the upcoming Content Patcher 1.29.5 no longer tries to apply non-ready tokens to the JSON structure. The patch will now correctly be marked non-ready instead. Thanks for reporting it!