OneLife icon indicating copy to clipboard operation
OneLife copied to clipboard

Can't run on Mojave

Open flevour opened this issue 8 years ago • 21 comments

Gets stuck here: image

Last time I've played the game it updated to OneLife_v140.

Output from CLI:

➜  /Applications/OneLife_v58b/OneLife_v140.app/Contents/MacOS/OneLife
Local epoch time  = -3600
GMT epoch time  = 0
/BuildRoot/Library/Caches/com.apple.xbs/Sources/AppleFSCompression/AppleFSCompression-96.200.3/Common/ChunkCompression.cpp:49: Error: unsupported compressor 8
/BuildRoot/Library/Caches/com.apple.xbs/Sources/AppleFSCompression/AppleFSCompression-96.200.3/Libraries/CompressData/CompressData.c:353: Error: Unknown compression scheme encountered for file '/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/Exceptions.plist'
/BuildRoot/Library/Caches/com.apple.xbs/Sources/AppleFSCompression/AppleFSCompression-96.200.3/Common/ChunkCompression.cpp:49: Error: unsupported compressor 8
/BuildRoot/Library/Caches/com.apple.xbs/Sources/AppleFSCompression/AppleFSCompression-96.200.3/Libraries/CompressData/CompressData.c:353: Error: Unknown compression scheme encountered for file '/System/Library/CoreServices/CoreTypes.bundle/Contents/Library/AppExceptions.bundle/Exceptions.plist'
If you're running this from the command line, the working directory is being overridden and set to /Applications/OneLife_v58b

Decompressing took 0.002000 seconds
Loaded 1421 tagged sprites from sprites folder
Loaded 278 sound IDs from sounds folder
Decompressing took 0.053000 seconds
Loaded 1648 animations from animations folder
Finished loading animation bank in 0.595000 sec
Decompressing took 0.028000 seconds
Object id 793 (The Apocalypse) seen as an apocalypse trigger
Loaded 1564 objects from objects folder
  Auto-generated 1730 'used' objects
  Auto-generated 210 'variable' objects
Finished loading object bank in 6.538000 sec
Decompressing took 0.001000 seconds
Loaded 85 categories from categories folder
Finished loading category bank in 6.893000 sec
Decompressing took 0.002000 seconds
Frame rate = 11.038746 frames/second
Loaded 2008 transitions from transitions folder
Auto-generated 778 transitions based on categories
Auto-generated 292 transitions based on pattern categories
Run 0:  Auto-modified 222 transitions based generic use transitions and auto-added 210 last use generic transitions (40 objects had generic use transitions defined).
Run 1:  Auto-modified 18 transitions based generic use transitions and auto-added 210 last use generic transitions (40 objects had generic use transitions defined).
Auto-generated 6405 transitions based on used objects, 67 removed in the process.
Auto-generated 1009 transitions based on variable objects.
Frame rate = 28.530671 frames/second
Frame rate = 59.844404 frames/second
<goes on and on>

I've also tried to redownload from personal download link to no avail (still downloads OneLife_v58b and not the latest).

I'm running Mac OS Mojave in dark appearance.

I've also tried to switch back to light appearance but result is still I can't run the game.

I also have to Force Quit it in order to exit the app.

flevour avatar Oct 18 '18 15:10 flevour

Reproduced on master with macOS 10.14. Window responds to input but doesn't display anything. Can login to server by guessing button positions and quit with Esc-% sequence.

oddbury avatar Oct 24 '18 22:10 oddbury

Several reports of OpenGL incompatibility with Mojave. Most prevalent are some changes to the behaviour of drawRect and wantsUpdateLayer. SDL changeset here suggests a possible solution but it relates to SDL2 not SDL-1.2.

oddbury avatar Oct 24 '18 22:10 oddbury

This thread talks about a (different?) issue where the window is empty until something causes and expose. That isn't the behaviour we see, the window stays empty even once moved, but again this is probably regarding SDL2. They allude to SDL1.2 at the bottom of that thread. How long until it gets patched? Last SDL 1.2 patch was in 2012.

oddbury avatar Oct 24 '18 23:10 oddbury

I can get the picture back by adding the following category to SDLMain.m:

@implementation NSView (UpdateLayer)
- (BOOL)wantsUpdateLayer {
  return YES;
}
- (void)updateLayer {
  [[NSOpenGLContext currentContext] update];
}
@end

