Recently I wanted to install Smoking' Guns on Yosemite because I didn't bring my Windows laptop, but it crashed immediately after I started it with a stack trace like this:
- Code: Select all
Crashed Thread: 1 Dispatch queue: com.apple.libdispatch-manager
Exception Type: EXC_CRASH (SIGSEGV)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Thread 0:: Dispatch queue: com.apple.main-thread
0 com.apple.CoreGraphics 0x96d575d9 interpolate_table + 165
1 com.apple.CoreGraphics 0x96d5748f CGSGetDisplayTransferByTable + 249
2 libSDL-1.2.0.dylib 0x01bb57b2 QZ_GetGammaRamp + 106
3 libSDL-1.2.0.dylib 0x01ba551d SDL_GetGammaRamp + 183
4 libSDL-1.2.0.dylib 0x01ba5696 SDL_SetGammaRamp + 294
5 libSDL-1.2.0.dylib 0x01ba5928 SDL_SetGamma + 401
6 net.smokin-guns.www 0x00196aeb GLimp_Init + 662
7 net.smokin-guns.www 0x000ec7c6 InitOpenGL + 46
8 net.smokin-guns.www 0x000efa4a R_Init + 1004
9 net.smokin-guns.www 0x000f9d28 RE_BeginRegistration + 25
10 net.smokin-guns.www 0x0001a281 CL_InitRenderer + 33
11 net.smokin-guns.www 0x0001a343 CL_StartHunkUsers + 73
12 net.smokin-guns.www 0x0003e7d8 Com_Init + 1937
13 net.smokin-guns.www 0x0011a1bd SDL_main + 635
14 net.smokin-guns.www 0x00197044 -[SDLMain applicationDidFinishLaunching:] + 75
The 'fix' I came up with is to patch libSDL to fail on SDL_SetGammaRamp. It breaks the 'Brightness' setting, but the game is perfectly playable apart from that.
This is a link to my MEGA folder with the modified libSDL source code and also a fixed Smoking' Guns.app file. Basically all you have to do is replace libSDL-1.2.0.dylib with the compiled version.
Link: libSDL-1.2.15 SetGammaRamp fix
An actual fix would be to port the engine to libSDL-2.0. I did some attempts, but I don't have enough understanding of the engine (yet) to do it so I decided to fix it like this instead.
In the folder there is another game that uses libSDL-1.2.0.dylib (OpenArena). The same fix works for that game.
Hope this helps some people,