我经常从GA和用户那里收到这个崩溃报告...但是我无法在测试iPhone5、5s、6的iOS7和iOS8时再现此异常。这个问题在应用程序进入后台时出现了。奇怪的是,Gamecenter会调用Spritekit来显示成就横幅?有人遇到过同样的问题吗?
与上面的结果一样,它会引起以下异常,这意味着系统将SKNode与[GKPlayer postChangeNotification]进行比较......真的很奇怪。
Last Exception Backtrace:
0 CoreFoundation 0x23c99e3f __exceptionPreprocess + 127
1 libobjc.A.dylib 0x31371c8b objc_exception_throw + 38
2 CoreFoundation 0x23c9f189 -[NSObject(NSObject) doesNotRecognizeSelector:] + 188
3 CoreFoundation 0x23c9d0a7 ___forwarding___ + 714
4 CoreFoundation 0x23bcf208 _CF_forwarding_prep_0 + 24
5 SpriteKit 0x26fe9689 -[SKNode isEqual:] + 164
6 Foundation 0x248ec9ff +[NSObject(NSDelayedPerforming) cancelPreviousPerformRequestsWithTarget:] + 358
7 GameCenterFoundation 0x2a945873 -[GKPlayer postChangeNotification] + 38
8 GameCenterFoundation 0x2a958d21 __52-[GKDaemonProxy setLocalPlayer:authenticated:reply:]_block_invoke + 848
9 libdispatch.dylib 0x318d18cb _dispatch_call_block_and_release + 10
10 libdispatch.dylib 0x318d18b7 _dispatch_client_callout + 22
11 libdispatch.dylib 0x318d50bf _dispatch_main_queue_callback_4CF + 722
12 CoreFoundation 0x23c5fbe9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
13 CoreFoundation 0x23c5e2e9 __CFRunLoopRun + 1512
14 CoreFoundation 0x23bac621 CFRunLoopRunSpecific + 476
15 CoreFoundation 0x23bac433 CFRunLoopRunInMode + 106
16 GraphicsServices 0x2af1b0a9 GSEventRunModal + 136
17 UIKit 0x27197359 UIApplicationMain + 1440
18 MyAppName 0x001b4f27 main (main.m:16)
19 libdyld.dylib 0x318f1aaf start + 2
在iOS8 GKLocalPlayerInternal Unrecognized Selector问题上出现了类似的崩溃问题。
我尝试使用SKNode和GKPlayer进行测试。
SKNode* node = [SKNode node];
GKPlayer* player = [GKLocalPlayer localPlayer];
[node isEqual:player];
与上面的结果一样,它会引起以下异常,这意味着系统将SKNode与[GKPlayer postChangeNotification]进行比较......真的很奇怪。
-[GKLocalPlayerInternal name]: unrecognized selector sent to instance 0x1b6e3f80