Tool SMAPI: Stardew Modding API

Discussion in 'Mods' started by ClxS, Mar 6, 2016.

  1. Pathoschild

    Pathoschild Oxygen Tank

    Unfortunately we can't directly diagnose errors in the game's Update method (see proposed game change to fix that). Here are some things to try:
    1. Update to the latest version of SMAPI.
    2. Remove all your SMAPI mods temporarily; does it still happen? If not, reinstall your mods one at a time until it starts happening again.
    3. If it still happens with no SMAPI mods installed, try resetting your content files.
    Let me know what the results are and I'll help you from there. :)

    Can you try it again, then post your SMAPI-crash.txt file instead?
     
    • Badtimefrank99

      Badtimefrank99 Intergalactic Tourist

      [22:56:16 ERROR SMAPI] An error occured in the base update loop: System.IndexOutOfRangeException: Index was outside the bounds of the array.
      at StardewValley.Object.getDescription()
      at StardewValley.Menus.InventoryMenu.hover(Int32 x, Int32 y, Item heldItem)
      at StardewValley.Menus.MenuWithInventory.performHoverAction(Int32 x, Int32 y)
      at StardewValley.Menus.ItemGrabMenu.performHoverAction(Int32 x, Int32 y)
      at StardewValley.Game1.updateActiveMenu(GameTime gameTime)
      at StardewValley.Game1.Update(GameTime gameTime)
      at StardewModdingAPI.Framework.SGame.Update(GameTime gameTime) in D:\source\_Stardew\SMAPI\src\StardewModdingAPI\Framework\SGame.cs:line 614

      I can't seem to make it crash now, but that's being spammed.
       
      • Pathoschild

        Pathoschild Oxygen Tank

      • Badtimefrank99

        Badtimefrank99 Intergalactic Tourist

        Deleted it and fixed it, gonna go spend an hour looking for what mod added it. yeah for xnbloader.

        Already tracked down the culprit mod.
         
        • SVFarmRanch

          SVFarmRanch Aquatic Astronaut

          Hello, Im not sure how to post or if im in the right thread. I was told to go to the SMAPI thread, yet i cant seem to create a new post, so I am replying here as if it were a new post.
          My issue is that I cannot get my mods to work. I posted earlier in the Mods forum. It seems that the DOS window is not showing up. I can successfully install the smapi, get the window to press 1 to install and it says done. but when I run the game from steam, no dos window shows up. I do have the steam launcher pointed at the stardew api.exe file. It seems since the big update, the mods fail to launch anymore. Im not sure what I am doing wrong. Can you help me?
           
          • Cassius Skye

            Cassius Skye Space Spelunker

            Hallo! Every time I hover over say.. my strawberries in-game, the game instant crashes and shows me this error:

            [12:30:56 ERROR SMAPI] An error occured in the overridden draw loop: System.Exception: Couldn't invoke the private StardewModdingAPI.Framework.SGame::drawHUD field ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
            at StardewValley.Object.getDescription()
            at StardewValley.Menus.Toolbar.draw(SpriteBatch b)
            at StardewValley.Game1.drawHUD()
            --- End of inner exception stack trace ---
            at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
            at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
            at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
            at StardewModdingAPI.Framework.Reflection.PrivateMethod.Invoke(Object[] arguments) in D:\source\_Stardew\SMAPI\src\StardewModdingAPI\Framework\Reflection\PrivateMethod.cs:line 91
            --- End of inner exception stack trace ---
            at StardewModdingAPI.Framework.Reflection.PrivateMethod.Invoke(Object[] arguments) in D:\source\_Stardew\SMAPI\src\StardewModdingAPI\Framework\Reflection\PrivateMethod.cs:line 95
            at StardewModdingAPI.Framework.SGame.<>c.<.ctor>b__61_1() in D:\source\_Stardew\SMAPI\src\StardewModdingAPI\Framework\SGame.cs:line 168
            at StardewModdingAPI.Framework.SGame.DrawImpl(GameTime gameTime) in D:\source\_Stardew\SMAPI\src\StardewModdingAPI\Framework\SGame.cs:line 1192
            at StardewModdingAPI.Framework.SGame.Draw(GameTime gameTime) in D:\source\_Stardew\SMAPI\src\StardewModdingAPI\Framework\SGame.cs:line 668


            (it seems all the D : text is made into faces cx)

            Any help would be much appreciated! ^>^
             
            • Pathoschild

              Pathoschild Oxygen Tank

              Try this:
              1. right-click Stardew Valley in Steam;
              2. click Properties;
              3. click Set Launch Options;
              4. post a screenshot of that window;
              5. and copy the launch options and paste them here too.
              It looks like you replaced your Content\Data\ObjectInformation.xnb file with a broken or outdated one. Resetting your content files should fix that.
               
              • lxs597

                lxs597 Intergalactic Tourist

                Hello,My smapi have a trouble,someone tell me can get help from here.In the morning,I ask the question in "support" but no one reply. So should I ask in the post?

                My smapi usually crash in September.I test delete all mods ,it work good.But it must be crash when I install any mod.I have play the same day twenty times.It usually crash in 6:00pm~1:00pm. Sometimes I only open but play,it have not crash.I think maybe problem have solved and keep playing.It crash……

                Most of the situation,there noting in log.I only find the bug log tree times.But today I got it.Can somebody help me?

                stardew is 1.2.33 smapi is 1.15.4 system is windows 10 1703
                Mod have fastanimations\getdress\skipintro\calendaranywhere

                Code:
                [10:49:24 ERROR SMAPI] The game failed unexpectedly: System.AccessViolationException: Try to read or write protected memory. This usually indicates that other memory is corrupted.
                在 Microsoft.Xna.Framework.Audio.UnsafeNativeMethods.SoundBank.PlayCue(UInt32 hSoundBank, String string, Int32 length)
                在 Microsoft.Xna.Framework.Audio.SoundBank.PlayCue(String name)
                在 StardewValley.Game1.playSound(String cueName)
                在 StardewValley.FarmerSprite.checkForFootstep()
                在 StardewValley.FarmerSprite.animate(Int32 Milliseconds)
                在 StardewValley.FarmerSprite.animate(Int32 whichAnimation, Int32 milliseconds)
                在 StardewValley.FarmerSprite.animate(Int32 whichAnimation, GameTime time)
                在 StardewValley.Farmer.MovePosition(GameTime time, Rectangle viewport, GameLocation currentLocation)
                在 StardewValley.Farmer.Update(GameTime time, GameLocation location)
                在 StardewValley.Game1.UpdateCharacters(GameTime time)
                在 StardewValley.Game1.Update(GameTime gameTime)
                在 StardewModdingAPI.Framework.SGame.Update(GameTime gameTime) 位置 D:\source\_Stardew\SMAPI\src\StardewModdingAPI\Framework\SGame.cs:行号 614
                在 Microsoft.Xna.Framework.Game.Tick()
                在 Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
                在 Microsoft.Xna.Framework.GameHost.OnIdle()
                在 Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
                在 Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
                在 System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
                在 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
                在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
                在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
                在 System.Windows.Forms.Application.Run(Form mainForm)
                在 Microsoft.Xna.Framework.WindowsGameHost.Run()
                在 Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
                在 Microsoft.Xna.Framework.Game.Run()
                在 StardewModdingAPI.Program.RunInteractively() 位置 D:\source\_Stardew\SMAPI\src\StardewModdingAPI\Program.cs:行号 225
                [10:49:24 INFO SMAPI] Game has ended. Press any key to exit.
                 
                • Pathoschild

                  Pathoschild Oxygen Tank

                  Hi @lxs597. That error means there's a problem with your system memory, probably not related to your mods. I suggest performing a memory test to check if your computer's RAM is corrupt.
                   
                  • zeixx

                    zeixx Aquatic Astronaut

                    I recently updated to SMAPI 1.15.4, and now my game keeps crashing whenever I try to grab something from the inventory bar. Also, I can't take anything out of chests now, which may be related to Categorize Chests 1.4.2 which I usually use. I tried taking it out of the mod folder and using an old save, but that didn't fix anything. I'd appreciate any help!
                     

                      Attached Files:

                    • Pathoschild

                      Pathoschild Oxygen Tank

                    • zeixx

                      zeixx Aquatic Astronaut

                      Thanks!! That fixed it. :)
                       
                      • lxs597

                        lxs597 Intergalactic Tourist

                        Very thanks.But I check ram ,it' have not damage:nuruconfused:
                         
                        • Badtimefrank99

                          Badtimefrank99 Intergalactic Tourist

                          [09:52:53 ERROR SMAPI] A mod failed handling the LocationEvents.CurrentLocationChanged event:
                          System.NullReferenceException: Object reference not set to an instance of an object.
                          at StardewNotification.ProductionNotification.CheckShedProductions()
                          at StardewNotification.ProductionNotification.CheckProductionAroundFarm()
                          at StardewNotification.ModEntry.ReceiveCurrentLocationChanged(Object sender, EventArgsCurrentLocationChanged e)
                          at StardewModdingAPI.Framework.InternalExtensions.SafelyRaiseGenericEvent[TEventArgs](IMonitor monitor, String name, IEnumerable`1 handlers, Object sender, TEventArgs args) in D:\source\_Stardew\SMAPI\src\StardewModdingAPI\Framework\InternalExtensions.cs:line 65

                          Keeps printing out in the console but I can't tell what is broken or missing to fix it.

                          Suggestion would be to replace "A mod" with "mod name" so it's easier to identify the problems on our own.
                           
                          • Cassius Skye

                            Cassius Skye Space Spelunker


                            Yeah you were totally right, I actually solved this myself a lil bit ago but only because i was experimenting with new mods lol. Thank you for your reply! You rock.
                             
                            • Pathoschild

                              Pathoschild Oxygen Tank

                            • worldworld

                              worldworld Starship Captain

                              Doesn't have SMAPI a manifest itself? The SMAPI window told me so, so I moved the folder elsewhere, and the error doesn't appear again. I guess that it's still running the game? I still don't understand much from modding.
                               
                              • Pathoschild

                                Pathoschild Oxygen Tank

                                Hi @worldworld. Nope, only mods need a manifest. It's safe to delete the SMAPI folder after you install it, since that's just the installer.
                                 
                                • Zombino

                                  Zombino Space Hobo

                                  Can anyone tell me why m game crashed?
                                   

                                    Attached Files:

                                  • Pathoschild

                                    Pathoschild Oxygen Tank

                                    Zombino likes this.

                                  Share This Page