user1813332
user1813332

Reputation: 55

WebRTC crash at line webrtc::PeerConnectionInterface::RTCConfiguration config; for Native Linux application

I'm writing a Native WebRTC application for Linux (Ubuntu), code is crashing at webrtc::PeerConnectionInterface::RTCConfiguration config;

I have below two speculations

  1. I might be messing up with rtc threads, since the same line runs fine in the sample application.
  2. Is there any mistake in the handling of C++ strings. Not sure how it can impact during the declaration of the variable.

Below is the trace:

0 0x00007fbd841e6fdf in std::__cxx1998::vector, std::allocator >, std::allocator, std::allocator > > >::~vector() () at /usr/include/c++/8/bits/stl_vector.h:567 1 0x00007fbd841e696e in std::__debug::vector, std::allocator >, std::allocator, std::allocator > > >::~vector() () at /usr/include/c++/8/debug/vector:210 warning: Could not find DWO CU obj/api/libjingle_peerconnection_api/peer_connection_interface.dwo(0x88209d7623c67b6c) referenced by CU at offset 0xe2f950 [in module /opt/Citrix/ICAClient/libwebrpc.so]

2 0x00007fbd8464272c in webrtc::PeerConnectionInterface::IceServer::~IceServer() () at ../../../api/peer_connection_interface.h:208 warning: Could not find DWO CU obj/pc/peerconnection/peer_connection_factory.dwo(0xc714b8e7fa522831) referenced by CU at offset 0xe2f03c [in module /opt/Citrix/ICAClient/libwebrpc.so]

3 0x00007fbd84438068 in void std::_Destroy(webrtc::PeerConnectionInterface::IceServer*) () at /usr/include/c++/8/bits/stl_construct.h:98

4 0x00007fbd844370b3 in void std::_Destroy_aux::__destroy(webrtc::PeerConnectionInterface::IceServer*, webrtc::PeerConnectionInterface::IceServer*) () at /usr/include/c++/8/bits/stl_construct.h:108

5 0x00007fbd84435a85 in void std::_Destroy(webrtc::PeerConnectionInterface::IceServer*, webrtc::PeerConnectionInterface::IceServer*) () at /usr/include/c++/8/bits/stl_construct.h:137

6 0x00007fbd84433f1b in void std::_Destroy(webrtc::PeerConnectionInterface::IceServer*, webrtc::PeerConnectionInterface::IceServer*, std::allocator&) () at /usr/include/c++/8/bits/stl_construct.h:206

7 0x00007fbd8464454f in std::__cxx1998::vector >::~vector() () at /usr/include/c++/8/bits/stl_vector.h:567

8 0x00007fbd84644192 in std::__debug::vector >::~vector() () at /usr/include/c++/8/debug/vector:210

9 0x00007fbd84643132 in webrtc::PeerConnectionInterface::RTCConfiguration::~RTCConfiguration() () at ../../../api/peer_connection_interface.h:292

Upvotes: 0

Views: 449

Answers (1)

Harsh Vardhan Rai
Harsh Vardhan Rai

Reputation: 26

Even I have observed this issue. This issue happens because by default webrtc is compiled with -D_GLIBCXX_DEBUG(see file build//config/BUILD.GN). If you don't compile your program with this flag you will get issues because this flag causes the vector's implementation to change for spitting out better debugging messages. So if you don't compile your program with this flag the std::vector implemetation will not be consistent and cause segfaults. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53324

Upvotes: 1

Related Questions