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 #1 in SessionListener.emitRequest(_:didComplete:with:) #139

Open
mkarki-plume opened this issue Jul 28, 2023 · 0 comments

Comments

@mkarki-plume
Copy link

mkarki-plume commented Jul 28, 2023

PubNub SDK version: 6.0.5

PubNub SDK is crashing the app SessionListener.emitRequest(_:didComplete:with:), it seems like the object is deallocated before its accessed causing the crash, it could be either request or task or error object that's already deallocated and accessed inside the async { }.

  func emitRequest(_ request: RequestReplaceable, didComplete task: URLSessionTask, with error: Error) {
    queue.async { [weak self] in self?.didCompleteTaskWithError?(request, task, error) }
  }

here are the crash logs,


Crashed: com.pubnub.subscription.response
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x00002920b3fa5e30

Crashed: com.pubnub.subscription.response
0  libswiftCore.dylib             0x3fd43c swift_unknownObjectRelease + 20
1  HomePass                       0x8c6490 partial apply for closure #1 in SessionListener.emitRequest(_:didComplete:with:) + 4353942672 (<compiler-generated>:4353942672)
2  libswiftCore.dylib             0x3a70ec _swift_release_dealloc + 56
3  libswiftCore.dylib             0x3a8788 bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1>, unsigned int) + 136
4  libsystem_blocks.dylib         0x2120 _call_dispose_helpers_excp + 48
5  libsystem_blocks.dylib         0x1d5c _Block_release + 252
6  libdispatch.dylib              0x4300 _dispatch_client_callout + 20
7  libdispatch.dylib              0xb894 _dispatch_lane_serial_drain + 748
8  libdispatch.dylib              0xc3c4 _dispatch_lane_invoke + 380
9  libdispatch.dylib              0x17004 _dispatch_root_queue_drain_deferred_wlh + 288
10 libdispatch.dylib              0x16878 _dispatch_workloop_worker_thread + 404
11 libsystem_pthread.dylib        0xe50 _pthread_wqthread + 288
12 libsystem_pthread.dylib        0xbf0 start_wqthread + 8
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

1 participant