1. This forum is archived for reference. For support & bug reports visit the help section of forums.stardewvalley.net

Bug/Issue Switch - Corrupted save file? Sleep crash bug

Discussion in 'Support' started by Typhoon, Oct 7, 2017.

  1. Typhoon

    Typhoon Spaceman Spiff

    Do you have a fridge? (it's in the kitchen if you extended your house). If so, empty the contents of the fridge into a chest at the end of the day. Please let us know if that works.
     
    • Darkexy

      Darkexy Space Hobo

      Hi there,
      don't know if its important, but empty the fridge solved it for me.
      I stuck on 20. winter and did the day 3-4 times and it didn't change, like the tries before earlier in Winter. Then I empty the fridge and did the same things as before and it worked.
      I empty the fridge, did my fields, did the animals and go down into the mines that day.
       
        Typhoon likes this.
      • Typhoon

        Typhoon Spaceman Spiff

        Another tip that can be used by some until the game is patched:

        "So I never use my fridge. I don't cook in the game. So whenever my game started crashing, I had to run some diagnostics.

        Upgrading my tool of choice to gold level was causing it. But I had to get the upgrade, spring is around the corner and I need my watering can. Switching which tool to upgrade didn't help. Emptying my inventory didn't help.

        However. I filled my fridge up with a bunch of random things cause I know that the fridge is a primary cause for crashing. I don't cook, so I didn't think that I would have triggered anything to make it crash. But having the fridge completely filled up, it just worked. My inventory happened to be empty, but I'm not sure it was necessary.

        TLDR - fill up your fridge with junk to potentially fix sleep crash"


        https://www.reddit.com/r/StardewValley/comments/76wpqr/potential_fix_for_sleep_crash/
         
        • Emenia

          Emenia Void-Bound Voyager

          I'm so mad right now. I was iridium farming and this error occurred not just once but TWICE in a row upon trying to save. :( I wouldn't be so mad if iridium farming didn't take up literally an hour of real time to do in between saves!
           
          • Typhoon

            Typhoon Spaceman Spiff

            Have you tried the fridge workaround now? (empty your fridge into a nearby just before going to sleep). This fixes the bug for most people until Chucklefish release a patch.
             
            • tccoxon

              tccoxon Procedurally Generated Programmer

              Hi everyone. Just posting with an update on the crashing while sleeping issue to help people avoid the issue, and to clear up some misinformation.

              There are two things that need to happen in order to cause the crash:
              1. At least one of the following core tool items must not be in your inventory when you sleep: Pickaxe, Axe, Hoe, Watering Can, Scythe. If you have the Return Scepter, that counts too.
              2. At least one of your chest-like containers must have a gap between two items. This includes chests you've crafted, the fridge in the farmhouse upgrade, and the containers on the Mill and Junimo Hut buildings. It doesn't include the chests that spawn every 10 levels in the mines.
              The crash happens when the game scans your inventory and chests to make sure none of your tools are missing. When it encounters a gap in the chest, it causes an error. The PC and other console versions are able to handle the error and keep running, however the Switch version cannot.

              The crash doesn't require you to upgrade any tools (although that is one way you can end up sleeping without tools in your inventory). And it doesn't require the fridge.

              That said, it's surprisingly not very easy to create a gap in a chest. Simply adding or removing items from a chest automatically removes all the gaps. There are only two ways we know of:
              • With the house upgrade that provides the kitchen, cook some food that uses ingredients in the fridge. That can create a gap in the fridge.
              • With a full inventory, open a chest and directly trash an item from it.
              We're advising players who are encountering this crash to add or remove an item from each of their chests. You can continue using the fridge to cook food, as long as you manually add/remove something from it afterwards. Upgrading tools causes no problems as long as there are no gaps in any chests.

              We believe that this accounts for all of the sleep crashes that people are reporting, and there is a fix for the issue in the patch we're preparing.

              Note that the crash occurs long before writing anything to your save file, so nothing is permanently damaged. And even if it did crash while saving - Stardew on Switch writes save files atomically, so nothing would be corrupted in that case. That said, there are a small number of people reporting a crash while loading their save file. We think this is a separate issue and we're looking into it. Anyone encountering a crash while loading their save file is encouraged to contact us.

              EDIT: I shouldn't have used the word 'sort'. The 'organize' button in chest interfaces doesn't remove gaps, it just shifts them around. I've edited the text to say to 'add or remove an item.'
               
                Last edited: Oct 19, 2017
              • Typhoon

                Typhoon Spaceman Spiff

                @tccoxon - many thanks for that very detailed update and all that you and the team have done so far.

                I know you'll hate this question but others will understandably want to know so I'll ask anyway: when do you envisage releasing a patch? No doubt you wish to eliminate all of the crash bugs first, but are we still looking at perhaps at least a week before a patch is made available to players to download?

                Also, and just out of interest, when you have a patch ready presumably it needs to be approved by Nintendo before release? If so, how long does Nintendo's part of the process normally take?
                 
                • tccoxon

                  tccoxon Procedurally Generated Programmer

                  There are a few more bugs we want to fix, and we want to spend a while QA'ing the patch before we submit it as well. I can't be specific about Nintendo's processes, but it could be a few weeks until the patch gets final approval and release.
                   
                    Alisuu likes this.
                  • Typhoon

                    Typhoon Spaceman Spiff

                    Noted, thanks.
                     
                    • happyzappy

                      happyzappy Space Hobo

                      Hey all,

                      Just wanted to add my experience as well.

                      I was getting the sleep crashing/saving bug on day 3 of winter year 1. Repeated it about 4 times and just tried the fridge trick. I made a new chest, put it near my fridge, and transferred everything over before sleeping. Everything else I did the same that day (except cooking but I don’t suspect cooking is a problem). And it actually worked! I’m now on winter day 4!

                      Thanks everyone for communicating and figuring this out! Repeating the day over and over was getting super frustrating.

                      Edit: Just read the details of the crash above by tccoxon. I must have created a gap in my fridge when cooking and not realized it.
                       
                        Last edited: Oct 18, 2017
                      • Typhoon

                        Typhoon Spaceman Spiff

                        "I experienced a slightly different version of the bug.

                        I cooked food from the fridge, leaving a gap. I also had a tool being upgraded at the time. I noticed the gap and tried to sort the fridge but sorting left the gap there and instead just moved its position. I ended up sorting 4-6 more times before the gap finally disappeared.

                        That night when I went to sleep the game crashed."


                        https://www.reddit.com/r/StardewVal...ers_update_from_chucklefish_games_on/dojpsr2/

                        further update on how it was fixed:

                        "I just manually moved the food into my inventory before cooking instead which fixed the issue. I might see if I can reproduce my specific version later tonight. Having to sort multiple times was very weird, I felt like crash was about to happen as soon as I saw it."
                         
                          Last edited: Oct 18, 2017
                        • Typhoon

                          Typhoon Spaceman Spiff

                          @tccoxon - here's an interesting reply on Reddit regarding your highly informative post about the sleep crash bug:

                          From your post: "You can continue using the fridge to cook food, as long as you sort it afterwards."

                          Reddit poster then states:


                          "This is not actually correct, and I can reproduce it 100% consistently in less than a minute every morning.


                          1. Put items in the fridge in a order that will cause a gap when you cook.
                          2. Cook the recipe.
                          3. Open the fridge, observe existence of gap.
                          4. Press the "Sort" button on the right side of the chest.
                          5. Observe the sorting algorithm get confused and put the gap in a different location in the list.
                          6. Repeat pressing "Sort" button.
                          7. Observe order of items in the chest changing chaotically including position of the gap.
                          8. Repeat until the gap is no longer visible and the sorting algorithm stops shifting items around strangely.
                          9. Go to bed.
                          10. Crash.

                          This is 100% consistent and repeatable. The Sort Button DOES NOT fix the glitched inventory slot that causes the crash."

                          https://www.reddit.com/r/NintendoSw...dew_valley_on_the_switch_update_from/dok48n1/


                          Any thoughts on the above please?

                          Thanks
                           
                          • BrunoLadeia

                            BrunoLadeia Space Hobo

                            Did everything, removed all gaps, and still crashing. Waiting for a solution. Waited a long time to play on the NSwitch and now have to wait again for the fix. And now i know that you dont have a clue of what is happening...
                             
                            • Alisuu

                              Alisuu Space Spelunker

                              What were you actions during the day that caused you to crash when going to sleep? The most common cause is now found and while the solution was presented poorly (purely just sorting the fridge with the sort button is not enough) it is found that for that most common cause, adding item into the fridge is sufficient help. If your crash is caused by something else, there needs to be more details. No one can fix it if you don't tell what's going on.
                               
                              • Toneless

                                Toneless Space Hobo

                                Having this issue. Doesn't seem to be completely related to just mining for me. I completed the pantry and bulletin bundles and it crashed that night after going about my day and selling stuff.

                                I managed to get passed this day by just completing bundles and sleeping. Now when i go to the desert it crashes everytime i sleep. Im in spring yr 2.


                                I will try the fridge/chest thing and report back

                                Fridge thing seems to have fixed it so far. Been playing all day with no issues.
                                 
                                  Last edited: Oct 19, 2017
                                • Alisuu

                                  Alisuu Space Spelunker

                                  For the known cause, the trigger seems to be missing any tools from your inventory (the container order only matters of tools are missing in main inventory) have you left any tools either to be upgraded, or into other chests?
                                   
                                  • Typhoon

                                    Typhoon Spaceman Spiff

                                    Seems to me that using the sort (Organize) button is not the answer for everyone. For example, as a follow up to the post above (https://community.playstarbound.com...e-sleep-crash-bug.137961/page-13#post-3227101):

                                    "Yes. Also I should emphasize that when doing the above test that I am NOT currently crashing until after I have prepped the glitched inventory state. The above steps are alternatively worded as follows:

                                    1. Start in a non-crashing state.
                                    2. Immediately go to fridge after waking up.
                                    3. Intentionally setting up the crash requirements.
                                    4. Confirming visually that the glitch inventory state has been created.
                                    5. Apply proposed fix.
                                    6. Go to bed, crash anyway despite fix.

                                    Its not that I can't avoid the crash, I just have to not completely drain a fridge slot while cooking. My report is rather that "Pressing the sort button does not terminate the preprepared crash state."


                                    TL;DR:

                                    • Correct: OP's description of how to enter the glitch state that will cause the crash
                                    • Correct: OP's description of how to prevent entering the glitch state.
                                    • Incorrect: OP's description of how to exit the glitch state after you have entered it by pressing the "sort button"

                                    And I can consistently reproduce all three of the above bullet points."


                                    https://www.reddit.com/r/NintendoSw...dew_valley_on_the_switch_update_from/dok93qv/


                                    Also this:

                                    "I experienced a slightly different version of the bug.


                                    I cooked food from the fridge, leaving a gap. I also had a tool being upgraded at the time. I noticed the gap and tried to sort the fridge but sorting left the gap there and instead just moved its position. I ended up sorting 4-6 more times before the gap finally disappeared.


                                    That night when I went to sleep the game crashed."


                                    https://www.reddit.com/r/StardewVal...ers_update_from_chucklefish_games_on/dojpsr2/


                                    and this:

                                    "This happens to me every time I try to sort my main inventory. I have to sort multiple times to fill in gaps and sometimes I'm still left with gaps that just shuffle around endlessly near the end of my inventory."

                                    https://www.reddit.com/r/StardewVal...ers_update_from_chucklefish_games_on/dokr60v/



                                    Any thoughts from Chucklefish on this please? Clarification is required. :) Thank you.
                                     
                                      Last edited: Oct 19, 2017
                                    • Marcats5

                                      Marcats5 Space Hobo

                                      I was having the crash consistently. This is what I did to fix::

                                      -Sort all chests
                                      -Sort Fridge
                                      -Place all tools into a chest before sleeping.


                                      Consistent saving after this. Do NOT sleep without removing all tools from backpack into a chest.

                                      Hopefully patch will fix this.
                                       
                                      • Toneless

                                        Toneless Space Hobo

                                        Having this issue. Doesn't seem to be completely related to just mining for me. I completed the pantry and bulletin bundles and it crashed that night after going about my day and selling stuff.

                                        I managed to get passed this day by just completing bundles and sleeping. Now when i go to the desert it crashes everytime i sleep. Im in spring yr 2.
                                        No, no missing or tools in shop. I had gaps in my fridge from cooking though.
                                         
                                        • Typhoon

                                          Typhoon Spaceman Spiff

                                          Trying emptying the fridge contents into a nearby chest before sleeping.
                                           

                                          Share This Page