In our latest two releases we've starte getting sporadic crash reports that I'm having a tough time understanding. Unfortunatly, we haven't been able to reproduce the crash in debug mode with a local build, so we have to do our best to parse the crash report and diagnose from there.
At this point in the application, it queries Game Center for matches, sorts them based on latest activity and match status, loads the match data for each match, and then populates a UITableView using custom table view cells.
The code complies fine, runs in debug mode on devices and most of the time works in the app that's released in production (only affecting ~10% of users). We've seen it on both iPads and iPhones. In trying to manually reproduce it on my phone, I have been able to get the crash to happen sometimes by pulling down on the table and initiating the refreshControl, other times, just navigating away from the MatchListViewController and returning. Sometimes it seems to happen immediately on launch.
My current gut feelng is that it has something to do with the asynchronous blocks inside asynchoronous blocks. Maybe something is no longer in memory or has changed by the time on of the completion handlers are called.
Is anyone able to see anything in the below crash log to help point me in the right direction?
The symbolicated crash report looks like this:
0
Toccata
MatchListViewController.swift line 0
function signature specialization <Arg[0] = Owned To Guaranteed and Exploded, Arg[1] = Owned To Guaranteed> of Toccata.MatchListViewController.sortMatches (Toccata.MatchListViewController)(Swift.Array<Toccata.Match>) -> Swift.Array<Toccata.Match>
1
libobjc.A.dylib
objc_object::sidetable_release(bool) + 184
2
Toccata
MatchListViewController.swift line 86
Toccata.MatchListViewController.(loadMatches (Toccata.MatchListViewController) -> (completionHandler : Swift.Optional<() -> ()>) -> ()).(closure #1)
3
Toccata
MatchListViewController.swift line 0
partial apply forwarder for Toccata.MatchListViewController.(loadMatches (Toccata.MatchListViewController) -> (completionHandler : Swift.Optional<() -> ()>) -> ()).(closure #1) with unmangled suffix "55"
4
Toccata
MatchListViewController.swift line 0
partial apply forwarder for reabstraction thunk helper from @callee_owned (@owned Swift.ImplicitlyUnwrappedOptional<Swift.Array<Swift.AnyObject>>, @owned Swift.ImplicitlyUnwrappedOptional<ObjectiveC.NSError>) -> (@unowned ()) to @callee_owned (@in (Swift.ImplicitlyUnwrappedOptional<Swift.Array<Swift.AnyObject>>, Swift.ImplicitlyUnwrappedOptional<ObjectiveC.NSError>)) -> (@out ()) with unmangled suffix "58"
5
Toccata
MatchListViewController.swift line 0
partial apply forwarder for reabstraction thunk helper from @callee_owned (@in (Swift.ImplicitlyUnwrappedOptional<Swift.Array<Swift.AnyObject>>, Swift.ImplicitlyUnwrappedOptional<ObjectiveC.NSError>)) -> (@out ()) to @callee_owned (@owned Swift.ImplicitlyUnwrappedOptional<Swift.Array<Swift.AnyObject>>, @owned Swift.ImplicitlyUnwrappedOptional<ObjectiveC.NSError>) -> (@unowned ()) with unmangled suffix "61"
6
Toccata
MatchListViewController.swift line 0
reabstraction thunk helper from @callee_owned (@owned Swift.ImplicitlyUnwrappedOptional<Swift.Array<Swift.AnyObject>>, @owned Swift.ImplicitlyUnwrappedOptional<ObjectiveC.NSError>) -> (@unowned ()) to @callee_unowned @convention(block) (@unowned Swift.ImplicitlyUnwrappedOptional<ObjectiveC.NSArray>, @unowned Swift.ImplicitlyUnwrappedOptional<ObjectiveC.NSError>) -> (@unowned ())
7
GameCenterFoundation
__39-[GKDispatchGroup notifyOnQueue:block:]_block_invoke44 + 12
8
libdispatch.dylib
_dispatch_call_block_and_release + 10
16
UIKit
17
Toccata
AppDelegate.swift line 18
main