twilio / twilio-voice-ios

Programmable Voice SDK by Twilio
https://www.twilio.com/voice
38 stars 14 forks source link

App crash on calling Voice.connect() #94

Closed sgowda97 closed 1 year ago

sgowda97 commented 2 years ago

Description

App is crashing as soon as I place an audio call.

Steps to Reproduce

  1. Place a call using Voice.connect()

Code

func performVoiceCall(uuid: UUID, client: String?, completionHandler: @escaping (Bool) -> Swift.Void) {
        guard let token = accessToken else {
            completionHandler(false)
            return
        }

        let connectOptions: ConnectOptions = ConnectOptions(accessToken: token) { (builder) in
            for (key, value) in self.callArgs {
                builder.params[key] = "\(value)"
            }

            builder.uuid = uuid
        }
        let theCall = TwilioVoiceSDK.connect(options: connectOptions, delegate: self)
        self.call = theCall
        self.callKitCompletionCallback = completionHandler
    }

Expected Behavior

Outgoing call should happen without crashing.

Actual Behavior

Crashes after a few seconds of calling Voice.connect(), the TwiML end-point is not being called either.

Reproduces How Often

Always

Logs

* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x0000000112f28112 libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x0000000112d9f214 libsystem_pthread.dylib`pthread_kill + 263
    frame #2: 0x00000001118146b7 libsystem_c.dylib`abort + 130
    frame #3: 0x000000010e8a15a2 libc++abi.dylib`abort_message + 241
    frame #4: 0x000000010e89273d libc++abi.dylib`demangling_terminate_handler() + 266
    frame #5: 0x000000010c6a9d74 libobjc.A.dylib`_objc_terminate() + 96
    frame #6: 0x000000010e8a09c7 libc++abi.dylib`std::__terminate(void (*)()) + 8
    frame #7: 0x000000010e8a0978 libc++abi.dylib`std::terminate() + 56
    frame #8: 0x000000010c6c4bc4 libobjc.A.dylib`objc_terminate + 9
    frame #9: 0x000000010ebbca6f libdispatch.dylib`_dispatch_client_callout + 28
    frame #10: 0x000000010ebcb325 libdispatch.dylib`_dispatch_main_queue_drain + 1169
    frame #11: 0x000000010ebcae86 libdispatch.dylib`_dispatch_main_queue_callback_4CF + 31
    frame #12: 0x0000000110f96ed5 CoreFoundation`__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
    frame #13: 0x0000000110f916ca CoreFoundation`__CFRunLoopRun + 2761
    frame #14: 0x0000000110f90704 CoreFoundation`CFRunLoopRunSpecific + 562
    frame #15: 0x0000000117c00c8e GraphicsServices`GSEventRunModal + 139
    frame #16: 0x000000012ecde65a UIKitCore`-[UIApplication _run] + 928
    frame #17: 0x000000012ece32b5 UIKitCore`UIApplicationMain + 101
  * frame #18: 0x0000000100baeeef Runner`main at AppDelegate.swift:5:13
    frame #19: 0x00000001094c2f21 dyld_sim`start_sim + 10
    frame #20: 0x0000000200da24fe dyld`start + 462
  thread #5, name = 'com.apple.uikit.eventfetch-thread'
    frame #0: 0x0000000112f21aba libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x0000000112f21e2b libsystem_kernel.dylib`mach_msg + 59
    frame #2: 0x0000000110f96acc CoreFoundation`__CFRunLoopServiceMachPort + 319
    frame #3: 0x0000000110f910e2 CoreFoundation`__CFRunLoopRun + 1249
    frame #4: 0x0000000110f90704 CoreFoundation`CFRunLoopRunSpecific + 562
    frame #5: 0x000000010cd9b049 Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 213
    frame #6: 0x000000010cd9b2c2 Foundation`-[NSRunLoop(NSRunLoop) runUntilDate:] + 72
    frame #7: 0x000000012eda1bda UIKitCore`-[UIEventFetcher threadMain] + 491
    frame #8: 0x000000010cdc41a1 Foundation`__NSThread__start__ + 1009
    frame #9: 0x0000000112d9f4f4 libsystem_pthread.dylib`_pthread_start + 125
    frame #10: 0x0000000112d9b00f libsystem_pthread.dylib`thread_start + 15
  thread #7, name = 'io.flutter.1.ui'
    frame #0: 0x000000016fb2700c
    frame #1: 0x00000001614c6eea
    frame #2: 0x000000016fb21f71
    frame #3: 0x000000016fb20990
    frame #4: 0x00000001614c6eea
    frame #5: 0x000000016fad0760
    frame #6: 0x000000016face8c1
    frame #7: 0x000000016facd359
    frame #8: 0x00000001614c3dac
    frame #9: 0x00000001614c2e4f
    frame #10: 0x00000001614c2577
    frame #11: 0x00000001614c18b3
    frame #12: 0x00000001614c130f
    frame #13: 0x00000001614c1244
    frame #14: 0x0000000170158991
    frame #15: 0x0000000170165c68
    frame #16: 0x000000015a02f51d
    frame #17: 0x000000015a02f331
    frame #18: 0x000000015a13638d
    frame #19: 0x000000015a1360e4
    frame #20: 0x000000015a1359ed
    frame #21: 0x000000016130a97d
    frame #22: 0x000000015a1165be
    frame #23: 0x0000000161323de4
    frame #24: 0x0000000161323cee
    frame #25: 0x0000000161323c4a
    frame #26: 0x00000001599829b5
    frame #27: 0x00000001195560b8 Flutter`dart::DartEntry::InvokeCode(dart::Code const&, unsigned long, dart::Array const&, dart::Array const&, dart::Thread*) + 296
    frame #28: 0x0000000119555f24 Flutter`dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&, dart::Array const&, unsigned long) + 324
    frame #29: 0x0000000119556805 Flutter`dart::DartEntry::InvokeCallable(dart::Thread*, dart::Function const&, dart::Array const&, dart::Array const&) + 405
    frame #30: 0x0000000119871e11 Flutter`Dart_InvokeClosure + 1009
    frame #31: 0x00000001193ecff2 Flutter`tonic::DartInvokeVoid(_Dart_Handle*) + 15
    frame #32: 0x00000001194d4a4e Flutter`flutter::PlatformConfiguration::BeginFrame(fml::TimePoint, unsigned long long) + 302
    frame #33: 0x00000001195058eb Flutter`flutter::RuntimeController::BeginFrame(fml::TimePoint, unsigned long long) + 43
    frame #34: 0x00000001193c5432 Flutter`flutter::Engine::BeginFrame(fml::TimePoint, unsigned long long) + 60
    frame #35: 0x00000001193c0ae5 Flutter`flutter::Animator::BeginFrame(std::__1::unique_ptr<flutter::FrameTimingsRecorder, std::__1::default_delete<flutter::FrameTimingsRecorder> >) + 541
    frame #36: 0x00000001193c3899 Flutter`std::__1::__function::__func<flutter::Animator::AwaitVSync()::$_3, std::__1::allocator<flutter::Animator::AwaitVSync()::$_3>, void (std::__1::unique_ptr<flutter::FrameTimingsRecorder, std::__1::default_delete<flutter::FrameTimingsRecorder> >)>::operator()(std::__1::unique_ptr<flutter::FrameTimingsRecorder, std::__1::default_delete<flutter::FrameTimingsRecorder> >&&) + 99
    frame #37: 0x00000001193e7695 Flutter`std::__1::__function::__func<flutter::VsyncWaiter::FireCallback(fml::TimePoint, fml::TimePoint, bool)::$_0, std::__1::allocator<flutter::VsyncWaiter::FireCallback(fml::TimePoint, fml::TimePoint, bool)::$_0>, void ()>::operator()() + 117
    frame #38: 0x00000001192debb0 Flutter`fml::MessageLoopImpl::FlushTasks(fml::FlushType) + 164
    frame #39: 0x00000001192e4fe4 Flutter`fml::MessageLoopDarwin::OnTimerFire(__CFRunLoopTimer*, fml::MessageLoopDarwin*) + 26
    frame #40: 0x0000000110f97d6e CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
    frame #41: 0x0000000110f9783c CoreFoundation`__CFRunLoopDoTimer + 915
    frame #42: 0x0000000110f96dfd CoreFoundation`__CFRunLoopDoTimers + 265
    frame #43: 0x0000000110f913e1 CoreFoundation`__CFRunLoopRun + 2016
    frame #44: 0x0000000110f90704 CoreFoundation`CFRunLoopRunSpecific + 562
    frame #45: 0x00000001192e5121 Flutter`fml::MessageLoopDarwin::Run() + 65
    frame #46: 0x00000001192deac0 Flutter`fml::MessageLoopImpl::DoRun() + 22
    frame #47: 0x00000001192e3baa Flutter`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, fml::Thread::Thread(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0> >(void*) + 170
    frame #48: 0x0000000112d9f4f4 libsystem_pthread.dylib`_pthread_start + 125
    frame #49: 0x0000000112d9b00f libsystem_pthread.dylib`thread_start + 15
  thread #8, name = 'io.flutter.1.raster'
    frame #0: 0x0000000112f21aba libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x0000000112f21e2b libsystem_kernel.dylib`mach_msg + 59
    frame #2: 0x0000000110f96acc CoreFoundation`__CFRunLoopServiceMachPort + 319
    frame #3: 0x0000000110f910e2 CoreFoundation`__CFRunLoopRun + 1249
    frame #4: 0x0000000110f90704 CoreFoundation`CFRunLoopRunSpecific + 562
    frame #5: 0x00000001192e5121 Flutter`fml::MessageLoopDarwin::Run() + 65
    frame #6: 0x00000001192deac0 Flutter`fml::MessageLoopImpl::DoRun() + 22
    frame #7: 0x00000001192e3baa Flutter`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, fml::Thread::Thread(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0> >(void*) + 170
    frame #8: 0x0000000112d9f4f4 libsystem_pthread.dylib`_pthread_start + 125
    frame #9: 0x0000000112d9b00f libsystem_pthread.dylib`thread_start + 15
  thread #9, name = 'io.flutter.1.io'
    frame #0: 0x0000000112f21aba libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x0000000112f21e2b libsystem_kernel.dylib`mach_msg + 59
    frame #2: 0x0000000110f96acc CoreFoundation`__CFRunLoopServiceMachPort + 319
    frame #3: 0x0000000110f910e2 CoreFoundation`__CFRunLoopRun + 1249
    frame #4: 0x0000000110f90704 CoreFoundation`CFRunLoopRunSpecific + 562
    frame #5: 0x00000001192e5121 Flutter`fml::MessageLoopDarwin::Run() + 65
    frame #6: 0x00000001192deac0 Flutter`fml::MessageLoopImpl::DoRun() + 22
    frame #7: 0x00000001192e3baa Flutter`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, fml::Thread::Thread(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0> >(void*) + 170
    frame #8: 0x0000000112d9f4f4 libsystem_pthread.dylib`_pthread_start + 125
    frame #9: 0x0000000112d9b00f libsystem_pthread.dylib`thread_start + 15
  thread #10, name = 'io.flutter.1.profiler'
    frame #0: 0x0000000112f21aba libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x0000000112f21e2b libsystem_kernel.dylib`mach_msg + 59
    frame #2: 0x0000000110f96acc CoreFoundation`__CFRunLoopServiceMachPort + 319
    frame #3: 0x0000000110f910e2 CoreFoundation`__CFRunLoopRun + 1249
    frame #4: 0x0000000110f90704 CoreFoundation`CFRunLoopRunSpecific + 562
    frame #5: 0x00000001192e5121 Flutter`fml::MessageLoopDarwin::Run() + 65
    frame #6: 0x00000001192deac0 Flutter`fml::MessageLoopImpl::DoRun() + 22
    frame #7: 0x00000001192e3baa Flutter`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, fml::Thread::Thread(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0> >(void*) + 170
    frame #8: 0x0000000112d9f4f4 libsystem_pthread.dylib`_pthread_start + 125
    frame #9: 0x0000000112d9b00f libsystem_pthread.dylib`thread_start + 15
  thread #11, name = 'io.worker.1'
    frame #0: 0x0000000112f24506 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x0000000112d9fa69 libsystem_pthread.dylib`_pthread_cond_wait + 1224
    frame #2: 0x00000001098f5632 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
    frame #3: 0x00000001192dbe4d Flutter`fml::ConcurrentMessageLoop::WorkerMain() + 187
    frame #4: 0x00000001192dc490 Flutter`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 155
    frame #5: 0x0000000112d9f4f4 libsystem_pthread.dylib`_pthread_start + 125
    frame #6: 0x0000000112d9b00f libsystem_pthread.dylib`thread_start + 15
  thread #12, name = 'io.worker.2'
    frame #0: 0x0000000112f24506 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x0000000112d9fa69 libsystem_pthread.dylib`_pthread_cond_wait + 1224
    frame #2: 0x00000001098f5632 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
    frame #3: 0x00000001192dbe4d Flutter`fml::ConcurrentMessageLoop::WorkerMain() + 187
    frame #4: 0x00000001192dc490 Flutter`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 155
    frame #5: 0x0000000112d9f4f4 libsystem_pthread.dylib`_pthread_start + 125
    frame #6: 0x0000000112d9b00f libsystem_pthread.dylib`thread_start + 15
  thread #13, name = 'io.worker.3'
    frame #0: 0x0000000112f24506 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x0000000112d9fa69 libsystem_pthread.dylib`_pthread_cond_wait + 1224
    frame #2: 0x00000001098f5632 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
    frame #3: 0x00000001192dbe4d Flutter`fml::ConcurrentMessageLoop::WorkerMain() + 187
    frame #4: 0x00000001192dc490 Flutter`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 155
    frame #5: 0x0000000112d9f4f4 libsystem_pthread.dylib`_pthread_start + 125
    frame #6: 0x0000000112d9b00f libsystem_pthread.dylib`thread_start + 15
  thread #14, name = 'io.worker.4'
    frame #0: 0x0000000112f24506 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x0000000112d9fa69 libsystem_pthread.dylib`_pthread_cond_wait + 1224
    frame #2: 0x00000001098f5632 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
    frame #3: 0x00000001192dbe4d Flutter`fml::ConcurrentMessageLoop::WorkerMain() + 187
    frame #4: 0x00000001192dc490 Flutter`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 155
    frame #5: 0x0000000112d9f4f4 libsystem_pthread.dylib`_pthread_start + 125
    frame #6: 0x0000000112d9b00f libsystem_pthread.dylib`thread_start + 15
  thread #15, name = 'io.worker.5'
    frame #0: 0x0000000112f24506 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x0000000112d9fa69 libsystem_pthread.dylib`_pthread_cond_wait + 1224
    frame #2: 0x00000001098f5632 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
    frame #3: 0x00000001192dbe4d Flutter`fml::ConcurrentMessageLoop::WorkerMain() + 187
    frame #4: 0x00000001192dc490 Flutter`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 155
    frame #5: 0x0000000112d9f4f4 libsystem_pthread.dylib`_pthread_start + 125
    frame #6: 0x0000000112d9b00f libsystem_pthread.dylib`thread_start + 15
  thread #16, name = 'io.worker.6'
    frame #0: 0x0000000112f24506 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x0000000112d9fa69 libsystem_pthread.dylib`_pthread_cond_wait + 1224
    frame #2: 0x00000001098f5632 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
    frame #3: 0x00000001192dbe4d Flutter`fml::ConcurrentMessageLoop::WorkerMain() + 187
    frame #4: 0x00000001192dc490 Flutter`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 155
    frame #5: 0x0000000112d9f4f4 libsystem_pthread.dylib`_pthread_start + 125
    frame #6: 0x0000000112d9b00f libsystem_pthread.dylib`thread_start + 15
  thread #17, name = 'io.worker.7'
    frame #0: 0x0000000112f24506 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x0000000112d9fa69 libsystem_pthread.dylib`_pthread_cond_wait + 1224
    frame #2: 0x00000001098f5632 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
    frame #3: 0x00000001192dbe4d Flutter`fml::ConcurrentMessageLoop::WorkerMain() + 187
    frame #4: 0x00000001192dc490 Flutter`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 155
    frame #5: 0x0000000112d9f4f4 libsystem_pthread.dylib`_pthread_start + 125
    frame #6: 0x0000000112d9b00f libsystem_pthread.dylib`thread_start + 15
  thread #18, name = 'io.worker.8'
    frame #0: 0x0000000112f24506 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x0000000112d9fa69 libsystem_pthread.dylib`_pthread_cond_wait + 1224
    frame #2: 0x00000001098f5632 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
    frame #3: 0x00000001192dbe4d Flutter`fml::ConcurrentMessageLoop::WorkerMain() + 187
    frame #4: 0x00000001192dc490 Flutter`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, fml::ConcurrentMessageLoop::ConcurrentMessageLoop(unsigned long)::$_0> >(void*) + 155
    frame #5: 0x0000000112d9f4f4 libsystem_pthread.dylib`_pthread_start + 125
    frame #6: 0x0000000112d9b00f libsystem_pthread.dylib`thread_start + 15
  thread #19, name = 'dart:io EventHandler'
    frame #0: 0x0000000112f2645e libsystem_kernel.dylib`kevent + 10
    frame #1: 0x00000001194da278 Flutter`dart::bin::EventHandlerImplementation::EventHandlerEntry(unsigned long) + 312
    frame #2: 0x00000001194f8c98 Flutter`dart::bin::ThreadStart(void*) + 40
    frame #3: 0x0000000112d9f4f4 libsystem_pthread.dylib`_pthread_start + 125
    frame #4: 0x0000000112d9b00f libsystem_pthread.dylib`thread_start + 15
  thread #20, name = 'DartWorker'
    frame #0: 0x0000000112f24506 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x0000000112d9fa9f libsystem_pthread.dylib`_pthread_cond_wait + 1278
    frame #2: 0x000000011963f986 Flutter`dart::Monitor::WaitMicros(long long) + 134
    frame #3: 0x00000001196c0baf Flutter`dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*) + 559
    frame #4: 0x00000001196c0dcd Flutter`dart::ThreadPool::Worker::Main(unsigned long) + 93
    frame #5: 0x000000011963ef6f Flutter`dart::ThreadStart(void*) + 159
    frame #6: 0x0000000112d9f4f4 libsystem_pthread.dylib`_pthread_start + 125
    frame #7: 0x0000000112d9b00f libsystem_pthread.dylib`thread_start + 15
  thread #21, name = 'DartWorker'
    frame #0: 0x0000000112f24506 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x0000000112d9fa9f libsystem_pthread.dylib`_pthread_cond_wait + 1278
    frame #2: 0x000000011963f986 Flutter`dart::Monitor::WaitMicros(long long) + 134
    frame #3: 0x00000001196c0baf Flutter`dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*) + 559
    frame #4: 0x00000001196c0dcd Flutter`dart::ThreadPool::Worker::Main(unsigned long) + 93
    frame #5: 0x000000011963ef6f Flutter`dart::ThreadStart(void*) + 159
    frame #6: 0x0000000112d9f4f4 libsystem_pthread.dylib`_pthread_start + 125
    frame #7: 0x0000000112d9b00f libsystem_pthread.dylib`thread_start + 15
  thread #22, name = 'DartWorker'
    frame #0: 0x0000000112f24506 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x0000000112d9fa9f libsystem_pthread.dylib`_pthread_cond_wait + 1278
    frame #2: 0x000000011963f986 Flutter`dart::Monitor::WaitMicros(long long) + 134
    frame #3: 0x00000001196c0baf Flutter`dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*) + 559
    frame #4: 0x00000001196c0dcd Flutter`dart::ThreadPool::Worker::Main(unsigned long) + 93
    frame #5: 0x000000011963ef6f Flutter`dart::ThreadStart(void*) + 159
    frame #6: 0x0000000112d9f4f4 libsystem_pthread.dylib`_pthread_start + 125
    frame #7: 0x0000000112d9b00f libsystem_pthread.dylib`thread_start + 15
  thread #23, name = 'AVAudioSession Notify Thread'
    frame #0: 0x0000000112f21aba libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x0000000112f21e2b libsystem_kernel.dylib`mach_msg + 59
    frame #2: 0x0000000110f96acc CoreFoundation`__CFRunLoopServiceMachPort + 319
    frame #3: 0x0000000110f910e2 CoreFoundation`__CFRunLoopRun + 1249
    frame #4: 0x0000000110f90704 CoreFoundation`CFRunLoopRunSpecific + 562
    frame #5: 0x0000000112f8b16d AudioSession`CADeprecated::GenericRunLoopThread::Entry(void*) + 157
    frame #6: 0x0000000112f9d20b AudioSession`CADeprecated::CAPThread::Entry(CADeprecated::CAPThread*) + 77
    frame #7: 0x0000000112d9f4f4 libsystem_pthread.dylib`_pthread_start + 125
    frame #8: 0x0000000112d9b00f libsystem_pthread.dylib`thread_start + 15
  thread #24, name = 'AMCP Logging Spool'
    frame #0: 0x0000000112f21af6 libsystem_kernel.dylib`semaphore_wait_trap + 10
    frame #1: 0x0000000113152bea caulk`caulk::mach::semaphore::wait_or_error() + 16
    frame #2: 0x000000011314e070 caulk`caulk::concurrent::details::worker_thread::run() + 36
    frame #3: 0x000000011314e0c4 caulk`void* caulk::thread_proxy<std::__1::tuple<caulk::thread::attributes, void (caulk::concurrent::details::worker_thread::*)(), std::__1::tuple<caulk::concurrent::details::worker_thread*> > >(void*) + 41
    frame #4: 0x0000000112d9f4f4 libsystem_pthread.dylib`_pthread_start + 125
    frame #5: 0x0000000112d9b00f libsystem_pthread.dylib`thread_start + 15
  thread #26
    frame #0: 0x0000000112f2317a libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x0000000112d9c0d8 libsystem_pthread.dylib`_pthread_wqthread + 426
    frame #2: 0x0000000112d9affb libsystem_pthread.dylib`start_wqthread + 15
  thread #27, name = 'com.apple.NSURLConnectionLoader'
    frame #0: 0x0000000112f21aba libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x0000000112f21e2b libsystem_kernel.dylib`mach_msg + 59
    frame #2: 0x0000000110f96acc CoreFoundation`__CFRunLoopServiceMachPort + 319
    frame #3: 0x0000000110f910e2 CoreFoundation`__CFRunLoopRun + 1249
    frame #4: 0x0000000110f90704 CoreFoundation`CFRunLoopRunSpecific + 562
    frame #5: 0x0000000114e633e0 CFNetwork`___lldb_unnamed_symbol11160$$CFNetwork + 437
    frame #6: 0x000000010cdc41a1 Foundation`__NSThread__start__ + 1009
    frame #7: 0x0000000112d9f4f4 libsystem_pthread.dylib`_pthread_start + 125
    frame #8: 0x0000000112d9b00f libsystem_pthread.dylib`thread_start + 15
  thread #31, name = 'DartWorker'
    frame #0: 0x0000000112f24506 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x0000000112d9fa9f libsystem_pthread.dylib`_pthread_cond_wait + 1278
    frame #2: 0x000000011963f986 Flutter`dart::Monitor::WaitMicros(long long) + 134
    frame #3: 0x00000001196c0baf Flutter`dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*) + 559
    frame #4: 0x00000001196c0dcd Flutter`dart::ThreadPool::Worker::Main(unsigned long) + 93
    frame #5: 0x000000011963ef6f Flutter`dart::ThreadStart(void*) + 159
    frame #6: 0x0000000112d9f4f4 libsystem_pthread.dylib`_pthread_start + 125
    frame #7: 0x0000000112d9b00f libsystem_pthread.dylib`thread_start + 15
  thread #32
    frame #0: 0x0000000112f2317a libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x0000000112d9c0d8 libsystem_pthread.dylib`_pthread_wqthread + 426
    frame #2: 0x0000000112d9affb libsystem_pthread.dylib`start_wqthread + 15
  thread #33
    frame #0: 0x0000000112d9afec libsystem_pthread.dylib`start_wqthread
  thread #34
    frame #0: 0x0000000112f2317a libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x0000000112d9c0d8 libsystem_pthread.dylib`_pthread_wqthread + 426
    frame #2: 0x0000000112d9affb libsystem_pthread.dylib`start_wqthread + 15
  thread #35
    frame #0: 0x0000000112f29e4a libsystem_kernel.dylib`__select + 10
    frame #1: 0x00000001107d2207 TwilioVoice`resip::InterruptableStackThread::thread() + 711
    frame #2: 0x0000000110734aea TwilioVoice`threadIfThreadWrapper(void*) + 10
    frame #3: 0x0000000112d9f4f4 libsystem_pthread.dylib`_pthread_start + 125
    frame #4: 0x0000000112d9b00f libsystem_pthread.dylib`thread_start + 15
  thread #36, name = 'MediaFactoryImpl::signaling 0x0x600002180f00'
    frame #0: 0x0000000112f24506 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x0000000112d9fa69 libsystem_pthread.dylib`_pthread_cond_wait + 1224
    frame #2: 0x00000001105707a4 TwilioVoice`rtc::Event::Wait(int, int)::$_0::operator()(absl::optional<timespec>) const + 72
    frame #3: 0x00000001105706a9 TwilioVoice`rtc::Event::Wait(int, int) + 267
    frame #4: 0x000000011053a97e TwilioVoice`rtc::NullSocketServer::Wait(int, bool) + 16
    frame #5: 0x0000000110549482 TwilioVoice`rtc::Thread::Send(rtc::Location const&, rtc::MessageHandler*, unsigned int, rtc::MessageData*) + 330
    frame #6: 0x00000001105495a7 TwilioVoice`rtc::Thread::InvokeInternal(rtc::Location const&, rtc::FunctionView<void ()>) + 155
    frame #7: 0x00000001104b1695 TwilioVoice`bool rtc::Thread::Invoke<bool, void>(rtc::Location const&, rtc::FunctionView<bool ()>) + 43
    frame #8: 0x000000011050ac41 TwilioVoice`cricket::BaseChannel::SetLocalContent(cricket::MediaContentDescription const*, webrtc::SdpType, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) + 185
    frame #9: 0x00000001104dfe04 TwilioVoice`webrtc::SdpOfferAnswerHandler::PushdownMediaDescription(webrtc::SdpType, cricket::ContentSource) + 342
    frame #10: 0x00000001104d91f9 TwilioVoice`webrtc::SdpOfferAnswerHandler::UpdateSessionState(webrtc::SdpType, cricket::ContentSource, cricket::SessionDescription const*) + 165
    frame #11: 0x00000001104d7f05 TwilioVoice`webrtc::SdpOfferAnswerHandler::ApplyLocalDescription(std::__1::unique_ptr<webrtc::SessionDescriptionInterface, std::__1::default_delete<webrtc::SessionDescriptionInterface> >) + 1467
    frame #12: 0x00000001104dba7d TwilioVoice`webrtc::SdpOfferAnswerHandler::DoSetLocalDescription(std::__1::unique_ptr<webrtc::SessionDescriptionInterface, std::__1::default_delete<webrtc::SessionDescriptionInterface> >, rtc::scoped_refptr<webrtc::SetLocalDescriptionObserverInterface>) + 1003
    frame #13: 0x00000001104e8a72 TwilioVoice`rtc::rtc_operations_chain_internal::OperationWithFunctor<webrtc::SdpOfferAnswerHandler::SetLocalDescription(webrtc::SetSessionDescriptionObserver*, webrtc::SessionDescriptionInterface*)::$_4>::Run() + 168
    frame #14: 0x00000001104d753f TwilioVoice`webrtc::SdpOfferAnswerHandler::SetLocalDescription(webrtc::SetSessionDescriptionObserver*, webrtc::SessionDescriptionInterface*) + 277
    frame #15: 0x00000001104bffea TwilioVoice`webrtc::PeerConnectionProxyWithInternal<webrtc::PeerConnectionInterface>::SetLocalDescription(webrtc::SetSessionDescriptionObserver*, webrtc::SessionDescriptionInterface*) + 124
    frame #16: 0x0000000110862ca7 TwilioVoice`twilio::voice::CallImpl::onCreateSessionLocalDescription(std::__1::unique_ptr<webrtc::SessionDescriptionInterface, std::__1::default_delete<webrtc::SessionDescriptionInterface> >, twilio::BaseError) + 2311
    frame #17: 0x0000000110871fe0 TwilioVoice`twilio::signaling::CreateLocalSdpObserver::OnSuccess(webrtc::SessionDescriptionInterface*) + 80
    frame #18: 0x00000001105078a7 TwilioVoice`webrtc::WebRtcSessionDescriptionFactory::OnMessage(rtc::Message*) + 57
    frame #19: 0x0000000110548e5b TwilioVoice`rtc::Thread::Dispatch(rtc::Message*) + 133
    frame #20: 0x0000000110547d5f TwilioVoice`rtc::Thread::ProcessMessages(int) + 141
    frame #21: 0x000000011054926a TwilioVoice`rtc::Thread::PreRun(void*) + 76
    frame #22: 0x0000000112d9f4f4 libsystem_pthread.dylib`_pthread_start + 125
    frame #23: 0x0000000112d9b00f libsystem_pthread.dylib`thread_start + 15
  thread #37, name = 'MediaFactoryImpl::worker 0x0x600002180f00'
    frame #0: 0x0000000112f24506 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x0000000112d9fa69 libsystem_pthread.dylib`_pthread_cond_wait + 1224
    frame #2: 0x00000001105707a4 TwilioVoice`rtc::Event::Wait(int, int)::$_0::operator()(absl::optional<timespec>) const + 72
    frame #3: 0x00000001105706a9 TwilioVoice`rtc::Event::Wait(int, int) + 267
    frame #4: 0x000000011053a97e TwilioVoice`rtc::NullSocketServer::Wait(int, bool) + 16
    frame #5: 0x0000000110549482 TwilioVoice`rtc::Thread::Send(rtc::Location const&, rtc::MessageHandler*, unsigned int, rtc::MessageData*) + 330
    frame #6: 0x00000001105495a7 TwilioVoice`rtc::Thread::InvokeInternal(rtc::Location const&, rtc::FunctionView<void ()>) + 155
    frame #7: 0x000000011050bac5 TwilioVoice`cricket::BaseChannel::UpdateRtpHeaderExtensionMap(std::__1::vector<webrtc::RtpExtension, std::__1::allocator<webrtc::RtpExtension> > const&) + 87
    frame #8: 0x000000011050d116 TwilioVoice`cricket::VoiceChannel::SetLocalContent_w(cricket::MediaContentDescription const*, webrtc::SdpType, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) + 274
    frame #9: 0x00000001104ec483 TwilioVoice`void rtc::FunctionView<void ()>::CallVoidPtr<bool rtc::Thread::Invoke<bool, void>(rtc::Location const&, rtc::FunctionView<bool ()>)::'lambda'()>(rtc::FunctionView<void ()>::VoidUnion) + 15
    frame #10: 0x0000000110549f20 TwilioVoice`webrtc::webrtc_new_closure_impl::ClosureTask<rtc::Thread::Send(rtc::Location const&, rtc::MessageHandler*, unsigned int, rtc::MessageData*)::$_0>::Run() + 18
    frame #11: 0x000000011054961b TwilioVoice`rtc::Thread::QueuedTaskHandler::OnMessage(rtc::Message*) + 39
    frame #12: 0x0000000110548e5b TwilioVoice`rtc::Thread::Dispatch(rtc::Message*) + 133
    frame #13: 0x0000000110547d5f TwilioVoice`rtc::Thread::ProcessMessages(int) + 141
    frame #14: 0x000000011054926a TwilioVoice`rtc::Thread::PreRun(void*) + 76
    frame #15: 0x0000000112d9f4f4 libsystem_pthread.dylib`_pthread_start + 125
    frame #16: 0x0000000112d9b00f libsystem_pthread.dylib`thread_start + 15
  thread #38, name = 'MediaFactoryImpl::networking 0x0x600002180f00'
    frame #0: 0x0000000110594cb6 TwilioVoice`webrtc::RtpHeaderExtensionMap::GetType(int) const
    frame #1: 0x0000000110594bf7 TwilioVoice`webrtc::RtpHeaderExtensionMap::Register(int, webrtc::RTPExtensionType, char const*) + 109
    frame #2: 0x0000000110594ad6 TwilioVoice`webrtc::RtpHeaderExtensionMap::RegisterByUri(int, absl::string_view) + 152
    frame #3: 0x0000000110594b70 TwilioVoice`webrtc::RtpHeaderExtensionMap::RtpHeaderExtensionMap(rtc::ArrayView<webrtc::RtpExtension const, -4711l>) + 80
    frame #4: 0x0000000110529f3e TwilioVoice`webrtc::RtpTransport::UpdateRtpHeaderExtensionMap(std::__1::vector<webrtc::RtpExtension, std::__1::allocator<webrtc::RtpExtension> > const&) + 64
    frame #5: 0x0000000110549f20 TwilioVoice`webrtc::webrtc_new_closure_impl::ClosureTask<rtc::Thread::Send(rtc::Location const&, rtc::MessageHandler*, unsigned int, rtc::MessageData*)::$_0>::Run() + 18
    frame #6: 0x000000011054961b TwilioVoice`rtc::Thread::QueuedTaskHandler::OnMessage(rtc::Message*) + 39
    frame #7: 0x0000000110548e5b TwilioVoice`rtc::Thread::Dispatch(rtc::Message*) + 133
    frame #8: 0x0000000110547d5f TwilioVoice`rtc::Thread::ProcessMessages(int) + 141
    frame #9: 0x000000011054926a TwilioVoice`rtc::Thread::PreRun(void*) + 76
    frame #10: 0x0000000112d9f4f4 libsystem_pthread.dylib`_pthread_start + 125
    frame #11: 0x0000000112d9b00f libsystem_pthread.dylib`thread_start + 15
  thread #39
    frame #0: 0x0000000112f24506 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x0000000112d9fa69 libsystem_pthread.dylib`_pthread_cond_wait + 1224
    frame #2: 0x0000000110741d64 TwilioVoice`resip::Condition::wait(resip::Mutex&, unsigned int) + 148
    frame #3: 0x0000000110817d60 TwilioVoice`resip::AbstractFifo<resip::Timestamped<resip::Message*> >::getNext(int, resip::Timestamped<resip::Message*>&) + 192
    frame #4: 0x000000011081b51b TwilioVoice`resip::DumThread::thread() + 155
    frame #5: 0x0000000110734aea TwilioVoice`threadIfThreadWrapper(void*) + 10
    frame #6: 0x0000000112d9f4f4 libsystem_pthread.dylib`_pthread_start + 125
    frame #7: 0x0000000112d9b00f libsystem_pthread.dylib`thread_start + 15

