Issue Description
The iOS application integration experiences intermittent, random process crashes during active video presentation or upon executing global mute commands on remote media tracks. This critical failure isolates within the internal multithreading operations of the sub-system responsible for video statistics calculation, triggering sudden application closure during intensive channel modifications.
Platform/SDK
Operating System: iOS
SDK: Agora Native SDK for iOS version 4.5.2.7
Affected Component: Real Time Communication Statistics Engine and Stream Data Maps
Error Characterization
The host operating system intercept registers a fatal exception inside the central runtime binary framework with the following stack trace properties:
Crash Module Location:
AgoraRtcKit - OUTLINED_FUNCTION_1201Target Pointer Trace: Pointer lookup failure involving data object references mapped inside
RtcStatisticCollector::FillVideoReceiveStatswithin the underlying code architecture filertc_stats_collector.cpp.
Root Cause
The random runtime crash originates from an unshielded data race condition between concurrent execution threads accessing a shared internal map container object within the statistics collection infrastructure.
To calculate real-time channel quality metrics, a dedicated background timer thread periodically invokes compilation loops to read active stream indicators from a central object repository. Concurrently, when the client application invokes room cleanup commands or handles user departure milestones, a separate media teardown thread executes memory eviction routines to delete matching stream registrations.
Because these independent read and erase operations execute simultaneously on the same memory block without adequate synchronization barriers or mutual exclusion gates, the memory address mapping table corrupts mid-loop. This data race condition induces an immediate illegal memory access violation, causing the parent application process to terminate abruptly.
Solution and Resolution Steps
Execute Core Core SDK Upgrade
Migrate the iOS application architecture to a newer stable version of the core communication software development kit. Subsequent stable library builds refactor the execution logic inside the statistics collection framework to apply strict thread-safety boundaries around shared container blocks.
Restrict High-Frequency Concurrent Cleanups
If engineering boundaries prevent an immediate framework library upgrade, minimize concurrent execution stress by avoiding back to back invocations of global remote track muting commands while intensive stream data ingestion or background quality monitoring routines are actively running.
Sequence Stream Destruction Routines
Enforce a linear execution path for all media stream closure and muting workflows. Programmatically introduce a precise delay milestone after halting active video track reception before initiating final unsubscription or mute commands to allow background loops to safely detach from the active stream assets.
Capture Low-Level Diagnostic Logs
If the random termination symptoms persist across deployment groups, adjust framework configurations to generate verbose execution logs. Archive the crash runtime timestamps and forward the telemetry data to advanced technical support groups for code validation.