Use system Mono on Linux/Mac
Pathoschild opened this issue ยท 21 comments
On Linux and Mac, the game uses a bundled version of Mono which is missing some .NET features (notably dynamic
and libgdiplus). Consider using the system-installed version of Mono instead.
Proposal approach: once Mono is installed, deleting monoconfig
, mscorlib.dll
, Mono.*.dll
, and System.*.dll
in the game folder allows it to run fine on the system Mono. (Only tested on Linux.)
Pros:
- Mods can use features not bundled into the game's Mono.
- Possibly removes the need for the libgdiplus symlink (#277, #344, not tested).
- Possibly resolves a Mono bug only known to affect Entoarox's mods (e.g. #340, not tested).
Cons:
- More complex setup (players can no longer just drop some files into the game folder).
- Players will have many different versions of Mono installed, complicating support. Could be partly mitigated with a min-Mono-version check in the installer.
- Are there any Mono crossplatform issues between various Linux distros and Mac releases?
- Largely untested.
@springacres tried running SMAPI mods on the system-installed Mono on Mac.
expand for details
Notably, she had the 'no Mod subclass' bug with Entoarox Framework (#340) when using the bundled Mono (see log).
Versions
Mac High Sierra 10.13.2, Mono 5.4.1.6 (see --version), SMAPI 2.3.
Experiment
We deleted the Mono-conflicting files (monoconfig
, Mono.*.dll
except Mono.Cecil.dll
, mscorlib
, and System.*.dll
), ran mono StardewModdingAPI.exe
with 27 mods, loaded a save, and left the farmhouse to trigger a map change.
Results
See full SMAPI log.
Most mods worked fine, but three couldn't be loaded due to assembly reference errors:
mod | assembly reference failed |
---|---|
Advanced Location Loader 1.3 | Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed |
Entoarox Framework 2.0.6 | StardewModdingAPI, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null |
LookupAnything 1.17 | MonoGame.Framework, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null |
It's unclear why the assembly references failed. Installing SMAPI 2.1 didn't change the EF error, so it's not just a version mismatch. Although Lookup Anything failed, Automate + Chests Anywhere + Fast Animations which are compiled simultaneously from the same solution worked fine.
I repeated the above with the same mods, but in a ZorinOS Linux VM. This one worked fine (see log), so the assembly reference errors seem to be a Mac-only issue.
Json.NET and MonoGame (and SMAPI) are all loaded by SMAPI itself before mods are loaded. Assembly resolution is overridden to allow version mismatches and use already-loaded assemblies where possible. It's not clear yet why the assembly resolution is failing just for those three mods.
are newtonsoft.json, smapi & mgframework files kept as relative references to smapi itself? 0_0 cause that shouldnt be happening ๐
Success! SMAPI 2.3 fixed the reference errors from the last test, so @LeonBlade retested. See log with bundled Mono and log with system Mono. All the mods worked fine except SpaceCore (expected due to #341).
SMAPI will most likely never require this by default, but we can document it for mods that need it. (So their install steps will be something like "install SMAPI, follow these instructions to jailbreak Mono, then install the mod".)
Tentative player instructions (Linux and Mac only):
expand for outdated steps
Here's how to play the game using the system install of Mono. This is not necessary unless a mod explicitly requires it. You may need to repeat these steps when the game updates or you reset the game files.
- Install Mono (unless you already installed it).
- Open your game folder.
- Delete these files:
monoconfig
Mono.*.dll
(but notMono.Cecil.dll
)mscorlib.dll
System.*.dll
- Edit the
StardewValley
file and replace it with this code:mono StardewModdingAPI.exe
That's it! Launch the game the same way as usual to play with the system Mono.
Player testing:
platform | results |
---|---|
Linux | โ LeonBlade โ mouse |
Mac | โ Nanogamer7 |
I'm following the steps of your latest post (Ubuntu 17.10). Previously, SMAPI opened a console window, which it doesn't any more after following these steps. Apart from that, the error Entoarox Framework had is gone.
My system's mono version:
Mono JIT compiler version 4.6.2 (Debian 4.6.2.7+dfsg-1ubuntu1)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
Before & after feedback : https://pastebin.com/UaxsghPv
@Katorone Can you replace your StardewValley
file with this one, and see if the terminal opens? (You'll need to set chmod +x
on the file.)
I had to convert the file to use linux linebreaks, after which your script worked like a charm by launching it through the desktop icon! Thanks!
~/GOG Games/Stardew Valley/game$ ./StardewValley
bash: ./StardewValley: /bin/bash^M: bad interpreter: No such file or directory
These instructions are highly experimental and don't work for all players. If they don't work for you, you can reset your game files to return to normal. Please consider posting a comment below saying whether it worked for you, and attach your SMAPI log.
Thanks! Updated instructions (Linux and Mac only):
Here's how to play the game using the system install of Mono. This is not necessary unless a mod explicitly requires it. You may need to repeat these steps when the game updates or you reset the game files.
- Install Mono (unless you already installed it).
- Open your game folder.
- Delete these files:
monoconfig
Mono.*.dll
(but notMono.Cecil.dll
)mscorlib.dll
System.*.dll
StardewValley
(only the file with no extension)- Unzip StardewValley.zip into your game folder to replace the
StardewValley
file.That's it! Launch the game the same way as usual to play with the system Mono.
Player testing:
platform | results |
---|---|
Linux | โ HellishINC (Arch Linux) โ Katorone (Ubuntu 17.10, log) โ mouse (Fedora 27, log) โ notfood (Arch Linux, details) โ ShneekeyTheLost (Mint 18.1, details) โ mono StardewModdingAPI.exe OK but not Steam |
Mac | โ caomicc (Sierra 10.13.2, details) โ LeonBlade (Mac) โ Marie#8964 (Sierra 10.12.6, log) |
Edit: Is it known that #341 also affects Linux? That issue only specifies Mac.
Works on Arch Linux, Mono 5.4.1.7-2.
~
03:54:07 PM >> $ mono --version
Mono JIT compiler version 5.4.1 (makepkg/e66d9abbb27 Thu Nov 9 22:28:33 CET 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: normal
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen (concurrent by default)
This tested in Linux Mint 18.1 64 bit and system installed Mono version 5.8.0.108
Running manually via 'mono StardewModdingAPI.exe' works perfectly, but trying to run through Steam results in a crash. This with the previous version of Entorax Framework version 1.8.0 which does not require the workaround.
After updating Entorax Framework to version 2.0.6 and XNBLoader to version 1.1.10, running via manual command 'mono StardewModdingAPI.exe' also works as intended, permitting me to use the later versions of Entorax Framework and dependent mods as long as I run it manually instead of trying to run it through steam.
Running your modified StardewValley file manually via './StardewValley' also functions normally in both cases. So it appears to be Steam pitching some kind of security fit.
This is the error generated when attempting to run via Steam:
[SMAPI] The game failed unexpectedly: System.TypeInitializationException: The type initializer for 'StardewValley.SaveGame' threw an exception. ---> System.InvalidOperationException: Unable to generate a temporary class (result=0).
error : ERROR: ld.so: object '/home/shneekey/.steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
error : ERROR: ld.so: object '/home/shneekey/.steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
at System.Xml.Serialization.Compiler.Compile (System.Reflection.Assembly parent, System.String ns, System.Xml.Serialization.XmlSerializerCompilerParameters xmlParameters, System.Security.Policy.Evidence evidence) [0x0021a] in <46d1840d27824d8497cde14c77c36ce0>:0
at System.Xml.Serialization.TempAssembly.GenerateAssembly (System.Xml.Serialization.XmlMapping[] xmlMappings, System.Type[] types, System.String defaultNamespace, System.Security.Policy.Evidence evidence, System.Xml.Serialization.XmlSerializerCompilerParameters parameters, System.Reflection.Assembly assembly, System.Collections.Hashtable assemblies) [0x004c2] in <46d1840d27824d8497cde14c77c36ce0>:0
at System.Xml.Serialization.TempAssembly..ctor (System.Xml.Serialization.XmlMapping[] xmlMappings, System.Type[] types, System.String defaultNamespace, System.String location, System.Security.Policy.Evidence evidence) [0x0006a] in <46d1840d27824d8497cde14c77c36ce0>:0
at System.Xml.Serialization.XmlSerializer.GenerateTempAssembly (System.Xml.Serialization.XmlMapping xmlMapping, System.Type type, System.String defaultNamespace, System.String location, System.Security.Policy.Evidence evidence) [0x00000] in <46d1840d27824d8497cde14c77c36ce0>:0
at System.Xml.Serialization.XmlSerializer..ctor (System.Type type, System.Xml.Serialization.XmlAttributeOverrides overrides, System.Type[] extraTypes, System.Xml.Serialization.XmlRootAttribute root, System.String defaultNamespace, System.String location, System.Security.Policy.Evidence evidence) [0x0005c] in <46d1840d27824d8497cde14c77c36ce0>:0
at System.Xml.Serialization.XmlSerializer..ctor (System.Type type, System.Xml.Serialization.XmlAttributeOverrides overrides, System.Type[] extraTypes, System.Xml.Serialization.XmlRootAttribute root, System.String defaultNamespace, System.String location) [0x00000] in <46d1840d27824d8497cde14c77c36ce0>:0
at System.Xml.Serialization.XmlSerializer..ctor (System.Type type, System.Type[] extraTypes) [0x00000] in <46d1840d27824d8497cde14c77c36ce0>:0
at StardewValley.SaveGame..cctor () [0x001c1] in :0
--- End of inner exception stack trace ---
at Microsoft.Xna.Framework.Game.DoUpdate (Microsoft.Xna.Framework.GameTime gameTime) [0x00019] in <1c2402ae98774e55934fa5c76199ce71>:0
at Microsoft.Xna.Framework.Game.Tick () [0x000eb] in <1c2402ae98774e55934fa5c76199ce71>:0
at Microsoft.Xna.Framework.SdlGamePlatform.RunLoop () [0x0001c] in <1c2402ae98774e55934fa5c76199ce71>:0
at Microsoft.Xna.Framework.Game.Run (Microsoft.Xna.Framework.GameRunBehavior runBehavior) [0x00077] in <1c2402ae98774e55934fa5c76199ce71>:0
at Microsoft.Xna.Framework.Game.Run () [0x0000c] in <1c2402ae98774e55934fa5c76199ce71>:0
at StardewModdingAPI.Program.RunInteractively () [0x0025f] in :0
What version of Mono do you have installed? This method simply uses your system's Mono instead of the packaged version. If your version of Mono isn't up to date, it'll throw this error.
Does Arch do PPA's? I find them to be a very easy way to keep your Mono up to date. Go to the mono-project.com site and look for an Arch download of latest stable, your repos might not have updated yet.
I have mono 5.4.1
$ mono --version
Mono JIT compiler version 5.4.1 (makepkg/e66d9abbb27 Thu Nov 9 22:28:33 CET 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: normal
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen (concurrent by default)
@ShneekeyTheLost No, Arch doesn't do anything like PPAs. We have unofficial repos and the AUR (which must be compiled manually).
As for mono version, we have the same version and is working on my end.
@notfood when you say without steam, what exactly do you mean? Are you bypassing the steam integration somehow or using the GOG build? Can you provide what pacman -Qi mono
states and also the error/crash log for SDV?
I didn't try to bypass the integration, I assumed it has no DRM and ran it via command line.
pacman -Qi mono
Name : mono
Version : 5.4.1.7-2
Description : Free implementation of the .NET platform including runtime and compiler
Architecture : x86_64
URL : http://www.mono-project.com/
Licenses : GPL LGPL2.1 MPL
Groups : None
Provides : monodoc
Depends On : zlib libgdiplus>=4.2 sh python ca-certificates
Optional Deps : None
Required By : fsharp gtk-sharp-2 gtk-sharp-3 mono-addins monodevelop nbtexplorer nuget openra referenceassemblies-pcl
Optional For : avahi graphviz
Conflicts With : monodoc
Replaces : None
Installed Size : 211.96 MiB
Packager : Levente Polyak <[email protected]>
Build Date : Thu Nov 9 16:36:31 2017
Install Date : Mon Jan 1 22:06:10 2018
Install Reason : Explicitly installed
Install Script : Yes
Validated By : None
Steps I followed
- Verified game cache
rm monoconfig Mono.Posix.dll Mono.Security.dll mscorlib.dll System.Configuration.dll System.Core.dll System.Data.dll System.Drawing.dll System.Runtime.Serialization.dll System.Security.dll System.Xml.dll System.Xml.Linq.dll StardewValley
- Uncompressed
StardewValley
from attached zip. - Ran through steam
Output
ERROR: ld.so: object '/media/Eientei/opt/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/media/Eientei/opt/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
[SMAPI] SMAPI 2.4 with Stardew Valley 1.2.33 on Unix 4.15.3.2
[SMAPI] Mods go here: /media/Eientei/opt/Steam/steamapps/common/Stardew Valley/Mods
Setting breakpad minidump AppID = 413150
Steam_SetMinidumpSteamID: Caching Steam ID: 76561198031500205 [API loaded no]
[SMAPI] The game failed unexpectedly: System.TypeInitializationException: The type initializer for 'StardewValley.SaveGame' threw an exception. ---> System.MissingMethodException: Attempted to access a missing method.
at (wrapper managed-to-native) System.ComponentModel.Win32Exception:W32ErrorMessage (int)
at System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x0024e] in <4060ce79c1104ef2b7adf5c19d399ad4>:0
at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x0008b] in <4060ce79c1104ef2b7adf5c19d399ad4>:0
at System.Diagnostics.Process.Start () [0x0001b] in <4060ce79c1104ef2b7adf5c19d399ad4>:0
at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:Start ()
at Mono.CSharp.CSharpCodeCompiler.CompileFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x0015b] in <4060ce79c1104ef2b7adf5c19d399ad4>:0
at Mono.CSharp.CSharpCodeCompiler.CompileFromSourceBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] sources) [0x0009a] in <4060ce79c1104ef2b7adf5c19d399ad4>:0
at Mono.CSharp.CSharpCodeCompiler.CompileAssemblyFromSourceBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] sources) [0x00011] in <4060ce79c1104ef2b7adf5c19d399ad4>:0
at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromSource (System.CodeDom.Compiler.CompilerParameters options, System.String[] sources) [0x00014] in <4060ce79c1104ef2b7adf5c19d399ad4>:0
at System.Xml.Serialization.Compiler.Compile (System.Reflection.Assembly parent, System.String ns, System.Xml.Serialization.XmlSerializerCompilerParameters xmlParameters, System.Security.Policy.Evidence evidence) [0x00144] in <32a6754d951043ff82e122ba81e73e0f>:0
at System.Xml.Serialization.TempAssembly.GenerateAssembly (System.Xml.Serialization.XmlMapping[] xmlMappings, System.Type[] types, System.String defaultNamespace, System.Security.Policy.Evidence evidence, System.Xml.Serialization.XmlSerializerCompilerParameters parameters, System.Reflection.Assembly assembly, System.Collections.Hashtable assemblies) [0x004c2] in <32a6754d951043ff82e122ba81e73e0f>:0
at System.Xml.Serialization.TempAssembly..ctor (System.Xml.Serialization.XmlMapping[] xmlMappings, System.Type[] types, System.String defaultNamespace, System.String location, System.Security.Policy.Evidence evidence) [0x0006a] in <32a6754d951043ff82e122ba81e73e0f>:0
at System.Xml.Serialization.XmlSerializer.GenerateTempAssembly (System.Xml.Serialization.XmlMapping xmlMapping, System.Type type, System.String defaultNamespace, System.String location, System.Security.Policy.Evidence evidence) [0x00000] in <32a6754d951043ff82e122ba81e73e0f>:0
at System.Xml.Serialization.XmlSerializer..ctor (System.Type type, System.Xml.Serialization.XmlAttributeOverrides overrides, System.Type[] extraTypes, System.Xml.Serialization.XmlRootAttribute root, System.String defaultNamespace, System.String location, System.Security.Policy.Evidence evidence) [0x0005c] in <32a6754d951043ff82e122ba81e73e0f>:0
at System.Xml.Serialization.XmlSerializer..ctor (System.Type type, System.Xml.Serialization.XmlAttributeOverrides overrides, System.Type[] extraTypes, System.Xml.Serialization.XmlRootAttribute root, System.String defaultNamespace, System.String location) [0x00000] in <32a6754d951043ff82e122ba81e73e0f>:0
at System.Xml.Serialization.XmlSerializer..ctor (System.Type type, System.Type[] extraTypes) [0x00000] in <32a6754d951043ff82e122ba81e73e0f>:0
at StardewValley.SaveGame..cctor () [0x001c1] in <f67a9c4e61604d6aa5e63c3bdcd5318b>:0
--- End of inner exception stack trace ---
at Microsoft.Xna.Framework.Game.DoUpdate (Microsoft.Xna.Framework.GameTime gameTime) [0x00019] in <1c2402ae98774e55934fa5c76199ce71>:0
at Microsoft.Xna.Framework.Game.Tick () [0x000eb] in <1c2402ae98774e55934fa5c76199ce71>:0
at Microsoft.Xna.Framework.SdlGamePlatform.RunLoop () [0x0001c] in <1c2402ae98774e55934fa5c76199ce71>:0
at Microsoft.Xna.Framework.Game.Run (Microsoft.Xna.Framework.GameRunBehavior runBehavior) [0x00077] in <1c2402ae98774e55934fa5c76199ce71>:0
at Microsoft.Xna.Framework.Game.Run () [0x0000c] in <1c2402ae98774e55934fa5c76199ce71>:0
at StardewModdingAPI.Program.RunInteractively () [0x0025f] in <d035feed26be48d79ed4e2f25321a769>:0
The result is the same if I run ./StardewValley via console
Hi there! I'm running into the same issue as @notfood. I have followed the same steps as in the above comment.
Running pacman -Qi mono
responded with -bash: pacman: command not found
Mono Version:
Camerons-MacBook-Pro:MacOS comiccioli$ mono --version
Mono JIT compiler version 5.8.0.108 (2017-10/9aa78573ee2 Wed Jan 10 04:30:03 EST 2018)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: normal
SIGSEGV: altstack
Notification: kqueue
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: yes(3.6.0svn-mono-master/8b1520c8aae)
GC: sgen (concurrent by default)
Steam:
If I launch through Steam, the following terminal window opens without the game launching at all.
Camerons-MacBook-Pro:~ comiccioli$ mono '/StardewModdingAPI.exe'
Cannot open assembly '/StardewModdingAPI.exe': No such file or directory.
Console:
If I launch through the console, the following terminal window opens and the game launches with a black screen only
Camerons-MacBook-Pro:MacOS comiccioli$ mono 'StardewModdingAPI.exe'
[SMAPI] SMAPI 2.5.2 with Stardew Valley 1.2.33 on Unix 17.3.0.0
[SMAPI] Mods go here: /Users/comiccioli/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS/Mods
Setting breakpad minidump AppID = 413150
Steam_SetMinidumpSteamID: Caching Steam ID: 76561198019200424 [API loaded no]
[SMAPI] The game failed unexpectedly: System.TypeInitializationException: The type initializer for 'StardewValley.SaveGame' threw an exception. ---> System.MissingMethodException: Attempted to access a missing method.
at (wrapper managed-to-native) System.ComponentModel.Win32Exception.W32ErrorMessage(int)
at System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x0024e] in <4060ce79c1104ef2b7adf5c19d399ad4>:0
at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x0008b] in <4060ce79c1104ef2b7adf5c19d399ad4>:0
at System.Diagnostics.Process.Start () [0x0001b] in <4060ce79c1104ef2b7adf5c19d399ad4>:0
at (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start()
at Mono.CSharp.CSharpCodeCompiler.CompileFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x0015b] in <4060ce79c1104ef2b7adf5c19d399ad4>:0
at Mono.CSharp.CSharpCodeCompiler.CompileFromSourceBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] sources) [0x0009a] in <4060ce79c1104ef2b7adf5c19d399ad4>:0
at Mono.CSharp.CSharpCodeCompiler.CompileAssemblyFromSourceBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] sources) [0x00011] in <4060ce79c1104ef2b7adf5c19d399ad4>:0
at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromSource (System.CodeDom.Compiler.CompilerParameters options, System.String[] sources) [0x00014] in <4060ce79c1104ef2b7adf5c19d399ad4>:0
at System.Xml.Serialization.Compiler.Compile (System.Reflection.Assembly parent, System.String ns, System.Xml.Serialization.XmlSerializerCompilerParameters xmlParameters, System.Security.Policy.Evidence evidence) [0x00144] in <19473b8a8e23451995a57c8fe015a969>:0
at System.Xml.Serialization.TempAssembly.GenerateAssembly (System.Xml.Serialization.XmlMapping[] xmlMappings, System.Type[] types, System.String defaultNamespace, System.Security.Policy.Evidence evidence, System.Xml.Serialization.XmlSerializerCompilerParameters parameters, System.Reflection.Assembly assembly, System.Collections.Hashtable assemblies) [0x004c2] in <19473b8a8e23451995a57c8fe015a969>:0
at System.Xml.Serialization.TempAssembly..ctor (System.Xml.Serialization.XmlMapping[] xmlMappings, System.Type[] types, System.String defaultNamespace, System.String location, System.Security.Policy.Evidence evidence) [0x0006a] in <19473b8a8e23451995a57c8fe015a969>:0
at System.Xml.Serialization.XmlSerializer.GenerateTempAssembly (System.Xml.Serialization.XmlMapping xmlMapping, System.Type type, System.String defaultNamespace, System.String location, System.Security.Policy.Evidence evidence) [0x00000] in <19473b8a8e23451995a57c8fe015a969>:0
at System.Xml.Serialization.XmlSerializer..ctor (System.Type type, System.Xml.Serialization.XmlAttributeOverrides overrides, System.Type[] extraTypes, System.Xml.Serialization.XmlRootAttribute root, System.String defaultNamespace, System.String location, System.Security.Policy.Evidence evidence) [0x0005c] in <19473b8a8e23451995a57c8fe015a969>:0
at System.Xml.Serialization.XmlSerializer..ctor (System.Type type, System.Xml.Serialization.XmlAttributeOverrides overrides, System.Type[] extraTypes, System.Xml.Serialization.XmlRootAttribute root, System.String defaultNamespace, System.String location) [0x00000] in <19473b8a8e23451995a57c8fe015a969>:0
at System.Xml.Serialization.XmlSerializer..ctor (System.Type type, System.Type[] extraTypes) [0x00000] in <19473b8a8e23451995a57c8fe015a969>:0
at StardewValley.SaveGame..cctor () [0x001c1] in <f67a9c4e61604d6aa5e63c3bdcd5318b>:0
--- End of inner exception stack trace ---
at Microsoft.Xna.Framework.Game.DoUpdate (Microsoft.Xna.Framework.GameTime gameTime) [0x00019] in <1c2402ae98774e55934fa5c76199ce71>:0
at Microsoft.Xna.Framework.Game.Tick () [0x000eb] in <1c2402ae98774e55934fa5c76199ce71>:0
at Microsoft.Xna.Framework.SdlGamePlatform.RunLoop () [0x0001c] in <1c2402ae98774e55934fa5c76199ce71>:0
at Microsoft.Xna.Framework.Game.Run (Microsoft.Xna.Framework.GameRunBehavior runBehavior) [0x00077] in <1c2402ae98774e55934fa5c76199ce71>:0
at Microsoft.Xna.Framework.Game.Run () [0x0000c] in <1c2402ae98774e55934fa5c76199ce71>:0
at StardewModdingAPI.Program.RunInteractively () [0x00260] in <30c53be1466b439f91a96cb88c2f828b>:0
[SMAPI] Game has ended. Press any key to exit.
Computer Information
System Version: macOS 10.13.2 (17C88)
Kernel Version: Darwin 17.3.0
Hope this information helps in one way or another!
Hi! I tried to follow these instructions to use the system mono because I was getting a SMAPI error for several of the mods I have installed that libgdiplus was not found, even though I had mono installed. That log is here: https://log.smapi.io/xekQesKD
I have Mono version 5.8.0.129 and High Sierra 10.13.3.
Afterwards I tried to launch the game through Steam, but it failed silently, without a terminal window opening.
When I launched it manually by running "mono StardewModdingAPI.exe", I got the following error in the console.
[SMAPI] SMAPI 2.5.3 with Stardew Valley 1.2.33 on Unix 17.4.0.0
[SMAPI] Mods go here: /Users/lyrahall/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS/Mods
Setting breakpad minidump AppID = 413150
Steam_SetMinidumpSteamID: Caching Steam ID: 76561198370637101 [API loaded no]
[SMAPI] The game failed unexpectedly: System.TypeInitializationException: The type initializer for 'StardewValley.SaveGame' threw an exception. ---> System.MissingMethodException: Attempted to access a missing method.
at (wrapper managed-to-native) System.ComponentModel.Win32Exception.W32ErrorMessage(int)
at System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x0024e] in <4060ce79c1104ef2b7adf5c19d399ad4>:0
at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x0008b] in <4060ce79c1104ef2b7adf5c19d399ad4>:0
at System.Diagnostics.Process.Start () [0x0001b] in <4060ce79c1104ef2b7adf5c19d399ad4>:0
at (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start()
at Mono.CSharp.CSharpCodeCompiler.CompileFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x0015b] in <4060ce79c1104ef2b7adf5c19d399ad4>:0
at Mono.CSharp.CSharpCodeCompiler.CompileFromSourceBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] sources) [0x0009a] in <4060ce79c1104ef2b7adf5c19d399ad4>:0
at Mono.CSharp.CSharpCodeCompiler.CompileAssemblyFromSourceBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] sources) [0x00011] in <4060ce79c1104ef2b7adf5c19d399ad4>:0
at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromSource (System.CodeDom.Compiler.CompilerParameters options, System.String[] sources) [0x00014] in <4060ce79c1104ef2b7adf5c19d399ad4>:0
at System.Xml.Serialization.Compiler.Compile (System.Reflection.Assembly parent, System.String ns, System.Xml.Serialization.XmlSerializerCompilerParameters xmlParameters, System.Security.Policy.Evidence evidence) [0x00144] in <19473b8a8e23451995a57c8fe015a969>:0
at System.Xml.Serialization.TempAssembly.GenerateAssembly (System.Xml.Serialization.XmlMapping[] xmlMappings, System.Type[] types, System.String defaultNamespace, System.Security.Policy.Evidence evidence, System.Xml.Serialization.XmlSerializerCompilerParameters parameters, System.Reflection.Assembly assembly, System.Collections.Hashtable assemblies) [0x004c2] in <19473b8a8e23451995a57c8fe015a969>:0
at System.Xml.Serialization.TempAssembly..ctor (System.Xml.Serialization.XmlMapping[] xmlMappings, System.Type[] types, System.String defaultNamespace, System.String location, System.Security.Policy.Evidence evidence) [0x0006a] in <19473b8a8e23451995a57c8fe015a969>:0
at System.Xml.Serialization.XmlSerializer.GenerateTempAssembly (System.Xml.Serialization.XmlMapping xmlMapping, System.Type type, System.String defaultNamespace, System.String location, System.Security.Policy.Evidence evidence) [0x00000] in <19473b8a8e23451995a57c8fe015a969>:0
at System.Xml.Serialization.XmlSerializer..ctor (System.Type type, System.Xml.Serialization.XmlAttributeOverrides overrides, System.Type[] extraTypes, System.Xml.Serialization.XmlRootAttribute root, System.String defaultNamespace, System.String location, System.Security.Policy.Evidence evidence) [0x0005c] in <19473b8a8e23451995a57c8fe015a969>:0
at System.Xml.Serialization.XmlSerializer..ctor (System.Type type, System.Xml.Serialization.XmlAttributeOverrides overrides, System.Type[] extraTypes, System.Xml.Serialization.XmlRootAttribute root, System.String defaultNamespace, System.String location) [0x00000] in <19473b8a8e23451995a57c8fe015a969>:0
at System.Xml.Serialization.XmlSerializer..ctor (System.Type type, System.Type[] extraTypes) [0x00000] in <19473b8a8e23451995a57c8fe015a969>:0
at StardewValley.SaveGame..cctor () [0x001c1] in :0
--- End of inner exception stack trace ---
at Microsoft.Xna.Framework.Game.DoUpdate (Microsoft.Xna.Framework.GameTime gameTime) [0x00019] in <1c2402ae98774e55934fa5c76199ce71>:0
at Microsoft.Xna.Framework.Game.Tick () [0x000eb] in <1c2402ae98774e55934fa5c76199ce71>:0
at Microsoft.Xna.Framework.SdlGamePlatform.RunLoop () [0x0001c] in <1c2402ae98774e55934fa5c76199ce71>:0
at Microsoft.Xna.Framework.Game.Run (Microsoft.Xna.Framework.GameRunBehavior runBehavior) [0x00077] in <1c2402ae98774e55934fa5c76199ce71>:0
at Microsoft.Xna.Framework.Game.Run () [0x0000c] in <1c2402ae98774e55934fa5c76199ce71>:0
at StardewModdingAPI.Program.RunInteractively () [0x0027c] in <102de84a0c0c4e4d967a64a1e763945f>:0
[SMAPI] Game has ended. Press any key to exit.
Thank you and I hope this helps!