Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash : partial apply for closure #3 in UploadRequest.Uploadable.task(session:adapter:queue:) #193

Open
NishanthMurugan opened this issue Nov 12, 2020 · 1 comment

Comments

@NishanthMurugan
Copy link

NishanthMurugan commented Nov 12, 2020

Production app is getting crashed randomly on app launch with below crash log.

Fatal Exception: NSGenericException
Task created in a session that has been invalidated
partial apply for closure # 3 in UploadRequest.Uploadable.task(session:adapter:queue:)

Fatal Exception: NSGenericException
0  CoreFoundation                 0x1a797d114 __exceptionPreprocess
1  libobjc.A.dylib                0x1bb219cb4 objc_exception_throw
2  CFNetwork                      0x1a801ecc4 cfnTranslateCFError
3  CFNetwork                      0x1a801a200 cfnTranslateCFError
4  libdispatch.dylib              0x1a75b6280 _dispatch_client_callout
5  libdispatch.dylib              0x1a75990f4 _dispatch_lane_barrier_sync_invoke_and_complete
6  CFNetwork                      0x1a7f5bdd4 (Missing)
7  CFNetwork                      0x1a8012f94 cfnTranslateCFError
8  Alamofire                      0x10529b80c partial apply for closure #3 in UploadRequest.Uploadable.task(session:adapter:queue:)
9  Alamofire                      0x10529b84c partial apply for thunk for @callee_guaranteed () -> (@owned NSURLSessionDataTask, @error @owned Error) (<compiler-generated>)
10 libswiftDispatch.dylib         0x1bbc91d10 partial apply for thunk for @callee_guaranteed () -> (@out A, @error @owned Error)
11 libswiftDispatch.dylib         0x1bbc907e4 closure #1 in closure #1 in OS_dispatch_queue._syncHelper<A>(fn:execute:rescue:)
12 libswiftDispatch.dylib         0x1bbc91cb4 partial apply for thunk for @callee_guaranteed () -> ()
13 libswiftDispatch.dylib         0x1bbc90564 thunk for @escaping @callee_guaranteed () -> ()
14 libdispatch.dylib              0x1a75b6280 _dispatch_client_callout
15 libdispatch.dylib              0x1a75990f4 _dispatch_lane_barrier_sync_invoke_and_complete
16 libswiftDispatch.dylib         0x1bbc91098 implicit closure #2 in implicit closure #1 in OS_dispatch_queue.sync<A>(execute:)
17 libswiftDispatch.dylib         0x1bbc915f0 partial apply for implicit closure #2 in implicit closure #1 in OS_dispatch_queue.sync<A>(execute:)
18 libswiftDispatch.dylib         0x1bbc90674 OS_dispatch_queue._syncHelper<A>(fn:execute:rescue:)
19 libswiftDispatch.dylib         0x1bbc90cc0 OS_dispatch_queue.sync<A>(execute:)
20 Alamofire                      0x105293e0c DataRequest.Requestable.task(session:adapter:queue:) + 361 (Request.swift:361)
21 Alamofire                      0x1052c3cdc SessionManager.request(_:) + 260 (SessionManager.swift:260)
22 RxAlamofire                    0x107cb29e0 partial apply for closure #1 in Reactive<A>.request(urlRequest:) (<compiler-generated>)
23 RxAlamofire                    0x107cb293c partial apply for thunk for @escaping @callee_guaranteed (@guaranteed SessionManager) -> (@owned DataRequest, @error @owned Error) (<compiler-generated>)
24 RxAlamofire                    0x107cba74c thunk for @escaping @callee_guaranteed (@guaranteed SessionManager) -> (@owned DataRequest, @error @owned Error)partial apply
25 RxAlamofire                    0x107cb24dc closure #1 in Reactive<A>.request<A>(_:) + 393 (RxAlamofire.swift:393)
26 RxSwift                        0x107f369cc AnonymousObservableSink.run(_:) (<compiler-generated>)
27 RxSwift                        0x107f36bf0 AnonymousObservable.run<A>(_:cancel:) + 76 (Create.swift:76)
28 RxSwift                        0x107f633d8 Producer.subscribe<A>(_:) + 18 (Producer.swift:18)
29 RxSwift                        0x107f50d5c Map.run<A>(_:cancel:) + 75 (Map.swift:75)
30 RxSwift                        0x107f633d8 Producer.subscribe<A>(_:) + 18 (Producer.swift:18)
31 RxSwift                        0x107f55788 MergeSink.run(_:) + 508 (Merge.swift:508)
32 RxSwift                        0x107f56238 FlatMap.run<A>(_:cancel:)
33 RxSwift                        0x107f633d8 Producer.subscribe<A>(_:) + 18 (Producer.swift:18)
34 RxSwift                        0x107f5b6d8 ObserveOn.run<A>(_:cancel:) + 49 (ObserveOn.swift:49)
35 RxSwift                        0x107f638f0 closure #1 in Producer.subscribe<A>(_:) + 26 (Producer.swift:26)
36 RxSwift                        0x107f370a8 specialized CurrentThreadScheduler.schedule<A>(_:action:) (<compiler-generated>)
37 RxSwift                        0x107f634d8 Producer.subscribe<A>(_:) (<compiler-generated>)
38 RxSwift                        0x107f5a19c protocol witness for ObservableType.subscribe<A>(_:) in conformance Observable<A> (<compiler-generated>)
39 RxSwift                        0x107f80d6c closure #1 in SubscribeOnSink.run() + 59 (SubscribeOn.swift:59)
40 RxSwift                        0x107f856c8 thunk for @escaping @callee_guaranteed () -> (@out Disposable) (<compiler-generated>)
41 RxSwift                        0x107f5dd8c closure #1 in OperationQueueScheduler.schedule<A>(_:action:) + 46 (OperationQueueScheduler.swift:46)
42 RxSwift                        0x107f36404 thunk for @escaping @callee_guaranteed () -> () (<compiler-generated>)
43 Foundation                     0x1a8c1dcc8 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__
44 Foundation                     0x1a8b1ab18 -[NSBlockOperation main]
45 Foundation                     0x1a8c1ff80 __NSOPERATION_IS_INVOKING_MAIN__
46 Foundation                     0x1a8b1a7d4 -[NSOperation start]
47 Foundation                     0x1a8c20978 __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__
48 Foundation                     0x1a8c20444 __NSOQSchedule_f
49 libdispatch.dylib              0x1a75b5298 _dispatch_call_block_and_release
50 libdispatch.dylib              0x1a75b6280 _dispatch_client_callout
51 libdispatch.dylib              0x1a758ec04 _dispatch_continuation_pop$VARIANT$armv81
52 libdispatch.dylib              0x1a758e36c _dispatch_async_redirect_invoke
53 libdispatch.dylib              0x1a759b458 _dispatch_root_queue_drain
54 libdispatch.dylib              0x1a759bbf8 _dispatch_worker_thread2
55 libsystem_pthread.dylib        0x1ed6eb568 _pthread_wqthread
56 libsystem_pthread.dylib        0x1ed6ee874 start_wqthread
Crashed: com.google.firebase.crashlytics.ios.exception
0 MyApplication 0x104b57548 FIRCLSProcessRecordAllThreads + 392 (FIRCLSProcess.c:392)
1 MyApplication 0x104b5792c FIRCLSProcessRecordAllThreads + 423 (FIRCLSProcess.c:423)
2 MyApplication 0x104b4e074 FIRCLSHandler + 34 (FIRCLSHandler.m:34)
3 MyApplication 0x104b49cd0 __FIRCLSExceptionRecord_block_invoke + 218 (FIRCLSException.mm:218)
4 libdispatch.dylib 0x1a75b6280 dispatch_client_callout + 16
5 libdispatch.dylib 0x1a75990f4 dispatch_lane_barrier_sync_invoke_and_complete + 56
6 MyApplication 0x104b49468 FIRCLSExceptionRecord + 225 (FIRCLSException.mm:225)
7 MyApplication 0x104b49760 FIRCLSExceptionRecordNSException + 111 (FIRCLSException.mm:111)
8 MyApplicsation 0x104b49048 FIRCLSTerminateHandler() + 279 (FIRCLSException.mm:279)
9 libc++abi.dylib 0x1bb315154 std::__terminate(void (*)()) + 16
10 libc++abi.dylib 0x1bb3150ec std::terminate() + 44
11 libobjc.A.dylib 0x1bb219ee8 objc_terminate() + 10
12 libdispatch.dylib 0x1a75b6294 dispatch_client_callout + 36
13 libdispatch.dylib 0x1a75990f4 dispatch_lane_barrier_sync_invoke_and_complete + 56
14 libswiftDispatch.dylib 0x1bbc91098 implicit closure #2 in implicit closure #1 in OS_dispatch_queue.sync(execute:) + 152
15 libswiftDispatch.dylib 0x1bbc915f0 partial apply for implicit closure #2 in implicit closure #1 in OS_dispatch_queue.sync(execute:) + 40
16 libswiftDispatch.dylib 0x1bbc90674 OS_dispatch_queue.syncHelper(fn:execute:rescue:) + 260
17 libswiftDispatch.dylib 0x1bbc90cc0 OS_dispatch_queue.sync(execute:) + 140
18 Alamofire 0x105293e0c DataRequest.Requestable.task(session:adapter:queue:) + 361 (Request.swift:361)
19 Alamofire 0x1052c3cdc SessionManager.request(:) + 260 (SessionManager.swift:260)
20 RxAlamofire 0x107cb29e0 partial apply for closure #1 in Reactive.request(urlRequest:) + 64 (:64)
21 RxAlamofire 0x107cb293c partial apply for thunk for @escaping @callee_guaranteed (@guaranteed SessionManager) -> (@owned DataRequest, @error @owned Error) + 24 (:24)
22 RxAlamofire 0x107cba74c thunk for @escaping @callee_guaranteed (@guaranteed SessionManager) -> (@owned DataRequest, @error @owned Error)partial apply + 12
23 RxAlamofire 0x107cb24dc closure #1 in Reactive.request(:) + 393 (RxAlamofire.swift:393)
24 RxSwift 0x107f369cc AnonymousObservableSink.run(:) + 140 (:140)
25 RxSwift 0x107f36bf0 AnonymousObservable.run(:cancel:) + 76 (Create.swift:76)
26 RxSwift 0x107f633d8 Producer.subscribe(:) + 18 (Producer.swift:18)
27 RxSwift 0x107f50d5c Map.run(:cancel:) + 75 (Map.swift:75)
28 RxSwift 0x107f633d8 Producer.subscribe(:) + 18 (Producer.swift:18)
29 RxSwift 0x107f55788 MergeSink.run(:) + 508 (Merge.swift:508)
30 RxSwift 0x107f56238 FlatMap.run(:cancel:) + 304
31 RxSwift 0x107f633d8 Producer.subscribe(:) + 18 (Producer.swift:18)
32 RxSwift 0x107f5b6d8 ObserveOn.run(:cancel:) + 49 (ObserveOn.swift:49)
33 RxSwift 0x107f638f0 closure #1 in Producer.subscribe(:) + 26 (Producer.swift:26)
34 RxSwift 0x107f370a8 specialized CurrentThreadScheduler.schedule(:action:) + 296 (:296)
35 RxSwift 0x107f634d8 Producer.subscribe(:) + 632 (:632)
36 RxSwift 0x107f5a19c protocol witness for ObservableType.subscribe(:) in conformance Observable + 28 (:28)
37 RxSwift 0x107f80d6c closure #1 in SubscribeOnSink.run() + 59 (SubscribeOn.swift:59)
38 RxSwift 0x107f856c8 thunk for @escaping @callee_guaranteed () -> (@out Disposable) + 20 (:20)
39 RxSwift 0x107f5dd8c closure #1 in OperationQueueScheduler.schedule(:action:) + 46 (OperationQueueScheduler.swift:46)
40 RxSwift 0x107f36404 thunk for @escaping @callee_guaranteed () -> () + 28 (:28)
41 Foundation 0x1a8c1dcc8 NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK + 16
42 Foundation 0x1a8b1ab18 -[NSBlockOperation main] + 100
43 Foundation 0x1a8c1ff80 NSOPERATION_IS_INVOKING_MAIN + 20
44 Foundation 0x1a8b1a7d4 -[NSOperation start] + 784
45 Foundation 0x1a8c20978 NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION + 20
46 Foundation 0x1a8c20444 __NSOQSchedule_f + 180
47 libdispatch.dylib 0x1a75b5298 _dispatch_call_block_and_release + 24
48 libdispatch.dylib 0x1a75b6280 _dispatch_client_callout + 16
49 libdispatch.dylib 0x1a758ec04 _dispatch_continuation_pop$VARIANT$armv81 + 404
50 libdispatch.dylib 0x1a758e36c _dispatch_async_redirect_invoke + 588
51 libdispatch.dylib 0x1a759b458 _dispatch_root_queue_drain + 344
52 libdispatch.dylib 0x1a759bbf8 _dispatch_worker_thread2 + 112
53 libsystem_pthread.dylib 0x1ed6eb568 _pthread_wqthread + 212
54 libsystem_pthread.dylib 0x1ed6ee874 start_wqthread + 8
com.apple.main-thread
0  libsystem_kernel.dylib         0x1d251ad00 __semwait_signal + 8
1  libsystem_c.dylib              0x1b05f4714 nanosleep + 212
2  libsystem_c.dylib              0x1b05f45ec usleep + 64
3  QuartzCore                     0x1aaa9f1ec CABackingStoreCollectBlocking + 268
4  UIKitCore                      0x1aa421d68 __35-[UIWindowScene _prepareForSuspend]_block_invoke + 100
5  UIKitCore                      0x1a98974cc -[_UIContextBinder purgeContextsWithPurgeAction:] + 404
6  UIKitCore                      0x1aa421cf4 -[UIWindowScene _prepareForSuspend] + 80
7  UIKitCore                      0x1aa1dbc8c __130-[UIApplication _updateStateRestorationArchiveForBackgroundEvent:saveState:exitIfCouldNotRestoreState:updateSnapshot:windowScene:]_block_invoke + 224
8  UIKitCore                      0x1aa6684f8 -[_UIAfterCACommitBlock run] + 64
9  UIKitCore                      0x1aa1cf364 _runAfterCACommitDeferredBlocks + 296
10 UIKitCore                      0x1aa1be714 _cleanUpAfterCAFlushAndRunDeferredBlocks + 200
11 UIKitCore                      0x1aa1efe28 _afterCACommitHandler + 76
12 CoreFoundation                 0x1a78fbecc __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
13 CoreFoundation                 0x1a78f65b0 __CFRunLoopDoObservers + 604
14 CoreFoundation                 0x1a78f6af8 __CFRunLoopRun + 960
15 CoreFoundation                 0x1a78f6200 CFRunLoopRunSpecific + 572
16 GraphicsServices               0x1bda73598 GSEventRunModal + 160
17 UIKitCore                      0x1aa1bfbcc -[UIApplication _run] + 1052
18 UIKitCore                      0x1aa1c51a0 UIApplicationMain + 164
19 MyApplication                          0x1043996b0 main + 29 (AppDelegate.swift:29)
20 libdyld.dylib                  0x1a75d5588 start + 4
Thread
0  libsystem_kernel.dylib         0x1d251b58c __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1ed6eb5f0 _pthread_wqthread + 348
2  libsystem_pthread.dylib        0x1ed6ee874 start_wqthread + 8

