Crash in

127 views
Skip to first unread message

Barry Porch

unread,
Dec 7, 2022, 8:08:10 AM12/7/22
to discuss-webrtc
Hello,

I've developed a telephony app built on Electron and SIP.js, which connects to a remote webrtc <-> SIP gateway and streams audio via webrtc.  

I have a recurring issue with a crash of the entire Electron renderer process due to an error raised within the webrtc audio encoder.  The error received is:

# Fatal error in: ..\..\third_party\webrtc\modules\audio_coding\codecs\cng\audio_encoder_cng.cc, line 284
# last system error: 0
# Check failed: info.encoded_bytes == 0 (160 vs. 0)
# Encoder delivered data too early.

The issue occurs when a caller is rapidly reinvited on the far side, such as when a call is redirected between voicemail to an ACD path and back to voicemail.  The issue appears timing dependent and will happen about 1 out of 3 times under these conditions.  

I've implemented an ugly workaround of disconnecting the remote stream from the local media element as soon as I get notified of the invite, and then reconnecting the stream 1.75 seconds later.  This avoids the crash but then rapidly plays back the buffered audio which is not a good user experience.

Any help or suggestions would be greatly appreciated.

Barry

Natalie Silvanovich

unread,
Dec 7, 2022, 1:10:38 PM12/7/22
to discuss...@googlegroups.com
I'd recommend you file a bug for this in the tracker: https://bugs.chromium.org/p/webrtc/

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/8fc4f9d6-0c96-4a47-b10e-1c6f1aa63fcbn%40googlegroups.com.

Philipp Hancke

unread,
Dec 7, 2022, 1:23:34 PM12/7/22
to discuss...@googlegroups.com

Jon Arne Grødal

unread,
Jun 27, 2024, 6:15:47 AMJun 27
to discuss-webrtc
FYI: A fix for the audio_encoder_cng.cc, line 284 crash has now been submitted:
https://issues.webrtc.org/issues/42225071

I have tested this in Chrome Canary, and I no longer get this crash after reinvites.
Reply all
Reply to author
Forward
0 new messages