GKGameSession not working with specific account

153 views Asked by At

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

0

There are 0 answers