com.apple.uikit.eventfetch-thread
0  libsystem_kernel.dylib         0x1d24f78c4 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x1d24f6cc8 mach_msg + 72
2  CoreFoundation                 0x1a78fc74c __CFRunLoopServiceMachPort + 376
3  CoreFoundation                 0x1a78f6bd0 __CFRunLoopRun + 1176
4  CoreFoundation                 0x1a78f6200 CFRunLoopRunSpecific + 572
5  Foundation                     0x1a8b04278 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 228
6  Foundation                     0x1a8b04158 -[NSRunLoop(NSRunLoop) runUntilDate:] + 88
7  UIKitCore                      0x1aa26b748 -[UIEventFetcher threadMain] + 504
8  Foundation                     0x1a8c60c48 __NSThread__start__ + 848
9  libsystem_pthread.dylib        0x1ed6e9b70 _pthread_start + 288
10 libsystem_pthread.dylib        0x1ed6ee880 thread_start + 8

com.google.firebase.crashlytics.MachExceptionServer
0  libsystem_kernel.dylib         0x1d24f78c4 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x1d24f6cc8 mach_msg + 72
2  MyApplication                          0x104b506f8 FIRCLSMachExceptionServer + 196 (FIRCLSMachException.c:196)
3  libsystem_pthread.dylib        0x1ed6e9b70 _pthread_start + 288
4  libsystem_pthread.dylib        0x1ed6ee880 thread_start + 8
JavaScriptCore bmalloc scavenger
0  libsystem_kernel.dylib         0x1d251a72c __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x1ed6e6c88 _pthread_cond_wait$VARIANT$armv81 + 1180
2  libc++.1.dylib                 0x1bb2b5e0c std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 24
3  JavaScriptCore                 0x1b14694ac void std::__1::condition_variable_any::wait<std::__1::unique_lock<bmalloc::Mutex> >(std::__1::unique_lock<bmalloc::Mutex>&) + 108
4  JavaScriptCore                 0x1b146de10 bmalloc::Scavenger::threadRunLoop() + 240
5  JavaScriptCore                 0x1b146d854 bmalloc::Scavenger::Scavenger(std::__1::scoped_lock<bmalloc::Mutex> const&) + 10
6  JavaScriptCore                 0x1b146ef34 std::__1::__thread_specific_ptr<std::__1::__thread_struct>::set_pointer(std::__1::__thread_struct*) + 42
7  libsystem_pthread.dylib        0x1ed6e9b70 _pthread_start + 288
8  libsystem_pthread.dylib        0x1ed6ee880 thread_start + 8

