GetStream / stream-chat-swift

💬 iOS Chat SDK in Swift - Build your own app chat experience for iOS using the official Stream Chat API
https://getstream.io/chat/sdk/ios/
Other
860 stars 211 forks source link

SIGABRT__cxa_throw in ChannelListUpdater #1552

Closed gonzalonunez closed 3 years ago

gonzalonunez commented 3 years ago

What did you do?

I'm seeing this crash happen in production. Only one report so far.

GetStream Environment

GetStream Chat version: 4.0.1 GetStream Chat frameworks: StreamChat iOS version: 15.0 Swift version: 5.5 Xcode version: 13 Device: iPhone11,8

Additional context

Here's the full raw stack trace below:

SIGABRT
__cxa_throw

Oct 11th, 2021, 20:56:22 UTC

STACKTRACE

CrashReporter Key:  108b99f86c319bb3c40d193f5461befea29e8d0c
Hardware Model:     iPhone11,8
Process:            Primer
Identifier:         com.withprimer.Primer
Version:            1.7.1
Role:               Foreground
OS Version:         iOS 15.0.1

SIGABRT: 

0  libsystem_c.dylib       _abort
1  libswiftCore.dylib      swift::fatalError(unsigned int, char const*, ...)
2  libswiftCore.dylib      swift::swift_abortRetainUnowned(void const*)
3  libswiftCore.dylib      _swift_unownedRetainStrong
4  Primer                  update (ChannelListUpdater.swift:20:9)
5  Primer                  thunk for @escaping @callee_guaranteed () -> () (<compiler-generated>)
6  CoreData                _developerSubmittedBlockToNSManagedObjectContextPerform
7  libdispatch.dylib       __dispatch_client_callout
8  libdispatch.dylib       __dispatch_lane_serial_drain
9  libdispatch.dylib       __dispatch_lane_invoke
10 libdispatch.dylib       __dispatch_workloop_worker_thread
11 libsystem_pthread.dylib __pthread_wqthread

THREADS

Thread 0
0 libsystem_kernel.dylib _mach_msg_trap
1 libsystem_kernel.dylib _mach_msg
2 CoreFoundation         ___CFRunLoopServiceMachPort
3 CoreFoundation         ___CFRunLoopRun
4 CoreFoundation         _CFRunLoopRunSpecific
5 GraphicsServices       _GSEventRunModal
6 UIKitCore              -[UIApplication _run]
7 UIKitCore              _UIApplicationMain
8 Primer                 main (ProjectJournal.swift:23:7)

Thread 1
0 libsystem_kernel.dylib  _mach_msg_trap
1 libsystem_kernel.dylib  _mach_msg
2 CoreFoundation          ___CFRunLoopServiceMachPort
3 CoreFoundation          ___CFRunLoopRun
4 CoreFoundation          _CFRunLoopRunSpecific
5 Foundation              -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
6 Foundation              -[NSRunLoop(NSRunLoop) runUntilDate:]
7 UIKitCore               -[UIEventFetcher threadMain]
8 Foundation              ___NSThread__start__
9 libsystem_pthread.dylib __pthread_start

Thread 2
0 libsystem_kernel.dylib  _mach_msg_trap
1 libsystem_kernel.dylib  _mach_msg
2 CoreFoundation          ___CFRunLoopServiceMachPort
3 CoreFoundation          ___CFRunLoopRun
4 CoreFoundation          _CFRunLoopRunSpecific
5 AudioSession            CADeprecated::GenericRunLoopThread::Entry(void*)
6 AudioSession            CADeprecated::CAPThread::Entry(CADeprecated::CAPThread*)
7 libsystem_pthread.dylib __pthread_start

Thread 3
0 libsystem_kernel.dylib  _mach_msg_trap
1 libsystem_kernel.dylib  _mach_msg
2 libsystem_kernel.dylib  _thread_suspend
3 Primer                  ksmachexc_i_handleExceptions (BSG_KSCrashSentry_MachException.c:221:9)
4 libsystem_pthread.dylib __pthread_start

Thread 4
0 libsystem_kernel.dylib  _mach_msg_trap
1 libsystem_kernel.dylib  _mach_msg
2 Primer                  ksmachexc_i_handleExceptions (BSG_KSCrashSentry_MachException.c:228:28)
3 libsystem_pthread.dylib __pthread_start

Thread 5
0 libsystem_kernel.dylib  _semaphore_wait_trap
1 libdispatch.dylib       __dispatch_sema4_wait
2 libdispatch.dylib       __dispatch_semaphore_wait_slow
3 Primer                  -[BSGAppHangDetector detectAppHangs] (BSGAppHangDetector.m:114:13)
4 Foundation              ___NSThread__start__
5 libsystem_pthread.dylib __pthread_start

Thread 6
0 libsystem_kernel.dylib  _mach_msg_trap
1 libsystem_kernel.dylib  _mach_msg
2 CoreFoundation          ___CFRunLoopServiceMachPort
3 CoreFoundation          ___CFRunLoopRun
4 CoreFoundation          _CFRunLoopRunSpecific
5 CFNetwork               __CFURLStorageSessionCopyIdentifier
6 Foundation              ___NSThread__start__
7 libsystem_pthread.dylib __pthread_start

