Share via

Crash when app enter background

Li Wangbiao 0 Reputation points
2026-05-06T11:56:36.1733333+00:00

#37

0 libc++abi.dylib __cxa_get_exception_ptr +88

1 libc++abi.dylib __cxa_throw +92

2 libc++.1.dylib std::__1::__throw_system_errorabi:ne190102 +92

3 libc++.1.dylib std::__1::__throw_system_error(int, char const*) +32

4 libc++.1.dylib std::__1::mutex::lock() +40

5 MicrosoftCognitiveServicesSpeech GetModuleObject

6 libsystem_c.dylib __cxa_finalize_ranges +480

7 libsystem_c.dylib exit +32

8 BackBoardServices __28-[BKSHIDEventObserver _init]_block_invoke_3 +100

9 BoardServices __31-[BSServiceConnection activate]_block_invoke.182 +124

10 BoardServices __61-[BSXPCServiceConnectionEventHandler _connectionInvalidated:]_block_invoke +196

11 BoardServices BSXPCServiceConnectionExecuteCallOut +240

12 BoardServices -[BSXPCServiceConnectionEventHandler _connectionInvalidated:] +180

13 libdispatch.dylib _dispatch_call_block_and_release +32

14 libdispatch.dylib _dispatch_client_callout +16

15 libdispatch.dylib _dispatch_lane_serial_drain +740

16 libdispatch.dylib _dispatch_lane_invoke +440

17 libdispatch.dylib _dispatch_lane_serial_drain +332

18 libdispatch.dylib _dispatch_lane_invoke +440

19 libdispatch.dylib _dispatch_root_queue_drain_deferred_wlh +292

20 libdispatch.dylib _dispatch_workloop_worker_thread +540

21 libsystem_pthread.dylib _pthread_wqthread +292

22 libsystem_pthread.dylib start_wqthread +8

Azure Speech in Foundry Tools
0 comments No comments

2 answers

Sort by: Most helpful
  1. Li Wangbiao 0 Reputation points
    2026-05-06T11:58:31.5166667+00:00

    MicrosoftCognitiveServicesSpeech-iOS:1.47.0

    0 comments No comments

  2. Q&A Assist
    2026-05-06T11:56:50.6433333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    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:

    1. Integrate App Center Crashes (iOS) into the app if not already done, following the iOS getting started guidance referenced in the documentation.
    2. Ensure the app is run without a debugger attached when reproducing, because the SDK will not forward crash logs while a debugger is attached.
    3. Once the crash is captured in App Center, use the symbolicated stack trace to confirm the exact call path into MicrosoftCognitiveServicesSpeech and correlate it with app lifecycle events (e.g., backgrounding, deallocation of speech objects).
    4. 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:

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.