Heap Helper Thread
0  libsystem_kernel.dylib         0x1d251a72c __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x1ed6e6c88 _pthread_cond_wait$VARIANT$armv81 + 1180
2  JavaScriptCore                 0x1b13f856c WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 2984
3  JavaScriptCore                 0x1b0cfdab0 bool WTF::Condition::waitUntil<WTF::Lock>(WTF::Lock&, WTF::TimeWithDynamicClockType const&) + 184
4  JavaScriptCore                 0x1b13c74f0 WTF::Detail::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0, void>::call() + 332
5  JavaScriptCore                 0x1b141bf8c WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 276
6  JavaScriptCore                 0x1b141e744 WTF::wtfThreadEntryPoint(void*) + 12
7  libsystem_pthread.dylib        0x1ed6e9b70 _pthread_start + 288
8  libsystem_pthread.dylib        0x1ed6ee880 thread_start + 8
com.apple.NSURLConnectionLoader
0  libsystem_kernel.dylib         0x1d24f78c4 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x1d24f6cc8 mach_msg + 72
2  CoreFoundation                 0x1a78fc74c __CFRunLoopServiceMachPort + 376
3  CoreFoundation                 0x1a78f6bd0 __CFRunLoopRun + 1176
4  CoreFoundation                 0x1a78f6200 CFRunLoopRunSpecific + 572
5  CFNetwork                      0x1a81839a4 _CFURLStorageSessionCopyCache + 59740
6  Foundation                     0x1a8c60c48 __NSThread__start__ + 848
7  libsystem_pthread.dylib        0x1ed6e9b70 _pthread_start + 288
8  libsystem_pthread.dylib        0x1ed6ee880 thread_start + 8

GAIThread
0  libsystem_kernel.dylib         0x1d24f78c4 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x1d24f6cc8 mach_msg + 72
2  CoreFoundation                 0x1a78fc74c __CFRunLoopServiceMachPort + 376
3  CoreFoundation                 0x1a78f6bd0 __CFRunLoopRun + 1176
4  CoreFoundation                 0x1a78f6200 CFRunLoopRunSpecific + 572
5  Foundation                     0x1a8b04278 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 228
6  Foundation                     0x1a8b353e4 -[NSRunLoop(NSRunLoop) run] + 88
7  MyApplication                          0x104b17460 +[GAI threadMain:] + 43912
8  Foundation                     0x1a8c60c48 __NSThread__start__ + 848
9  libsystem_pthread.dylib        0x1ed6e9b70 _pthread_start + 288
10 libsystem_pthread.dylib        0x1ed6ee880 thread_start + 8

App using Alamofire v4.9.1
'RxAlamofire', '5.1.0'

@realityworks
Copy link

Are you able to update to a newer version of Alamofire and RxAlamofire?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants