1

I'm trying to make a simple app using GameKit's GKGameSession released with iOS 10. For the most part everything works fine, however with one of my test accounts I can create a session using GKGameSession.createSessionInContainer:, but fetching sessions causes an error to be returned in the completion handler saying "Couldn't communicate with a helper application".

The code works with my developer account, and also a non developer account on my friends phone, however on my normal iCloud account (which has also been used for development in the past) it keep getting this error whenever I call:

-GKGameSession.loadSessionWithIdentifier

-GKGameSession.loadSessionInContainer

I've check the device logs and it appears that there's a crash in the gamed framework (GameKit from what I understand). The stack trace has no application functions in it, it's all Apple code, so it looks like a background GameKit service is crashing. The line that causes the crash is NSPropertyListSerialization.propertyListWithData:options:format:error: and it throws an exception and called abort().

The backtrace is below:

Incident Identifier: 8752E0F1-3FD4-45FC-93DA-3ED9E873FC9E
CrashReporter Key:   364113fe5ed8ba263006d41287924aedcb897647
Hardware Model:      iPhone8,2
Process:             gamed [1399]
Path:                /usr/libexec/gamed
Identifier:          gamed
Version:             ???
Code Type:           ARM-64 (Native)
Role:                Unspecified
Parent Process:      launchd [1]
Coalition:           <none> [265]


Date/Time:           2017-03-27 07:30:55.8324 +0100
Launch Time:         2017-03-26 23:49:39.2894 +0100
OS Version:          iPhone OS 10.2.1 (14D27)
Report Version:      104

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

Application Specific Information:
abort() called

Filtered syslog:
None found

Last Exception Backtrace:
0   CoreFoundation                  0x184d491b8 __exceptionPreprocess + 124
1   libobjc.A.dylib                 0x18378055c objc_exception_throw + 56
2   CoreFoundation                  0x184d49100 +[NSException raise:format:] + 116
3   Foundation                      0x18577b2b0 +[NSPropertyListSerialization propertyListWithData:options:format:error:] + 76
4   gamed                           0x1000c7cac 0x100014000 + 736428
5   gamed                           0x1000cfa90 0x100014000 + 768656
6   gamed                           0x1000c8190 0x100014000 + 737680
7   gamed                           0x1000cdb6c 0x100014000 + 760684
8   gamed                           0x1000d4428 0x100014000 + 787496
9   gamed                           0x1000e17b4 0x100014000 + 841652
10  libdispatch.dylib               0x183bd21fc _dispatch_call_block_and_release + 24
11  libdispatch.dylib               0x183bd21bc _dispatch_client_callout + 16
12  libdispatch.dylib               0x183bd6d68 _dispatch_main_queue_callback_4CF + 1000
13  CoreFoundation                  0x184cf6810 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
14  CoreFoundation                  0x184cf43fc __CFRunLoopRun + 1660
15  CoreFoundation                  0x184c222b8 CFRunLoopRunSpecific + 444
16  Foundation                      0x18575f26c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
17  Foundation                      0x1857b3aa0 -[NSRunLoop(NSRunLoop) run] + 88
18  gamed                           0x100018bdc 0x100014000 + 19420
19  libdyld.dylib                   0x183c055b8 start + 4

I've tried using the same account on different devices, logging out, hard reset, wiping the device different iCloud containers, resetting iCloud containers and publishing to live and trying a live build but it seems to be the issue is with this specific iCloud account.

I've also made a fresh project and just had a GKGameSession.loadSessionWithIdentifier: call on viewDidLoad() but the outcome is the same each time.

If it's an error with a .plist file being serialised I'd guess that some data associated with this account is corrupted or something?

I've been pulling hair out over this one so any help would be great.

Thanks

Andy Heard
  • 1,715
  • 1
  • 15
  • 25
  • I've seen this exact problem with one account on multiple devices. It started one night in November, and I get that error now on every device. I opened a bug with Apple, and went through all the hoops: create an app that demonstrates the problem. Capture logs. This went on for a few weeks and eventually I gave up. My progress had been completely blocked and I needed to get moving again, so I ripped `GKGameSession` out and moved on. I'd suggest also opening a bug... at least then Apple can't just blame it on my device. :) – Thunk Mar 28 '17 at 04:05
  • @Thunk I suspected as much, I'll open a radar and let them know. Thanks for the info. – Andy Heard Mar 28 '17 at 10:42
  • Andy, did you get anywhere with this issue? I'm encountering a similar issue. – TheBasicMind Jul 09 '17 at 17:53
  • @TheBasicMind I'm afraid not, best wait to see if ios 11 fixes it – Andy Heard Jul 10 '17 at 21:22
  • Andy, I've tested with iOS11 beta, and it does indeed seem to have fixed it (if we have the same issue). The problem doesn't now occur on iOS11, but does for the same apple account for a device on iOS10. So this seems to confirm it is a combination of client and server interactions where if the client is on iOS10 it can get in a permanent bad state and that bad state is transferred to other iOS10 clients (iCloud? Keychain? - TBH I've no idea). – TheBasicMind Jul 12 '17 at 12:27

0 Answers0