I'm not certain about the wisdom adding the category to the entirety of NSView but I figure there are basically only two views here: the content area and the window title bar. It would be better to add it to SDL_QuartzView but that isn't exposed by the SDL headers. Is it possible to reference it anyway?

Anyway, then it turns out vsync isn't working either. Playing at a 1000fps here now. Ryan Gordon (one of the SDL devs) listed a broken vsync as one of the things Mojave broke in SDL here.

oddbury avatar Oct 25 '18 17:10 oddbury

Thanks Chard!

Sure glad I'm not launching the Mac version on Steam in two days.

Do you have a non-Mojave machine that you can test the above objective C change on?

jasonrohrer avatar Nov 07 '18 05:11 jasonrohrer

I’ve tried it on 10.13 where it was running fine and vsync working there too. 10.13 and 10.14 are my only Macs right now.

I added a PR in minorGems as that is definitely the place to fix this (if not in SDL itself). No further news on the vsync issue though; I couldn’t work it out.

oddbury avatar Nov 07 '18 07:11 oddbury

I'm running 10.14 on my Mac and some lower version in my wife's computer if I can help testing this out. Even though I'm a programmer myself, I'm not familiar with building this sort of projects, so I'd need some guidance!

flevour avatar Nov 07 '18 08:11 flevour

Well, I'll make it the default code for now, and we'll see what happens.

The problem is that new downloaders won't be able to see to log in the first time, so they won't get the update. I have to update the mac main download too.

jasonrohrer avatar Nov 07 '18 23:11 jasonrohrer

Sheesh, they're dropping OpenGL? What are they thinking?

I think I may be done offering my games on Apple platforms. It has been a nightmare my whole coding life, pretty much.

jasonrohrer avatar Nov 07 '18 23:11 jasonrohrer

Did the change work on the system on which you create the macOS builds?

oddbury avatar Nov 07 '18 23:11 oddbury

Seems to be working.

jasonrohrer avatar Nov 07 '18 23:11 jasonrohrer

Okay, v163 was just posted, and it includes this change.

You will have to download the whole game again from your original download link to test it. There's a new v163 DMG posted there.

jasonrohrer avatar Nov 08 '18 05:11 jasonrohrer

Thanks for the work you put into getting it this fixed. I'm almost reluctant to add the following, given your inclination towards the Apple platform ...

The black screen has been fixed, now I'm left with the screen stuck at this stage. It seemed to be frozen, but I let it go for a while and I started hearing the starvation sounds in the background. I eventually died and the screen changed to the "You died" screen. Should I open a new issue with this description or should we keep it here for context?

image

flevour avatar Nov 08 '18 14:11 flevour

This is on 10.14.1?

oddbury avatar Nov 08 '18 14:11 oddbury

This is still on 10.14 although I can upgrade to 10.14.1 if needed.

image

Also I had a few fpsLoginError and notifications about vsync not being available, but it's not happening anymore.

flevour avatar Nov 08 '18 15:11 flevour

This is weird. v163 (now v164) ran perfectly for me as a clean install. Even the vsync was working.

@flevour Try this:

  • Make sure all installations are removed completely.
  • Go to ~/Library/Preferences and delete the OneLife_prefs.txt file.
  • Now install the application afresh and step through the macOS security prompts.

oddbury avatar Nov 08 '18 17:11 oddbury

@flevour yes, that likely means it's not finding all the files it needs. Maybe @chardbury is right.... it might be looking at an old folder via OneLife_prefs.txt

Sheesh, sandboxing and all the rest is SUCH a mess!

You guys remember OS 8? Those were the days!

jasonrohrer avatar Nov 08 '18 17:11 jasonrohrer

Okay, the linking that happens when Jason builds it on his machine is different to my dev environment.

$ nm /Applications/OneLife_v163/OneLife_v163.app/Contents/MacOS/OneLife | grep NSOpenGLContext
         U .objc_class_name_NSOpenGLContext

$ nm build/client/OneLife | grep NSOpenGLContext
                 U _OBJC_CLASS_$_NSOpenGLContext

This could explain why vsync suddenly works, but I've no idea how. I'm out of my depth here.

oddbury avatar Nov 08 '18 17:11 oddbury

Yes, chard, I'm building on 10.5

Back then, it shipped with gcc!

jasonrohrer avatar Nov 08 '18 18:11 jasonrohrer

Assuming @flevour comes back with a positive then this might be solved.

oddbury avatar Nov 08 '18 18:11 oddbury