WAIT! Read this before asking for help or reporting an issue. Common questions are answered here.
What's new in SMAPI 3.9? For players, SMAPI 3.9 mainly adds a new ErrorHandler mod, fixes map changes not always being reapplied, improves error messages due to half-empty Vortex mod folders, fixes some very old map mods which broke in Stardew Valley 1.5, and improves game path detection in the installer. For modders, SMAPI 3.9 mainly adds KeybindList to easily support complex and alternate key bindings, improves the input and multiplayer APIs, and logs chatbox errors. See the SMAPI 3.9 release highlights and 3.9.1 release notes for details.
How do I update? Just run the new installer, it'll update previous files automatically.
Is it safe to update? Yep! All mods that worked in SMAPI 3.8 should still work in 3.9 (and even a few that didn't work in 3.8). Feel free to report any update issues below!
My antivirus reports a trojan/virus, deletes the installer, or deletes SMAPI files! That's common when the update is still new. See SMAPI files disappear or antivirus complains for more info about why that happens, how to check if it's safe, and how to fix it.
When I launch the game, the console appears temporarily and then exits. That's a problem with a recent Steam or game update. To fix it: (a) open your game folder; (b) delete steam_api.dll and Steamworks.NET.dll; (c) reset your game files to redownload fresh copies of those files; (d) comment below if it still happens after that.
How do I ask for help? You can often get a faster response by asking the community instead. If you do ask here, upload your SMAPI log and add a link to your message. This has useful info like what versions you have, which mods are installed, what happened in the game, etc. Please do this even if you don't see an error in the log.
Hi I just updated SMAPI. ( I had the previous update from Dec 2020 and things were fine. I run about 90 mods, and all were working well. As soon as I updated SMAPI, the game won't save at the end of the day. I have played the same day three times :( Don't know how to send a copy of my log.
After adding this mod when trying to choose items to add to the museum and picking/ placing new buildings from robins shop the mouse is not working to move screen/ select items. otherwise thank you!
The game window just doesn't responding when I try to start it from steam with the SMAPI launch parameter. At the same time, everything goes well without the launch parameter or if I launch the game directly using StardewModdingAPI.exe. But in this case, I will either be left without mods or without steam achievements. Please, help.
The launch parameter needs to include the correct quotes and space before %command%, in my case:
"E:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\StardewModdingAPI.exe" %command% (In my case I have Steam installed in my E:\ drive, yours is probably in C:\ )
Thanks for the answer, but my launch parameter is correct. I copied it from the console and everything worked fine for me on the old version (about a year ago). The problem is relevant for the new version. My parameter: "C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\StardewModdingAPI.exe" %command%
after downloading this update, some items in the game just show up as invisible, both JSON asset items and vanilla items. It's mostly clothing items, and i'm pretty sure it's smpai because it happened after I updated and I haven't started using any new mods since. I get no error logs on the issue so I can't figure out what it is.
Hi there! After last update game crashes when I open map. I've played over 400 hours and the game never ever crashed. However, the game doesn't crash every time I open map, for 50 hours of my current playthrough it happened only twice and no, I didn't update NPC map location. Here is a part of the log.
[16:02:25 TRACE game] Window_ClientSizeChanged(); Window.ClientBounds={X:0 Y:0 Width:1366 Height:768} [16:02:25 ERROR SMAPI] The StardewValley.Menus.GameMenu menu crashed while drawing itself. SMAPI will force it to exit to avoid crashing the game. System.ObjectDisposedException: Cannot access a disposed object. Object name: 'Cannot draw this texture because it's disposed.'. at StardewModdingAPI.Mods.ErrorHandler.Patches.SpriteBatchValidationPatches.After_SpriteBatch_CheckValid(Texture2D texture) in C:\source\_Stardew\SMAPI\src\SMAPI.Mods.ErrorHandler\Patches\SpriteBatchValidationPatches.cs:line 60 at Microsoft.Xna.Framework.Graphics.SpriteBatch.InternalDraw_PatchedBy<SMAPI>(Object texture, Texture2D destination, Vector4& scaleDestination, Boolean sourceRectangle, Nullable`1& color, Color rotation, Single origin, Vector2& effects, SpriteEffects depth, Single ) at Microsoft.Xna.Framework.Graphics.SpriteBatch.Draw_PatchedBy<Platonymous.PyTK__spacechase0.SpaceCore>(Object texture, Texture2D destinationRectangle, Rectangle sourceRectangle, Nullable`1 color, Color ) at NPCMapLocations.ModMapPage.DrawMarkers(SpriteBatch b) in C:\Users\bbouh\Projects\stardew-valley-mods\NPCMapLocations\ui\ModMapPage.cs:line 427 at NPCMapLocations.ModMapPage.draw(SpriteBatch b) in C:\Users\bbouh\Projects\stardew-valley-mods\NPCMapLocations\ui\ModMapPage.cs:line 213 at StardewValley.Menus.GameMenu.draw(SpriteBatch b) in C:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\Farmer\Farmer\Menus\GameMenu.cs:line 379 at StardewModdingAPI.Framework.SGame.DrawImpl(GameTime gameTime, RenderTarget2D target_screen) in C:\source\_Stardew\SMAPI\src\SMAPI\Framework\SGame.cs:line 912 [16:02:25 ERROR SMAPI] An error occurred in the overridden draw loop: System.ObjectDisposedException: Cannot access a disposed object. Object name: 'Texture2D'. at Microsoft.Xna.Framework.Helpers.CheckDisposed(Object obj, IntPtr pComPtr) at Microsoft.Xna.Framework.Graphics.TextureCollection.set_Item(Int32 index, Texture value) at Microsoft.Xna.Framework.Graphics.SpriteBatch.RenderBatch(Texture2D texture, SpriteInfo[] sprites, Int32 offset, Int32 count) at Microsoft.Xna.Framework.Graphics.SpriteBatch.Flush() at Microsoft.Xna.Framework.Graphics.SpriteBatch.End() at StardewModdingAPI.Framework.SGame.DrawImpl(GameTime gameTime, RenderTarget2D target_screen) in C:\source\_Stardew\SMAPI\src\SMAPI\Framework\SGame.cs:line 940 at StardewModdingAPI.Framework.SGame._draw(GameTime gameTime, RenderTarget2D target_screen) in C:\source\_Stardew\SMAPI\src\SMAPI\Framework\SGame.cs:line 203 [16:02:25 TRACE SMAPI] Recovering sprite batch from error... [16:02:25 ERROR SMAPI] Could not recover game draw state: System.ObjectDisposedException: Cannot access a disposed object. Object name: 'Texture2D'. at Microsoft.Xna.Framework.Helpers.CheckDisposed(Object obj, IntPtr pComPtr) at Microsoft.Xna.Framework.Graphics.TextureCollection.set_Item(Int32 index, Texture value) at Microsoft.Xna.Framework.Graphics.SpriteBatch.RenderBatch(Texture2D texture, SpriteInfo[] sprites, Int32 offset, Int32 count) at Microsoft.Xna.Framework.Graphics.SpriteBatch.Flush() at Microsoft.Xna.Framework.Graphics.SpriteBatch.End() at StardewModdingAPI.Framework.SGame._draw(GameTime gameTime, RenderTarget2D target_screen) in C:\source\_Stardew\SMAPI\src\SMAPI\Framework\SGame.cs:line 224 [16:02:25 TRACE game] Disconnected: ClosedGame [16:02:25 TRACE SMAPI] Disposing... [16:02:25 TRACE SMAPI] Disposing the content coordinator. Content managers will no longer be usable after this point.
Make sure you have the latest version of NPC Map Locations, which should fix that. If it still happens, can you upload your SMAPI log (see instructions on that page) and post a link here?
I'm getting this same error. It appears also that I can't update NPC Map Locations due to it no longer being compatible with SVE. https://smapi.io/log/c4ad62ad876d4e84a5a62a6aabbd3c4d
2479 comments
Read this before asking for help or reporting an issue. Common questions are answered here.
For players, SMAPI 3.9 mainly adds a new ErrorHandler mod, fixes map changes not always being reapplied, improves error messages due to half-empty Vortex mod folders, fixes some very old map mods which broke in Stardew Valley 1.5, and improves game path detection in the installer. For modders, SMAPI 3.9 mainly adds KeybindList to easily support complex and alternate key bindings, improves the input and multiplayer APIs, and logs chatbox errors. See the SMAPI 3.9 release highlights and 3.9.1 release notes for details.
Just run the new installer, it'll update previous files automatically.
Yep! All mods that worked in SMAPI 3.8 should still work in 3.9 (and even a few that didn't work in 3.8). Feel free to report any update issues below!
That's common when the update is still new. See SMAPI files disappear or antivirus complains for more info about why that happens, how to check if it's safe, and how to fix it.
That's a problem with a recent Steam or game update. To fix it: (a) open your game folder; (b) delete steam_api.dll and Steamworks.NET.dll; (c) reset your game files to redownload fresh copies of those files; (d) comment below if it still happens after that.
You can often get a faster response by asking the community instead. If you do ask here, upload your SMAPI log and add a link to your message. This has useful info like what versions you have, which mods are installed, what happened in the game, etc. Please do this even if you don't see an error in the log.
I tried going back to SMAPI 3.8.1 and it saved, but I need at least SMAPI 3.9 to rum my newer mods.
On android xd
At the same time, everything goes well without the launch parameter or if I launch the game directly using StardewModdingAPI.exe.
But in this case, I will either be left without mods or without steam achievements.
Please, help.
"E:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\StardewModdingAPI.exe" %command%
(In my case I have Steam installed in my E:\ drive, yours is probably in C:\ )
My parameter:
"C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\StardewModdingAPI.exe" %command%
After last update game crashes when I open map. I've played over 400 hours and the game never ever crashed.
However, the game doesn't crash every time I open map, for 50 hours of my current playthrough it happened only twice and no, I didn't update NPC map location.
Here is a part of the log.
[16:02:25 TRACE game] Window_ClientSizeChanged(); Window.ClientBounds={X:0 Y:0 Width:1366 Height:768}
[16:02:25 ERROR SMAPI] The StardewValley.Menus.GameMenu menu crashed while drawing itself. SMAPI will force it to exit to avoid crashing the game.
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Cannot draw this texture because it's disposed.'.
at StardewModdingAPI.Mods.ErrorHandler.Patches.SpriteBatchValidationPatches.After_SpriteBatch_CheckValid(Texture2D texture) in C:\source\_Stardew\SMAPI\src\SMAPI.Mods.ErrorHandler\Patches\SpriteBatchValidationPatches.cs:line 60
at Microsoft.Xna.Framework.Graphics.SpriteBatch.InternalDraw_PatchedBy<SMAPI>(Object texture, Texture2D destination, Vector4& scaleDestination, Boolean sourceRectangle, Nullable`1& color, Color rotation, Single origin, Vector2& effects, SpriteEffects depth, Single )
at Microsoft.Xna.Framework.Graphics.SpriteBatch.Draw_PatchedBy<Platonymous.PyTK__spacechase0.SpaceCore>(Object texture, Texture2D destinationRectangle, Rectangle sourceRectangle, Nullable`1 color, Color )
at NPCMapLocations.ModMapPage.DrawMarkers(SpriteBatch b) in C:\Users\bbouh\Projects\stardew-valley-mods\NPCMapLocations\ui\ModMapPage.cs:line 427
at NPCMapLocations.ModMapPage.draw(SpriteBatch b) in C:\Users\bbouh\Projects\stardew-valley-mods\NPCMapLocations\ui\ModMapPage.cs:line 213
at StardewValley.Menus.GameMenu.draw(SpriteBatch b) in C:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\Farmer\Farmer\Menus\GameMenu.cs:line 379
at StardewModdingAPI.Framework.SGame.DrawImpl(GameTime gameTime, RenderTarget2D target_screen) in C:\source\_Stardew\SMAPI\src\SMAPI\Framework\SGame.cs:line 912
[16:02:25 ERROR SMAPI] An error occurred in the overridden draw loop: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Texture2D'.
at Microsoft.Xna.Framework.Helpers.CheckDisposed(Object obj, IntPtr pComPtr)
at Microsoft.Xna.Framework.Graphics.TextureCollection.set_Item(Int32 index, Texture value)
at Microsoft.Xna.Framework.Graphics.SpriteBatch.RenderBatch(Texture2D texture, SpriteInfo[] sprites, Int32 offset, Int32 count)
at Microsoft.Xna.Framework.Graphics.SpriteBatch.Flush()
at Microsoft.Xna.Framework.Graphics.SpriteBatch.End()
at StardewModdingAPI.Framework.SGame.DrawImpl(GameTime gameTime, RenderTarget2D target_screen) in C:\source\_Stardew\SMAPI\src\SMAPI\Framework\SGame.cs:line 940
at StardewModdingAPI.Framework.SGame._draw(GameTime gameTime, RenderTarget2D target_screen) in C:\source\_Stardew\SMAPI\src\SMAPI\Framework\SGame.cs:line 203
[16:02:25 TRACE SMAPI] Recovering sprite batch from error...
[16:02:25 ERROR SMAPI] Could not recover game draw state: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Texture2D'.
at Microsoft.Xna.Framework.Helpers.CheckDisposed(Object obj, IntPtr pComPtr)
at Microsoft.Xna.Framework.Graphics.TextureCollection.set_Item(Int32 index, Texture value)
at Microsoft.Xna.Framework.Graphics.SpriteBatch.RenderBatch(Texture2D texture, SpriteInfo[] sprites, Int32 offset, Int32 count)
at Microsoft.Xna.Framework.Graphics.SpriteBatch.Flush()
at Microsoft.Xna.Framework.Graphics.SpriteBatch.End()
at StardewModdingAPI.Framework.SGame._draw(GameTime gameTime, RenderTarget2D target_screen) in C:\source\_Stardew\SMAPI\src\SMAPI\Framework\SGame.cs:line 224
[16:02:25 TRACE game] Disconnected: ClosedGame
[16:02:25 TRACE SMAPI] Disposing...
[16:02:25 TRACE SMAPI] Disposing the content coordinator. Content managers will no longer be usable after this point.
https://smapi.io/log/c4ad62ad876d4e84a5a62a6aabbd3c4d