Skip to content

Instantly share code, notes, and snippets.

@mariogt
Last active September 2, 2021 00:25
Show Gist options
  • Save mariogt/bd848933434647fff62b1e627e1db004 to your computer and use it in GitHub Desktop.
Save mariogt/bd848933434647fff62b1e627e1db004 to your computer and use it in GitHub Desktop.
Temporary fix for the Launch Crash of OpenEmu on Mac OS X 10.14 Mojave (Beta 5)
/*
Hi to all, I was testing openEmu in Mac OS X Mojave (Dev Beta 5), and did crash
immediately, then following the crash report:
Dyld Error Message:
Symbol not found: _OBJC_CLASS_$_IKCGRenderer
Referenced from: /Applications/OpenEmu.app/Contents/MacOS/OpenEmu
Expected in: /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/ImageKit.framework/Versions/A/ImageKit
in /Applications/OpenEmu.app/Contents/MacOS/OpenEmu
I investigated further in the source code and fixed the issue, now OpenEmu
starts and works kinda ok. The problem is within this Category implementation:
File: OEGridView.m
*/
@implementation IKCGRenderer (ScaleFactorAdditions)
- (unsigned long long)scaleFactor {
return self->_currentScaleFactor ?: 1.0;
}
@end
// The problem is that the Category in the interface is not declared, its only
// declared as conform to IKRendered protocol, where is (ScaleFactorAdditions) ? :
// File: IKRenderer.h
@interface IKCGRenderer : NSObject <IKRenderer> {
struct CGContext *_ctx;
float _currentAlpha;
BOOL _smoothFonts;
unsigned long long _currentScaleFactor;
}
// I just deleted the Category part in the IKCGRenderer implementation & compiled
// it with XCode 10 (Beta) now the App dosen`t crash on startup and works, but with
// some glitches in the rendering of the games artbox tiles. Nevertheless if you
// resize the window or select another game console library the problem is gone.
// This is the "fixed" implementation:
@implementation IKCGRenderer /*(ScaleFactorAdditions)*/
- (unsigned long long)scaleFactor {
return self->_currentScaleFactor ?: 1.0;
}
@end
/*
I don't know from where the "scaleFactor" method is called, I looked for it by
putting an NSLog(@"_currentScaleFactor %qi\n", _currentScaleFactor) inside the
method body, but nothings is logged in the runtime. I hope this info is useful,
thanks.
Mario Gajardo Tassara
[email protected]
https://www.mariogt.com
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment