Core Plot 2.2在OS X 10.8上崩溃,使用"无法识别的选择器"例外

时间:2016-12-11 14:06:49

标签: core-plot osx-mountain-lion

我在macOS Sierra上使用Xcode 8.1。我的应用程序的部署目标设置为10.8,它使用Core Plot 2.2,它应该与10.8兼容。该应用程序可以在我的开发机器上运行,但是当我在OS X 10.8.5(VMware Fusion虚拟机)上启动时,它会在打开包含CPTGraph的主窗口时崩溃。

堆栈追踪:

OS Version:      Mac OS X 10.8.5 (12F2560)
Report Version:  10

Interval Since Last Report:          227946 sec
Crashes Since Last Report:           8
Per-App Interval Since Last Report:  87 sec
Per-App Crashes Since Last Report:   3
Anonymous UUID:                      25357976-7739-B0C4-594A-D7FC51D4A1F3

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFConstantString boundingRectWithSize:options:attributes:context:]: unrecognized selector sent to instance 0x1012ab910'
abort() called
terminate called throwing an exception

Application Specific Backtrace 1:
0   CoreFoundation                      0x00007fff81e7fb06 __exceptionPreprocess + 198
1   libobjc.A.dylib                     0x00007fff856073f0 objc_exception_throw + 43
2   CoreFoundation                      0x00007fff81f1640a -[NSObject(NSObject) doesNotRecognizeSelector:] + 186
3   CoreFoundation                      0x00007fff81e6e02e ___forwarding___ + 414
4   CoreFoundation                      0x00007fff81eb3dad __forwarding_prep_1___ + 237
5   CorePlot                            0x000000010139d96e -[NSString(CPTTextStyleExtensions) sizeWithTextStyle:] + 93
6   CorePlot                            0x00000001013858e9 -[CPTTextLayer sizeThatFits] + 198
7   CorePlot                            0x00000001013859b2 -[CPTTextLayer sizeToFit] + 93
8   CorePlot                            0x0000000101384df0 -[CPTTextLayer initWithText:style:] + 295
9   CorePlot                            0x000000010134ee14 -[CPTGraph setTitle:] + 448
10  RehaSport Desktop                   0x0000000101266dcd RehaSport Desktop + 331213

显然boundingRectWithSize:options:attributes:context:被调用,但这只适用于macOS 10.11及更新版本。

有什么想法吗?

1 个答案:

答案 0 :(得分:1)

这是一个Core Plot错误。我在release-2.3分支上修复了它。