SMAPI - Stardew Modding API

SMAPI - Stardew Modding API

971k Downloads

Loading custom asset fails on Linux/Mac

Pathoschild opened this issue ยท 1 comments

commented

When a mod tries to load a custom asset from its folder on Linux/Mac, SMAPI throws an error like this:

Geode Info Menu failed on entry and might not work correctly. Technical details:
StardewModdingAPI.Framework.Exceptions.SContentLoadException: Geode Info Menu failed loading content asset 'Sprites/tabs.png' from ModFolder. ---> Microsoft.Xna.Framework.Content.ContentLoadException: The content file was not found. ---> System.IO.FileNotFoundException: Could not find file "/Users/mariashank/Library/Application Support/Steam/SteamApps/common/Stardew Valley/Contents/MacOS/Mods/GeodeInfoMenu/Sprites/tabs.png.xnb".
File name: '/Users/mariashank/Library/Application Support/Steam/SteamApps/common/Stardew Valley/Contents/MacOS/Mods/GeodeInfoMenu/Sprites/tabs.png.xnb'
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) <0x108dc2860 + 0x007fc> in <filename unknown>:0 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) <0x108dc27f0 + 0x00053> in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
  at System.IO.File.OpenRead (System.String path) <0x108dc2680 + 0x0004a> in <filename unknown>:0 
  at Microsoft.Xna.Framework.Content.ContentManager.OpenStream (System.String assetName) <0x1103af620 + 0x00090> in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Microsoft.Xna.Framework.Content.ContentManager.OpenStream (System.String assetName) <0x1103af620 + 0x00135> in <filename unknown>:0 
  at Microsoft.Xna.Framework.Content.ContentManager.ReadAsset[T] (System.String assetName, System.Action`1 recordDisposableObject) <0x1103af080 + 0x001c5> in <filename unknown>:0 
  at Microsoft.Xna.Framework.Content.ContentManager.Load[T] (System.String assetName) <0x1103aedd0 + 0x0014d> in <filename unknown>:0 
  at StardewValley.LocalizedContentManager.Load[T] (System.String assetName) <0x1103aec60 + 0x00106> in <filename unknown>:0 
  at StardewModdingAPI.Framework.SContentManager.<>n__2[T] (System.String assetName) <0x1103aec00 + 0x0003c> in <filename unknown>:0 
  at StardewModdingAPI.Framework.SContentManager+<>c__DisplayClass40_0`1[T].<LoadImpl>b__1 () <0x1103ac090 + 0x001e5> in <filename unknown>:0 
  at StardewModdingAPI.Framework.Utilities.ContextHash`1[T].Track[TResult] (StardewModdingAPI.Framework.Utilities.T key, System.Func`1 action) <0x1103aba00 + 0x0004f> in <filename unknown>:0 
  at StardewModdingAPI.Framework.SContentManager+<>c__DisplayClass40_0`1[T].<LoadImpl>b__0 () <0x1103ab240 + 0x00338> in <filename unknown>:0 
  at StardewModdingAPI.Framework.SContentManager.WithWriteLock[T] (System.Func`1 action) <0x1103aa260 + 0x0003b> in <filename unknown>:0 
  at StardewModdingAPI.Framework.SContentManager.LoadImpl[T] (System.String assetName, Microsoft.Xna.Framework.Content.ContentManager instance) <0x1103aa000 + 0x001b6> in <filename unknown>:0 
  at StardewModdingAPI.Framework.SContentManager.LoadFor[T] (System.String assetName, Microsoft.Xna.Framework.Content.ContentManager instance) <0x1102b9600 + 0x0022e> in <filename unknown>:0 
  at StardewModdingAPI.Framework.SContentManager.Load[T] (System.String assetName) <0x1619ce8e0 + 0x00041> in <filename unknown>:0 
  at StardewModdingAPI.Framework.ModHelpers.ContentHelper.Load[T] (System.String key, ContentSource source) <0x1619cd490 + 0x006e2> in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at StardewModdingAPI.Framework.ModHelpers.ContentHelper.Load[T] (System.String key, ContentSource source) <0x1619cd490 + 0x00a29> in <filename unknown>:0 
  at GeodeInfoMenu.GeodeInfoMenuMod.Entry (IModHelper helper) <0x1619c9cf0 + 0x00274> in <filename unknown>:0 
  at StardewModdingAPI.Program.LoadMods (StardewModdingAPI.Framework.IModMetadata[] mods, StardewModdingAPI.Framework.Serialisation.JsonHelper jsonHelper, StardewModdingAPI.Framework.SContentManager contentManager) <0x15f5a6dd0 + 0x02c69> in <filename unknown>:0 
commented

Fixed in develop for the upcoming SMAPI 2.1.1 release.