Facing lots of Native Crashes - Please give me a solution
🐞 Bug Report: Random Crash in libjingle_peerconnection_so.so (SIGABRT)
Our app using the WebRTC Android SDK occasionally crashes with a native SIGABRT originating from libjingle_peerconnection_so.so. This happens randomly once or twice per user session — we are unable to reproduce it manually, but it appears in crash analytics logs (Firebase Crashlytics).
Environment
Platform: Android (Java)
SDK Version: androidPrefixed = "137.7151.04"
Architecture: Observed on both ARM64 and ARMv7 devices
Frequency: Intermittent — once or twice per user on average
Crash Log (Simplified Stack Trace) Crashed: Thread #1 SIGABRT 0x0000000000000000 libc.so libjingle_peerconnection_so.so Java_livekit_org_webrtc_Logging_nativeLog Java_livekit_org_webrtc_Metrics_nativeGetAndReset Java_livekit_org_webrtc_PeerConnection_nativeStopRtcEventLog Java_livekit_org_webrtc_TurnCustomizer_nativeFreeTurnCustomizer JNI_OnLoad
Additional Notes
The crash often references:
Java_livekit_org_webrtc_Logging_nativeLog
Java_livekit_org_webrtc_PeerConnection_nativeStopRtcEventLog
Java_livekit_org_webrtc_TurnCustomizer_nativeFreeTurnCustomizer
Appears related to logging or metrics cleanup inside the native WebRTC layer.
No direct calls to nativeStopRtcEventLog() or Metrics.nativeGetAndReset() are made in our app code.
Expected Behavior
App should not crash during normal peer connection usage or teardown.
Actual Behavior
Occasional crash in native WebRTC library during internal logging or cleanup.
Steps to Reproduce
Not reproducible manually. Observed in production through crash reports.
Logs / Attachments
If required, I can provide complete Crashlytics logs and affected device details.
Urgent solution is required, Because our app is getting badly affected.
did you do this proguard addition? https://github.com/webrtc-sdk/android/issues/39#issuecomment-3349199456
(it would probably crash every time without it though, not occasionally.. )