peerconnection_client always crashes

195 views
Skip to first unread message

Alex Freed

unread,
Sep 8, 2020, 2:33:38 AM9/8/20
to discuss-webrtc
I'm building webRTC on a Ubuntu 16.04. Everything build OK and peerconnection_unittests work with no issues. However if I try to establish a session between 2 instances of the peerconnection_client either on the same machine or different ones, it always crashes.
This particular build crashes in the  GtkMainWnd:OnRedraw  inside memcpy. 
Both the source and destination appear to be valid if I look with gdb. And it renders some video but then crashes in the middle of a frame. It's like it's trying to render a frame that is not there yet.
I tried to build from scratch on Ubuntu 18.04. Got a crash but at a different place.

Is anyone running the peerconnection_client successfully?

eee...@gmail.com

unread,
Sep 8, 2020, 10:54:51 AM9/8/20
to discuss-webrtc
I had the similar issues in Ubuntu, while the following commands work most of time. I am wondering if the autoconnect or autocall matters. 

$ ./peerconnection_client --autoconnect --server <Server.IP>
$ ./peerconnection_client --server <Server.IP> --autoconnect --autocall

My video never worked in Windows with the peercoonection_client, I am still exploring it.

Alex Freed

unread,
Sep 8, 2020, 1:40:51 PM9/8/20
to discuss-webrtc
Unfortunately the arguments do not change a thing here...  The weird thing is that the code that fails does memcpy() line by line. It always crashes on line 228 out of 360, if I limit the scaled lines to 200, or even comment out most of the code in OnRedraw()  it still crashes elsewhere after a few seconds. 

Marián Dvorský

unread,
Sep 15, 2020, 3:16:04 AM9/15/20
to discuss-webrtc
I've had some luck debugging crashes when building with is_asan=true parameter in gn args and symbolizing the stack traces using tools/valgrind/asan/asan_symbolize.py.

Lin Wang

unread,
Jul 13, 2021, 3:48:07 AMJul 13
to discuss-webrtc
I also got this issue, it crash everytime on this line of GtkMainWnd::OnRedraw: memcpy(scaled, prev_line, (width_ * 2) * 4)

Also, when I debug with gdb, when it crash, p *scaled is 0, and width_ is 480.

Since I am not familiar with GtkWnd, wish someone can help indeed.

Thank you so much.

witaly...@gmail.com

unread,
Jul 15, 2021, 6:55:31 AMJul 15
to discuss-webrtc
this issue was really annoying so I went ahead and fixed it: https://bugs.chromium.org/p/webrtc/issues/detail?id=11014#c5
Reply all
Reply to author
Forward
0 new messages