twilio / twilio-voice-ios

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

EXC_BAD_ACCESS `void absl::internal_any_invocable::LocalInvoker` in version 6.8.0 #115

Closed nalexn closed 1 year ago

nalexn commented 1 year ago

Description

We've upgraded the SDK to the newest version 6.8.0 that uses an updated webRTC client, and got a few crashes during our QA. The crash rate is relatively large (3 per 15 calls), so we're now hesitant to proceed with using this latest SDK version in production.

Call stack:

0
TwilioVoice
void absl::internal_any_invocable::LocalInvoker<false, void, twilio::voice::ListenerImpl::ListenerImpl(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, std::__1::weak_ptr<twilio::voice::MessageObserver>, std::__1::weak_ptr<twilio::voice::EventObserver>, std::__1::shared_ptr<twilio::NotifierQueue>, std::__1::weak_ptr<twilio::voice::CallImpl>, twilio::voice::CancelledCallInviteImpl, std::__1::weak_ptr<rtc::Thread>, long)::$_3&&>(absl::internal_any_invocable::TypeErasedState*)
1
TwilioVoice
rtc::Thread::Dispatch(rtc::Message*)
2
TwilioVoice
rtc::Thread::ProcessMessages(int)
3
TwilioVoice
rtc::Thread::PreRun(void*)
4
libsystem_pthread.dylib
__pthread_start

Steps to Reproduce

There are no clear steps of repro, but according to the logs, one crash happened after the call was put on hold via tvoCall.isOnHold = true, and two more times while the app was just idle in the background after the call ended.

Reproduces How Often

We were doing QA of our app prior to release and got 3 crashes per 15 calls.

Voice iOS SDK

6.8.0 via SPM

Xcode

14.3.1

iOS Version

16.5

iOS Device

iPhone 12 Pro

bobiechen-twilio commented 1 year ago

Thanks for the repro steps @nalexn! We did notice similar (if not exactly the same) crash trace in our QA environment and also created an internal ticket for tracking.

-bobie

nalexn commented 1 year ago

Hey @bobiechen-twilio , any news on this crash? We've halted the SDK upgrades, waiting for a fix. Just wanted to know if this has been identified or at least prioritized

bobiechen-twilio commented 1 year ago

Hi @nalexn

We have released the Voice iOS SDK 6.9.1, which has the fix for this specific issue. Thanks again for reporting. Please update the SDK and let us know how it goes.

-bobie

nalexn commented 1 year ago

@bobiechen-twilio it looks like the bug is still there, however, the crash log is now shorter:

0
TwilioVoice
rtc::Thread::ProcessMessages(int)
1
TwilioVoice
rtc::Thread::PreRun(void*)
2
libsystem_pthread.dylib
__pthread_start

The error has changed a bit as well:

EXC_BAD_ACCESS • TwilioVoiceAttempted to dereference garbage pointer 0x68.

This is on version 6.9.1

nalexn commented 1 year ago

I've opened a separate ticket #120 for the crash in 6.9.1