apollo-ios: Crashed: com.apollographql.DataLoader - Statement.swift line 226
We’ve deployed Apollo iOS 0.6.4 and we’re getting a few crashes in the data loader thread…
Stack trace is:
#7. Crashed: com.apollographql.DataLoader
0 libswiftCore.dylib 0x1d1b468 _TTSfq4n_s_n_n_n___TFs17_assertionFailureFTVs12StaticStringSS4fileS_4lineSu5flagsVs6UInt32_Os5Never + 160
1 libswiftCore.dylib 0x1d68778 _TPA__TFFs17_assertionFailureFTVs12StaticStringSS4fileS_4lineSu5flagsVs6UInt32_Os5NeverU_FGSRVs5UInt8_T_ + 216
2 libswiftCore.dylib 0x1bfc398 swift_unexpectedError_merged + 334
3 libswiftCore.dylib 0x1bfc224 swift_unexpectedError + 34
4 MyApp 0x1152f58 specialized Connection.(prepare(QueryType) throws -> AnySequence<Row>).(closure #2).(closure #1) (Statement.swift:226)
5 MyApp 0x1156860 partial apply for Connection.(prepare(QueryType) throws -> AnySequence<Row>).(closure #2).(closure #1) (Query.swift)
6 MyApp 0x11568bc partial apply for thunk (Query.swift)
7 libswiftCore.dylib 0x1cf0a88 _TFVs21_ClosureBasedIterator4nextfT_GSqx_ + 40
8 libswiftCore.dylib 0x1cf0ab8 _TTWurGVs21_ClosureBasedIteratorx_s16IteratorProtocolsFS0_4nextfT_GSqwx7Element_ + 44
9 libswiftCore.dylib 0x1cf0b80 _TFCs12_IteratorBox4nextfT_GSqwx7Element_ + 36
10 libswiftCore.dylib 0x1bef008 _TFVs11AnyIterator4nextfT_GSqx_ + 20
11 libswiftCore.dylib 0x1cf02d0 _TTWurGVs11AnyIteratorx_s16IteratorProtocolsFS0_4nextfT_GSqwx7Element_ + 36
12 libswiftCore.dylib 0x1b94ce8 _TFEsPs8Sequence3mapurfzFzWx8Iterator7Element_qd__GSaqd___ + 988
13 libswiftCore.dylib 0x1cfe04c _TTWuRxs16IteratorProtocolrGVs21_ClosureBasedSequencex_s8SequencesFS1_3mapurfzFzWx8Iterator7Element_qd__GSaqd___ + 116
14 libswiftCore.dylib 0x1cf17ac _TFCs12_SequenceBox4_mapurfzFzWx8Iterator7Element_qd__GSaqd___ + 164
15 MyApp 0xb8e804 specialized SQLiteNormalizedCache.selectRecords(forKeys : [String]) throws -> [Record] (SQLiteNormalizedCache.swift:76)
16 MyApp 0xb8f5b8 specialized SQLiteNormalizedCache.(loadRecords(forKeys : [String]) -> Promise<[Record?]>).(closure #1) (SQLiteNormalizedCache.swift)
17 MyApp 0xb8fd60 specialized SQLiteNormalizedCache.loadRecords(forKeys : [String]) -> Promise<[Record?]> (SQLiteNormalizedCache.swift)
18 MyApp 0xb1bf48 protocol witness for NormalizedCache.loadRecords(forKeys : [String]) -> Promise<[Record?]> in conformance SQLiteNormalizedCache (SQLiteNormalizedCache.swift)
19 MyApp 0xb633b4 partial apply (NormalizedCache.swift)
20 MyApp 0xb321fc specialized specialized DataLoader.(dispatch() -> ()).(closure #1) (DataLoader.swift:48)
21 MyApp 0xb2f998 specialized DataLoader.(dispatch() -> ()).(closure #1) (DataLoader.swift)
22 libdispatch.dylib 0x20ac9823 _dispatch_call_block_and_release + 10
23 libdispatch.dylib 0x20ad6423 _dispatch_queue_drain$VARIANT$mp + 1758
24 libdispatch.dylib 0x20ad5a61 _dispatch_queue_invoke$VARIANT$mp + 284
25 libdispatch.dylib 0x20ad85e9 _dispatch_root_queue_drain + 1560
26 libdispatch.dylib 0x20ad7fcd _dispatch_worker_thread3 + 96
27 libsystem_pthread.dylib 0x20c8db29 _pthread_wqthread + 1024
28 libsystem_pthread.dylib 0x20c8d718 start_wqthread + 8
Is there any other info that might be useful? Happy to work it directly with somebody who might know the implementation.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (6 by maintainers)
@designatednerd Bumping to 0.11.0, implementing the
PreflightDelegate, and not tearing down our client worked marvelously and we are no longer getting the crash. Thanks!Here is an attempt to fix the root cause in SQLite: https://github.com/stephencelis/SQLite.swift/pull/785