Open brechtm opened 8 years ago
Looking at the exception.txt from the zicrash archive, I found out that there was a missing SDL_mixer
softlink in the SDL_mixer Framework (it did include a broken SDL_mixer.framework
link, however - not sure why that isn't causing trouble for others). After creating that link, exception.txt contains:
Exception:
#=qHtbb9WEEwqcAvlHJdDqC2UM1t0P9K9QqC5R7Y$V2jW4=: GlyphSheet: No clean breaks found between glyph rows.
at #=qkM5C8VFtbTbWE7nlyRqPDw==.#=qpgFec2MjWhg7bVJlx9e$SA== () <0x2d6a8a8 + 0x00273> in <filename unknown>:0
at #=qDj3_TG1XXmlXYhsJcRX8a2ea44jSqKBadnaiItJlSIM=.#=q2kJMOFTQ8lMgmArDKe5Hfg== (#=qkM5C8VFtbTbWE7nlyRqPDw== #=q4oFpVl2ogVP4UaEwEpZmRQ==) <0x2d69a48 + 0x0008f> in <filename unknown>:0
Thread: , State: Running, Alive: True, Background: False
at #=qGJ7G9igE0GxBtc53u$am5w==+#=qns$SI8mNeDa_ImH68lXqk$we9Tsi2PayJBqofQy38AA=.#=qm$IBmQ$vduncXWAn03CbE$p6sJ1WCqtoWIM_gdgTnOk= (System.Threading.Thread #=qbnSCU9c5DyZbhX_aCtnFog==) [0x00000] in <filename unknown>:0
at #=qGJ7G9igE0GxBtc53u$am5w==.#=qLHMzM1kdTll79zgI8$m$hQ== (System.Exception #=q2SoIewfTwhbva5qbj6Cb9g==, System.String #=qSqv3s8taB8Ba3fBG_cWmpg==, System.Object[] #=q$_QFjkb0aomRgLXXyGPp3g==) [0x00000] in <filename unknown>:0
at #=qGJ7G9igE0GxBtc53u$am5w==.#=qOjx6e6Nnmu7RXVJnCwg$Dg== (System.Exception #=qLFoUTKR8Y3OaLg7ljBcblQ==) [0x00000] in <filename unknown>:0
at #=qDj3_TG1XXmlXYhsJcRX8a2ea44jSqKBadnaiItJlSIM=.#=q3hC3d4sJ13mH_DtJtMzSGQ== (System.Exception #=qwV17bQiEOVcVMg6_bmn2tg==) [0x00000] in <filename unknown>:0
at #=qDj3_TG1XXmlXYhsJcRX8a2ea44jSqKBadnaiItJlSIM=.#=q2kJMOFTQ8lMgmArDKe5Hfg== (#=qkM5C8VFtbTbWE7nlyRqPDw== #=q4oFpVl2ogVP4UaEwEpZmRQ==) [0x00000] in <filename unknown>:0
at #=q8QxSB3XrRUrcNEOZIEOatAyKrmnPJyPNuyqRLSxh4L4=.#=qgBIADda3joj6XtVTeaFk_A== (System.String[] #=q8bJkUGK$zhK06u03EiGD2A==) [0x00000] in <filename unknown>:0
at System.AppDomain.ExecuteAssembly (System.AppDomain , System.Reflection.Assembly , System.String[] ) [0x00000] in <filename unknown>:0
at System.AppDomain.ExecuteAssemblyInternal (System.Reflection.Assembly a, System.String[] args) [0x00000] in <filename unknown>:0
at System.AppDomain.ExecuteAssembly (System.String assemblyFile, System.Security.Policy.Evidence assemblySecurity, System.String[] args) [0x00000] in <filename unknown>:0
at #=q8QxSB3XrRUrcNEOZIEOatAyKrmnPJyPNuyqRLSxh4L4=.#=qgBIADda3joj6XtVTeaFk_A== (System.String[] #=q8bJkUGK$zhK06u03EiGD2A==) [0x00000] in <filename unknown>:0
Thread: .locals, State: WaitSleepJoin, Alive: True, Background: False
It seems SpaceChem was using the SDL_image.framework
(a newer version?) from /Library/Frameworks
. Renaming it makes SpaceChem run.
Do you know of a way to have SpaceChem ignore the frameworks installed in /Library/Frameworks
?
P.S. Running SpaceChem.bin.osx from the console causes problems with mouse and text input in the game. The window doesn't get focus, so all input goes to the console. This is not an issue when running SpaceChem from Finder or Spotlight, thankfully.
I discovered that it's possible to force Mono to use the SDL frameworks included in the app bundle.
In Contents/Resources/Tao.Sdl.dll.config
, change
<dllentry os="osx" dll="../Frameworks/SDL.framework/SDL" />
to
<dllentry os="osx" dll="@executable_path/../Frameworks/SDL.framework/SDL" />
Do the same for SDL_image and SDL_mixer.
Great bughunting, @brechtm! Made it very easy for me to deal with the same issues on my SpaceChem installation. Did you encounter any long-term issues after the fix? My version seems to be running fine, but I didn't play more than a level to check.
I'm going to create a new branch that should generalize to any version of SpaceChem, targeting those three issues:
Thanks @VinceSJ. I didn't really play SpaceChem after getting it to work (also just a single level). I guess the debugging was enough of a fix for my puzzle gaming needs :-)
@leafi I've been working on a new version (I'll push a branch and open a pull request when complete) that would support other installations like Humble Bundle and GOG, but I've encountered a really strange issue. Was hoping you (leafi) might be able to shed some light on it.
If I change fix-spacechem.sh
to target my SpaceChem location, the script takes care of most everything. Only issues that have to be tidied up are a missing symlink (SDL_mixer
) and altering the Tao.Sdl.dll.config
file to point at the frameworks local to the app and not using the system frameworks. With those fixed, SpaceChem runs just fine. Yay.
This is where things get weird.
I figured the easiest way to create a more generalized SpaceChem fix would be to just create a new version of the bonsai.tar.bz2
tarball with the symlink and config stuff already done. Then from there I could add on an option to the shell script that allows targeting non-Steam install locations.
So I made the changes to the tarball, then did a test run, unpacking my new version of the tarball to a fresh Humble Bundle SpaceChem install. Doesn't work.
To sum up, if I make the symlink and config file changes by hand, after the shell script unpacks the tarball, everything works fine. But if I get the shell script to unpack a modified tarball that already has the symlink and config file dealt with, SpaceChem won't run. Any idea what's going wrong here? As far as I can tell, both versions are totally identical if I look at them side-by-side.
Any pointers would be appreciated, thanks.
[P.S. Here's the exception.txt that comes out when things aren't working.]
(Oh god I'm late)
Symlink absolute vs relative path, maybe...?
Oh, and MonoKickStart's path resolving is notably different to vanilla Mono.
I tried to apply your fix to the GOG version of SpaceChem. The real SpaceChem.app is actually contained in GOG's SpaceChem.app at
After copying over the SDL frameworks and the MonoKickstart files, running SpaceChem results in this:
I was hoping you would have a clue about how to fix this.