An Azure service that integrates speech processing into apps and services.
The stack trace shows a std::__1::mutex::lock() throwing std::__1::__throw_system_error, which indicates a C++ std::system_error coming from a mutex operation inside MicrosoftCognitiveServicesSpeech::GetModuleObject during process teardown (__cxa_finalize_ranges / exit). This is happening on a background thread when the app is going to background/being torn down.
From the available context, the only actionable guidance is to treat this as an unhandled exception/crash coming from a native library and ensure it is captured and diagnosable via a crash-reporting SDK:
- Integrate App Center Crashes (iOS) into the app if not already done, following the iOS getting started guidance referenced in the documentation.
- Ensure the app is run without a debugger attached when reproducing, because the SDK will not forward crash logs while a debugger is attached.
- Once the crash is captured in App Center, use the symbolicated stack trace to confirm the exact call path into
MicrosoftCognitiveServicesSpeechand correlate it with app lifecycle events (e.g., backgrounding, deallocation of speech objects). - If the crash is confirmed to be inside the Microsoft Cognitive Services Speech native library during teardown, open a support ticket with the Speech SDK team including:
- The symbolicated crash log
- SDK version
- Repro steps (especially what happens when the app enters background and how speech objects are created/disposed).
If the app uses App Center Crashes already, the callbacks described in the documentation (willSendErrorReport, didSucceedSendingErrorReport, didFailSendingErrorReport) can be used to verify that the crash report is successfully sent and to attach any additional diagnostic data (for example, current speech SDK state) via attachments(with:for:) before the stored crash is uploaded on next launch.
References: