gpt4 book ai didi

ios - com.apple.gamed 在删除游戏时崩溃

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:37:19 24 4
gpt4 key购买 nike

<分区>

我有一个 iOS 应用程序,当您尝试使用

删除 GKTurnBasedMatch 时,它一直崩溃
[match removeWithCompletionHandler:^(NSError *error){}];

当调用完成处理程序时,error 为 nil,这意味着它成功删除了匹配项。比赛确实被删除了(它永远不会重新出现),但与此同时,gamed(由 apple 编写的与 GameCenter 服务器通信的后台守护进程)崩溃了。

这是我在删除游戏时在控制台中看到的内容:

Jan 19 20:47:22 Ben-L-iPhone gamed[2233] <Error>: *** Terminating app due to uncaught exception 'NSObjectInaccessibleException', reason: 'CoreData could not fulfill a fault for '0xd000000000b4002a <x-coredata://C0390AE6-6CD0-4A7C-B080-B7649175419A/TurnBasedSession/p45>''
*** First throw call stack:
(0x185ce309c 0x191c61d78 0x1859eb7ac 0x1859fc50c 0x1859fc47c 0x185a7475c 0x185a79034 0x185a797f4 0x185a7a474 0x1922303e0 0x192235d88 0x185a6f3e4 0x185a7a104 0x1859fdbd0 0x100099284 0x185a71b6c 0x1922303e0 0x192235f2c 0x185a71d00 0x10009ce08 0x1000ba8a4 0x192230420 0x1922303e0 0x192235930 0x1922303e0 0x1922373fc 0x192237638 0x1923c5918 0x1923c57a8)
Jan 19 20:47:22 Ben-L-iPhone ReportCrash[2509] <Notice>: ReportCrash acting against PID 2233
Jan 19 20:47:22 Ben-L-iPhone ReportCrash[2509] <Notice>: Formulating crash report for process gamed[2233]
Jan 19 20:47:22 Ben-L-iPhone com.apple.launchd[1] (com.apple.gamed[2233]) <Warning>: (com.apple.gamed) Job appears to have crashed: Abort trap: 6
Jan 19 20:47:22 Ben-L-iPhone ReportCrash[2509] <Notice>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/gamed_2014-01-19-204722_Ben-L-iPhone.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0

有什么想法可以触发这个吗?我搜索了 Apple Dev 论坛和 Google,但未能找到有类似问题的人。

记录崩溃报告

Incident Identifier: C201F189-7311-49E5-96F4-890A65FAA19A
CrashReporter Key: 0b745533f4a51b30bf9654557be6c063d06f1ccc
Hardware Model: iPhone6,1
Process: gamed [2233]
Path: /usr/libexec/gamed
Identifier: gamed
Version: ???
Code Type: ARM-64 (Native)
Parent Process: launchd [1]

Date/Time: 2014-01-19 20:47:22.522 -0600
OS Version: iOS 7.0.4 (11B554a)
Report Version: 104

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 11

Last Exception Backtrace:
0 CoreFoundation 0x185ce309c __exceptionPreprocess + 132
1 libobjc.A.dylib 0x191c61d78 objc_exception_throw + 60
2 CoreData 0x1859eb7ac _PFFaultHandlerLookupRow + 1900
3 CoreData 0x1859fc50c -[NSManagedObject(_NSInternalMethods) _newPropertiesForRetainedTypes:andCopiedTypes:preserveFaults:] + 108
4 CoreData 0x1859fc47c -[NSManagedObject(_NSInternalMethods) _newAllPropertiesWithRelationshipFaultsIntact__] + 108
5 CoreData 0x185a7475c -[NSManagedObjectContext(_NSInternalAdditions) _committedSnapshotForObject:] + 72
6 CoreData 0x185a79034 -[NSManagedObjectContext(_NestedContextSupport) _copyChildObject:toParentObject:fromChildContext:] + 144
7 CoreData 0x185a797f4 -[NSManagedObjectContext(_NestedContextSupport) _parentProcessSaveRequest:inContext:error:] + 1092
8 CoreData 0x185a7a474 __82-[NSManagedObjectContext(_NestedContextSupport) executeRequest:withContext:error:]_block_invoke + 660
9 libdispatch.dylib 0x1922303e0 _dispatch_client_callout + 16
10 libdispatch.dylib 0x192235d88 _dispatch_barrier_sync_f_slow + 352
11 CoreData 0x185a6f3e4 _perform + 124
12 CoreData 0x185a7a104 -[NSManagedObjectContext(_NestedContextSupport) executeRequest:withContext:error:] + 184
13 CoreData 0x1859fdbd0 -[NSManagedObjectContext save:] + 840
14 gamed 0x100099284 0x100048000 + 332420
15 CoreData 0x185a71b6c developerSubmittedBlockToNSManagedObjectContextPerform + 100
16 libdispatch.dylib 0x1922303e0 _dispatch_client_callout + 16
17 libdispatch.dylib 0x192235f2c _dispatch_barrier_sync_f_invoke + 48
18 CoreData 0x185a71d00 -[NSManagedObjectContext performBlockAndWait:] + 132
19 gamed 0x10009ce08 0x100048000 + 347656
20 gamed 0x1000ba8a4 0x100048000 + 469156
21 libdispatch.dylib 0x192230420 _dispatch_call_block_and_release + 24
22 libdispatch.dylib 0x1922303e0 _dispatch_client_callout + 16
23 libdispatch.dylib 0x192235930 _dispatch_async_redirect_invoke + 152
24 libdispatch.dylib 0x1922303e0 _dispatch_client_callout + 16
25 libdispatch.dylib 0x1922373fc _dispatch_root_queue_drain + 400
26 libdispatch.dylib 0x192237638 _dispatch_worker_thread2 + 76
27 libsystem_pthread.dylib 0x1923c5918 _pthread_wqthread + 356
28 libsystem_pthread.dylib 0x1923c57a8 start_wqthread + 4

附加信息我回去并在 removeMatch 周围添加了日志记录。此日志记录来自沙箱,但它也发生在生产中。

请注意,在比赛被删除之前,游戏已经处于最终状态(status:GKTurnBasedMatchStatusEnded)。

我一删除比赛,就尝试开始一场新的比赛。第一次尝试导致 “操作无法完成。(Cocoa 错误 4097。)”,将近 2 分钟后第二次尝试导致 GKServerStatusCode=5000因为玩家不再经过身份验证。

2014-01-19 22:23:31.436 KingChase[3432:70b] removing match <GKTurnBasedMatch 0xc50d8f0 - matchID:e0e24a77-fb5c-46a7-b843-21e8becf9735 bundleID:us.pojo.kingchase status:GKTurnBasedMatchStatusEnded message:'Game Over! kctest2 won.' creationDate:2014-01-20 04:17:31 +0000 currentParticipant:(null) participants:<GKTurnBasedParticipant 0xc4e9870 - playerID:G:1972295489 (local player) status:Done matchOutcome:Won lastTurnDate:2014-01-20 04:22:50 +0000 timeoutDate:(null)>,<GKTurnBasedParticipant 0xc439aa0 - playerID:G:1972168157 status:Done matchOutcome:Lost lastTurnDate:2014-01-20 04:23:17 +0000 timeoutDate:(null)> matchData.length:438 matchDataMaximumSize:65536 exchanges:(null)>
2014-01-19 22:23:31.441 KingChase[3432:70b] Match removed.
2014-01-19 22:23:31.442 KingChase[3432:70b] Match cleaned up.
2014-01-19 22:23:40.681 KingChase[3432:70b] Match Making failed. Error Domain=NSCocoaErrorDomain Code=4097 "The operation couldn’t be completed. (Cocoa error 4097.)"
2014-01-19 22:25:30.053 KingChase[3432:70b] Match Making failed. Error Domain=GKErrorDomain Code=6 "The requested operation could not be completed because local player has not been authenticated." UserInfo=0xc527430 {GKServerStatusCode=5000, NSUnderlyingError=0xc5222b0 "The operation couldn’t be completed. status = 5000, missing required header: x-gk-player-id", NSLocalizedDescription=The requested operation could not be completed because local player has not been authenticated.}

其他玩家能够删除游戏而不会导致游戏崩溃。

更新于 2014 年 1 月 20 日 - 下午 6:32 CDT - 更多信息

我在与 GameKit 进行的每一次交互中都添加了日志记录。

Jan 20 17:39:17 Ben-L-iPhone KingChase[3154] <Warning>: GK: [match.currentParticipant.playerID isEqualToString:localPlayer.playerID]
Jan 20 17:39:17 Ben-L-iPhone KingChase[3154] <Warning>: GK: [match participantQuitOutOfTurnWithOutcome:GKTurnBasedMatchOutcomeQuit withCompletionHandler:completionHandler];
Jan 20 17:39:18 Ben-L-iPhone KingChase[3154] <Warning>: removing match <GKTurnBasedMatch 0x1669bdb0 - matchID:a182e163-8006-413e-a203-c93d534ac550 bundleID:us.pojo.kingchase status:GKTurnBasedMatchStatusEnded message:'Game Over! kctest1 won.' creationDate:2014-01-20 23:12:32 +0000 currentParticipant:(null) participants:<GKTurnBasedParticipant 0x166ae6f0 - playerID:G:1972168157 (local player) status:Done matchOutcome:Won lastTurnDate:2014-01-20 23:27:14 +0000 timeoutDate:(null)>,<GKTurnBasedParticipant 0x1664d260 - playerID:G:1972295489 status:Done matchOutcome:Lost lastTurnDate:2014-01-20 23:38:15 +0000 timeoutDate:(null)> matchData.length:390 matchDataMaximumSize:65536 exchanges:(null)>
Jan 20 17:39:18 Ben-L-iPhone KingChase[3154] <Warning>: GK: [match removeWithCompletionHandler:^(NSError *error)
Jan 20 17:39:18 Ben-L-iPhone KingChase[3154] <Warning>: Match removed.
Jan 20 17:39:18 Ben-L-iPhone KingChase[3154] <Warning>: Match cleaned up.
Jan 20 17:39:19 Ben-L-iPhone gamed[3125] <Error>: *** Terminating app due to uncaught exception 'NSObjectInaccessibleException', reason: 'CoreData could not fulfill a fault for '0xd00000000024001a <x-coredata://3A4F66E1-B95C-4692-B905-EA1398FB97CE/TurnBasedSession/p9>''
*** First throw call stack:
(0x185ce309c 0x191c61d78 0x1859eb7ac 0x1859fc50c 0x1859fc47c 0x185a7475c 0x185a79034 0x185a797f4 0x185a7a474 0x1922303e0 0x192235d88 0x185a6f3e4 0x185a7a104 0x1859fdbd0 0x10014d284 0x185a71b6c 0x1922303e0 0x192235f2c 0x185a71d00 0x100150e08 0x10016e8a4 0x192230420 0x1922303e0 0x192235930 0x1922303e0 0x1922373fc 0x192237638 0x1923c5918 0x1923c57a8)

我认为这现在与我的使命有关

[match participantQuitOutOfTurnWithOutcome:GKTurnBasedMatchOutcomeQuit withCompletionHandler:completionHandler];

游戏结束后。我会在有时间的时候测试这个假设,并将错误报告提交给 Apple。

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com