-
-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix platform checks and crash on Mac OS X #2600
Conversation
Have this issue too. Thank you. |
How do I use this? |
The fix is not deployed yet @GabrielHogan |
Is there any way for me to fix & compile this myself? |
(Link removed, get https://github.com/KSP-CKAN/CKAN/releases/latest) |
Thank You! |
Thank you! This worked for me as well! |
hi, I am creator of issue #2612 . When I tried the fix it didn't work on my computer. |
@maxthrustau, can you add a stack trace to your issue? If it's really a different problem we can re-open it for investigation. |
stack trace? |
what's that? (sorry I do not have a computer background) |
Hmm, how did you test the fix? |
I tried it out in place of the old ckan file |
Meaning what? You double clicked on the EXE file? |
no I ran it through terminal with mono --arch=32 ckan.exe |
OK, good. Did it print anything in the terminal? Usually that's where the stack trace would appear. |
Umm yeah my terminal blurted out a large amount of code before the terminal froze |
OK, if you can copy paste that text into your issue there's a chance we can fix it. |
do u want all the code because it took me 4 minutes to copy and paste |
Whatever you can manage to grab, lay it on us: #2612 |
umm, I can't type it all in because my comment is too long |
Whatever you can manage to grab, lay it on us: #2612 |
Hey! @DasSkelett Any chance you could do the same with the osx file for us poor mac users? there's an issue in #2595 that's fixed here (i think) -- it causes ckan to crash on startup so the latest release is unusable on OSX at the moment as far as I'm aware! Cheers!! Richie |
Do you mean the CKAN.dmg with 'osx file'? Also I think a new CKAN release is around the corner, but @politas knows more about this. |
@DasSkelett , you probably can build it if you have a working Linux system... cd macosx
make Look for the dmg file in _build/osx. |
Yeah, that's the one sorry! - no problem I can use the .exe with mono as you said :) Also worth noting to other OSX users that you can delete the GUIConfig.xml file from the /ckan directory and re-run cKan which will 'fix' the issue for that load and it doesn't delete your installed mod's etc if you want to stay on the current release but need a 'quick fix' Cheers Both!! |
Oh okay, never knew that, thanks @HebaruSan @RichieGrahamRichie2k3, (Link removed, get https://github.com/KSP-CKAN/CKAN/releases/latest) contains the .dmg compiled from the current master branch HEAD (62da77d). |
@DasSkelett - just tried it, works perfectly and no need to delete GUIConfig.xml each time Thank you!! |
Problem
Mac clients are failing currently:
Cause
#2586 added some X11-specific code to set the window name. We use
Platform.IsUnix
to determine whether to run it:CKAN/GUI/Main.cs
Lines 263 to 267 in 7413c23
Platform.IsUnix
's documentation says "but not Mac":CKAN/Core/Platform.cs
Lines 60 to 67 in 7413c23
However, this is false;
IsUnix
is true on Mac, becauseEnvironment.OSVersion.Platform
has the same value on both.https://docs.microsoft.com/en-us/dotnet/api/system.platformid?view=netframework-4.7.2
Notably, this causes the wrong code to run on Macs in other places:
CKAN/GUI/Configuration.cs
Lines 88 to 94 in 7413c23
CKAN/GUI/URLHandlers.cs
Lines 36 to 39 in 7413c23
Changes
Now
Platform.IsUnix
is false on Mac, as per the documentation. This will prevent that code from running on Mac, and might also prevent some problems with thoseConfiguration
andURLHandler
snippets.Now the X11-specific code from #2586 is governed by a new
Platform.IsX11
value, which is only true if you're on Unix and the$DISPLAY
environment variable is defined. Maybe this will help if you have Wayland.Now even if you somehow manage to execute the
XSetClassHint
statement on a system that doesn't support it, theDllNotFoundException
exception is simply ignored, because its failure is of no importance.Fixes #2595.