[SOLVED] [ERROR game] An error occured in the base update loop

Discussion in 'Mods' started by supulton, Oct 24, 2019.

  1. supulton

    supulton Yeah, You!

    This error seems to be a conflict in one of my mods, that I am trying to pin point.

    Most of my mods are updated versions found through either:
    https://mods.smapi.io/ OR https://community.playstarbound.com/threads/updating-mods-for-stardew-valley-1-3.142524/page-79

    I have uploaded the relevant log file (list of mods included) here: https://log.smapi.io/Rzf4B5Ki
    [00:12:42 ERROR game] An error occured in the base update loop:

    System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at Netcode.NetDictionary`5.Add(TKey key, TField field) in C:\GitlabRunner\builds\Gq5qA5P\0\ConcernedApe\stardewvalley\Farmer\Netcode\NetDictionary.cs:line 239

    at StardewValley.Events.SoundInTheNightEvent.makeChangesToLocation() in C:\GitlabRunner\build\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Events\SoundInTheNightEvent.cs:line 160

    The error occured right after going to bed -- I heard a strange, weird pixelated explosive sound during the Day Results screen, and endless loop of red error messages, with my file unable to save in a Multiplayer game. My partner received the same crash (we have the same set of mods). I fathom one of the mods is overwriting a night-time event that gives that explosive sound, hence the error pointing toward "SoundInTheNightEvent.cs:line 160", quite possibly a meteor explosion.

    The sad part is I have over 80 mods, and I'm unsure how to reproduce this error.

    I've googled around a few key error messages, specifically:
    "SoundInTheNightEvent.cs:line 160",
    "An error occured in the base update loop"
    and the results point to several possible mods I'm using.

    The "Better Sprinklers" mod pointed to here: https://github.com/avere001/sprinklers
    in the source code under sprinklers/StardewValleyCode/ I see a reference to SoundInTheNight, specifically here:

    Not sure if that is relevant, but I'm using the version found here:https://community.playstarbound.com...tardew-valley-1-3.142524/page-70#post-3334734

    The only other mod I can think of is this obscure one: https://www.nexusmods.com/stardewvalley/mods/2502?tab=posts BJSCapsuleMod whose function is to make rare events, which make the UFO or Stone owl appear more frequently -- again, I've never seen these events so I'm not sure if the sound I heard correlates to this mod. In the past, I hadn't used BJSCapsuleMod nor Better Sprinklers and I've gotten through the night with a meteor crashing on the farm (but I forget the sound it made, it happened only once).

    I might be wrong and it could be another mod entirely. Help pinpointing the conflict would be greatly appreciated : )
    • Pathoschild

      Pathoschild Cosmos Killer

      To narrow it down, does it happen...
      • every time if you try it again?
      • in single-player?
      • if you remove BJSCapsuleMod temporarily?
      If it still happens in all of those cases, can you...
      1. cause the issue again in single-player;
      2. post a link to your new SMAPI log;
      3. upload a zip of your save folder and Mods folder to a site like catbox, and post the link here?
      • supulton

        supulton Yeah, You!

        Sure, thank you for helping me try to narrow this down.

        So, according to my log, the error happened around 12:12am (end of the day in-game), so I've backed up my most recent save which started at 11:57pm (start of the day-in game).

        Currently running 93 mods.

        1) Does it happen: every time if you try it again?
        In Multiplayer: fast-forward to the end of the day with my partner (using CJB cheat), wait til 2am, let the game force us to bed. Another detail I forgot to mention: we had forgot to go to bed, so it was 2am in-game when the bug first happened.

        OK SO! Some news. This time, when the game forced us to bed, we heard the sound again...It sounded like an alien ufo/strange sound. However, the game actually saved and when we investigated the farm, we found TWO "Strange capsules" lingering beneath grandpa's memorial. I'm guessing one for me, and one for my partner.

        So, the strange sound did happen, but this time it saved correctly with no error loop, and I saw 2 Strange capsules the next day (Now I'm almost positive it's from the BJSCapsule mod lol, since only 1 out of a million players ever saw this).

        2) in single-player?
        Fast forward to end of the day on single-player (using CJB cheat), wait until 2am, let the game force me to bed. When I go outside, a Strange Capsule found in the same spot, but this time only one (signs definitely pointing to BJSCapsule mod). Strangely no crash again this time. I'm wondering if it was due to desyncing in multiplayer or just a fluke, I tried passing out in the basement this time like I did originally but seems it may have been a fluke..or some specific item interaction at the time of sleeping.

        3) Running with 92 mods, took out BJSCapsule, testing in single player. Lo and Behold, testing without the mod no crash, no sound, no BJSCapsule mod. This has assuredly narrowed it down to the BJSCapsule mod, though I was never able to replicate the crash again strangely.

        As I cannot seem to reproduce the crash, I'm going to upload a copy of my save folder for posterity's sake:

        Though since I cannot seem to reproduce the game loop bug/crash, I'm going to just hazard to say it was a fluke...
        My last test will be to try and play out the day as normal (no fast forwarding) with my partner in multiplayer to see if anything happens. If nothing happens, I'll consider it a strange fluke or net error and mark it solved.
        • supulton

          supulton Yeah, You!

          OK, I was finally able to reproduce the bug. Attached the image.

          Basically, I went through the day as normal in multiplayer, and slept in the bed this time (No passing out on the floor). Since the bug seems to be happening intermittently, I'm going to chalk it up to the BJSCapsuleMod mod and remove it for now....a very interesting mod nonetheless, but I prefer to focus on stability in the mods I use.

            Attached Files:

          Share This Page