Versions

All relevant version information for the issue.

Voice iOS SDK

6.3.0

Xcode

13.4

iOS Version

15.5

iOS Device

iPhone 13 Pro Max (Simulator), iPhone SE 2 (Physical device).

bobiechen-twilio commented 2 years ago

Hi @sgowda97

From the stack you provided, I couldn't find the exact reason that caused the crash in thread 1. Is this reproducible in the debugging environment and did you see the system message when it crashed?

sgowda97 commented 2 years ago

Hi @bobiechen-twilio,

The logs I have provided earlier are from bt all. The package is being used with Flutter via Method/Event channels. The code used here is from Twilio's iOS Quickstart with minimal modifications, such as variable names, etc. The message it produces in Xcode window before crashing is,


2022-05-26 14:39:11.551817+0530 Runner[76765:79905938] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[6]'
*** First throw call stack:
(
    0   CoreFoundation                      0x000000011102a604 __exceptionPreprocess + 242
    1   libobjc.A.dylib                     0x000000010c6c4a45 objc_exception_throw + 48
    2   CoreFoundation                      0x00000001110abc63 _CFThrowFormattedException + 200
    3   CoreFoundation                      0x00000001110b615d -[__NSPlaceholderDictionary initWithCapacity:].cold.1 + 0
    4   CoreFoundation                      0x0000000111098930 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 251
    5   CoreFoundation                      0x0000000111029258 +[NSDictionary dictionaryWithObjects:forKeys:count:] + 49
    6   TwilioVoice                         0x00000001104375b0 +[TVOEndpointAnalyticsUtilities getPlatformMetadata] + 787
    7   TwilioVoice                         0x000000011045125f +[TVOEndpointAnalyticsEvent eventWithName:group:level:payload:] + 445
    8   TwilioVoice                         0x0000000110440331 -[TVOEventReceiver publishConnectionEvent:error:level:] + 873
    9   TwilioVoice                         0x00000001104436f0 _ZN6twilio5voice20EventObserverAdapter7onEventENSt3__13mapINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_4pairIS9_NS0_8DataTypeEEENS2_4lessIS9_EENS7_INSA_IKS9_SC_EEEEEE + 1342
    10  TwilioVoice                         0x0000000110881ecf _ZNSt3__110__function6__funcIZN6twilio5voice8CallImpl9postEventERNS_3mapINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESB_NS_4lessISB_EENS9_INS_4pairIKSB_SB_EEEEEERSF_E4$_46NS9_ISL_EEFvvEEclEv + 223
    11  libdispatch.dylib                   0x000000010ebbb816 _dispatch_call_block_and_release + 12
    12  libdispatch.dylib                   0x000000010ebbca5b _dispatch_client_callout + 8
    13  libdispatch.dylib                   0x000000010ebcb325 _dispatch_main_queue_drain + 1169
    14  libdispatch.dylib                   0x000000010ebcae86 _dispatch_main_queue_callback_4CF + 31
    15  CoreFoundation                      0x0000000110f96ed5 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
    16  CoreFoundation                      0x0000000110f916ca __CFRunLoopRun + 2761
    17  CoreFoundation                      0x0000000110f90704 CFRunLoopRunSpecific + 562
    18  GraphicsServices                    0x0000000117c00c8e GSEventRunModal + 139
    19  UIKitCore                           0x000000012ecde65a -[UIApplication _run] + 928
    20  UIKitCore                           0x000000012ece32b5 UIApplicationMain + 101
    21  Runner                              0x0000000100baeeef main + 63
    22  dyld                                0x00000001094c2f21 start_sim + 10
    23  ???                                 0x0000000200da24fe 0x0 + 8604230910
    24  ???                                 0x0000000200d9d000 0x0 + 8604209152
)
libc++abi: terminating with uncaught exception of type NSException
dyld4 config: DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot DYLD_LIBRARY_PATH=/Users/shreyas/Library/Developer/Xcode/DerivedData/Runner-bzjfnhtfsoqhougtlptllqfctomv/Build/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libBacktraceRecording.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMainThreadChecker.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib DYLD_FRAMEWORK_PATH=/Users/shreyas/Library/Developer/Xcode/DerivedData/Runner-bzjfnhtfsoqhougtlptllqfctomv/Build/Products/Debug-iphonesimulator
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[6]'
terminating with uncaught exception of type NSException
CoreSimulator 802.6.1 - Device: iPhone 13 Pro Max (E6FB63DE-70AE-4D25-9635-4CFC2B2E4C15) - Runtime: iOS 15.5 (19F70) - DeviceType: iPhone 13 Pro Max```