peerconnection example crashes when connecting

344 views
Skip to first unread message

Ryan Wooley

unread,
Oct 17, 2018, 5:38:33 PM10/17/18
to discuss-webrtc
Hi,

I'm new to the group and to WebRTC in general. I noticed an issue with the peerconnection example in v69 and have confirmed that it occurs for me in master as well. Built the 32-bit Release target for Windows using ninja.

If I connect 2 clients using the built example, the video appears to connect successfully and work for about 1 second before both clients crash.

It looks like there are logging macros in the example, but I'm not sure where they log. Let me know what other information I can provide.

Thanks in advance.

Ryan Wooley

Ryan Wooley

unread,
Oct 17, 2018, 10:04:30 PM10/17/18
to discuss-webrtc
Also tested the 64-bit Release target, which does not crash.

Ryan Wooley

unread,
Oct 18, 2018, 4:56:15 PM10/18/18
to discuss-webrtc
Here is a stack trace that I caught when attaching the debugger. It threw the read access violation at different spots when doing a few test runs, but it seems to consistently be down in LibvpxVp8Encoder::Encode() 

Exception thrown: read access violation.
a was 0xE0082C7E.

peerconnection_client.exe!vpx_get4x4sse_cs_c(const unsigned char * a, int a_stride, const unsigned char * b, int b_stride) Line 31 C
peerconnection_client.exe!pick_intra4x4mby_modes(macroblock * mb, int * Rate, int * best_dist) Line 241 C
peerconnection_client.exe!vp8_pick_inter_mode(VP8_COMP * cpi, macroblock * x, int recon_yoffset, int recon_uvoffset, int * returnrate, int * returndistortion, int * returnintra, int mb_row, int mb_col) Line 861 C
peerconnection_client.exe!vp8cx_encode_inter_macroblock(VP8_COMP * cpi, macroblock * x, TOKENEXTRA * * t, int recon_yoffset, int recon_uvoffset, int mb_row, int mb_col) Line 1168 C
peerconnection_client.exe!encode_mb_row(VP8_COMP * cpi, VP8Common * cm, int mb_row, macroblock * x, macroblockd * xd, TOKENEXTRA * * tp, int * segment_counts, int * totalrate) Line 458 C
peerconnection_client.exe!vp8_encode_frame(VP8_COMP * cpi) Line 867 C
peerconnection_client.exe!encode_frame_to_data_rate(VP8_COMP * cpi, unsigned int * size, unsigned char * dest, unsigned char * dest_end, unsigned int * frame_flags) Line 4003 C
peerconnection_client.exe!vp8_get_compressed_data(VP8_COMP * cpi, unsigned int * frame_flags, unsigned int * size, unsigned char * dest, unsigned char * dest_end, __int64 * time_stamp, __int64 * time_end, int flush) Line 5119 C
peerconnection_client.exe!vp8e_encode(vpx_codec_alg_priv * ctx, const vpx_image * img, __int64 pts, unsigned long duration, long flags, unsigned long deadline) Line 890 C
peerconnection_client.exe!vpx_codec_encode(vpx_codec_ctx * ctx, const vpx_image * img, __int64 pts, unsigned long duration, long flags, unsigned long deadline) Line 217 C
peerconnection_client.exe!webrtc::LibvpxVp8Encoder::Encode(const webrtc::VideoFrame & frame, const webrtc::CodecSpecificInfo * codec_specific_info, const std::vector<enum webrtc::FrameType,std::allocator<enum webrtc::FrameType> > * frame_types) Line 796 C++
peerconnection_client.exe!webrtc::VCMGenericEncoder::Encode(const webrtc::VideoFrame & frame, const webrtc::CodecSpecificInfo * codec_specific, const std::vector<enum webrtc::FrameType,std::allocator<enum webrtc::FrameType> > & frame_types) Line 99 C++
peerconnection_client.exe!webrtc::vcm::VideoSender::AddVideoFrame(const webrtc::VideoFrame & videoFrame, const webrtc::CodecSpecificInfo * codecSpecificInfo) Line 300 C++
peerconnection_client.exe!webrtc::VideoStreamEncoder::EncodeVideoFrame(const webrtc::VideoFrame & video_frame, __int64 time_when_posted_us) Line 853 C++
peerconnection_client.exe!webrtc::VideoStreamEncoder::MaybeEncodeVideoFrame(const webrtc::VideoFrame & video_frame, __int64 time_when_posted_us) Line 817 C++
peerconnection_client.exe!webrtc::VideoStreamEncoder::OnFrame::__l2::<lambda>() Line 691 C++
peerconnection_client.exe!rtc::ClosureTask<void <lambda>(void) >::Run() Line 54 C++
peerconnection_client.exe!rtc::TaskQueue::Impl::RunPendingTasks() Line 354 C++
peerconnection_client.exe!rtc::TaskQueue::Impl::ThreadState::RunThreadMain() Line 373 C++
peerconnection_client.exe!rtc::TaskQueue::Impl::ThreadMain(void * context) Line 363 C++
peerconnection_client.exe!rtc::PlatformThread::Run() Line 163 C++
peerconnection_client.exe!rtc::PlatformThread::StartThread(void * param) Line 77 C++

YongSoo Jang

unread,
Nov 19, 2018, 3:48:00 AM11/19/18
to discuss-webrtc
do you solve this proplem ?
i have same things.

2018년 10월 19일 금요일 오전 5시 56분 15초 UTC+9, Ryan Wooley 님의 말:

Albert Sheldon

unread,
Nov 26, 2018, 10:37:15 AM11/26/18
to discuss-webrtc
We did come up with a solution for our environment.
We changed the gn gen to use is_clang=true and use_lld to false to force the Microsoft linker but use clang to compile.

Please see https://bugs.chromium.org/p/webrtc/issues/detail?id=10004 for the issue we opened about this.

Ramesh Kumar

unread,
Dec 31, 2018, 6:24:32 AM12/31/18
to discuss-webrtc
Thank god, you saved my day :)
Reply all
Reply to author
Forward
0 new messages