Thread 7
0 libsystem_kernel.dylib  ___psynch_cvwait
1 libsystem_pthread.dylib __pthread_cond_wait
2 libc++.1.dylib          std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&)
3 JavaScriptCore          void std::__1::condition_variable_any::wait<std::__1::unique_lock<bmalloc::Mutex> >(std::__1::unique_lock<bmalloc::Mutex>&)
4 JavaScriptCore          bmalloc::Scavenger::threadRunLoop()
5 JavaScriptCore          bmalloc::Scavenger::threadEntryPoint(bmalloc::Scavenger*)
6 JavaScriptCore          void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(bmalloc::Scavenger*), bmalloc::Scavenger*> >(void*)
7 libsystem_pthread.dylib __pthread_start

Thread 8
0 unknown file unknown method

Thread 9
0 libsystem_kernel.dylib  ___workq_kernreturn
1 libsystem_pthread.dylib __pthread_wqthread

Thread 10
0 libsystem_kernel.dylib  ___workq_kernreturn
1 libsystem_pthread.dylib __pthread_wqthread

Thread 11
0 libsystem_kernel.dylib  ___workq_kernreturn
1 libsystem_pthread.dylib __pthread_wqthread

Thread 12
0  libsystem_kernel.dylib  ___pthread_kill
1  libsystem_pthread.dylib _pthread_kill
2  libsystem_c.dylib       _abort
3  libswiftCore.dylib      swift::fatalError(unsigned int, char const*, ...)
4  libswiftCore.dylib      swift::swift_abortRetainUnowned(void const*)
5  libswiftCore.dylib      _swift_unownedRetainStrong
6  Primer                  update (ChannelListUpdater.swift:20:9)
7  Primer                  thunk for @escaping @callee_guaranteed () -> () (<compiler-generated>)
8  CoreData                _developerSubmittedBlockToNSManagedObjectContextPerform
9  libdispatch.dylib       __dispatch_client_callout
10 libdispatch.dylib       __dispatch_lane_serial_drain
11 libdispatch.dylib       __dispatch_lane_invoke
12 libdispatch.dylib       __dispatch_workloop_worker_thread
13 libsystem_pthread.dylib __pthread_wqthread

Thread 13
0  libsystem_kernel.dylib  _mach_msg_trap
1  libsystem_kernel.dylib  _mach_msg
2  libdispatch.dylib       __dispatch_mach_send_and_wait_for_reply
3  libdispatch.dylib       _dispatch_mach_send_with_result_and_wait_for_reply
4  libxpc.dylib            _xpc_connection_send_message_with_reply_sync
5  Foundation              ___NSXPCCONNECTION_IS_WAITING_FOR_A_SYNCHRONOUS_REPLY__
6  Foundation              -[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:]
7  CoreFoundation          ____forwarding___
8  CoreFoundation          ___forwarding_prep_0___
9  CoreServices            -[LSApplicationWorkspace deviceIdentifierForVendor]
10 UIKitCore               -[UIDevice identifierForVendor]
11 Primer                  +[RCSystemInfo identifierForVendor] (RCSystemInfo.m:76:35)
12 Primer                  -[RCHTTPClient defaultHeaders] (RCHTTPClient.m:273:46)
13 Primer                  -[RCHTTPClient performRequest:serially:path:body:headers:retried:completionHandler:] (RCHTTPClient.m:82:48)
14 Primer                  -[RCHTTPClient handleResponse:data:error:request:completionHandler:beginNextRequestWhenFinished:queableRequest:retried:] (RCHTTPClient.m:203:17)
15 Primer                  __84-[RCHTTPClient performRequest:serially:path:body:headers:retried:completionHandler:]_block_invoke (RCHTTPClient.m:124:9)
16 CFNetwork               _CFURLRequestSetMainDocumentURL
17 CFNetwork               __CFNetworkErrorCopyLocalizedDescriptionWithHostname
18 libdispatch.dylib       __dispatch_call_block_and_release
19 libdispatch.dylib       __dispatch_client_callout
20 libdispatch.dylib       __dispatch_lane_serial_drain
21 libdispatch.dylib       __dispatch_lane_invoke
22 libdispatch.dylib       __dispatch_workloop_worker_thread
23 libsystem_pthread.dylib __pthread_wqthread

Thread 14
0 libsystem_kernel.dylib  ___workq_kernreturn
1 libsystem_pthread.dylib __pthread_wqthread

Thread 15
0 libsystem_kernel.dylib  ___workq_kernreturn
1 libsystem_pthread.dylib __pthread_wqthread

Thread 16
0 libsystem_kernel.dylib  ___workq_kernreturn
1 libsystem_pthread.dylib __pthread_wqthread

Thread 17
0 libsystem_kernel.dylib  ___workq_kernreturn
1 libsystem_pthread.dylib __pthread_wqthread

Thread 18
0 libsystem_kernel.dylib  ___workq_kernreturn
1 libsystem_pthread.dylib __pthread_wqthread

Thread 19
0 unknown file unknown method

Thread 20
0 unknown file unknown method
evsaev commented 3 years ago

Hey there @gonzalonunez 👋

That's the known issue and it's been already fixed in 4.1.0 🙂

Thanks for reporting this!

evsaev commented 3 years ago

Closing this, feel free to re-open if you face the issue after the upgrade to 4.1.0 🙌

gonzalonunez commented 3 years ago

Thanks for the quick response! Happy to hear this is fixed :)