Android的崩溃WebRTC技术 [英] Android WebRTC crashes
问题描述
我试图通过断开pressing返回键以及与此错误应用程序崩溃呼叫。我使用Eclipse的皮埃尔Chabardes的AndroidRTC应用程序。
https://github.com/pchab/AndroidRTC
我还建造了最新WebRTC中的 libjingle_peerconnection_so.so &安培; libjingle_peerconnection.jar 通过Linux机器。
12月4日至10日:20:16.695:E / RTC(29060):#
12月4日至10日:20:16.695:E / RTC(29060):在../../talk/app/webrtc/java/jni/peerconnection_jni.cc#致命错误,线路926
12月4日至10日:20:16.695:E / RTC(29060):#检查失败:0 ==(reinter pret_cast< MediaSourceInterface *>(j_p)) - >发行()(0与1)
12月4日至10日:20:16.695:E / RTC(29060):#意外的引用计数。
12月4日至10日:20:16.695:E / RTC(29060):#
12月4日至10日:20:16.695:A / libc的(29060):致命信号6(SIGABRT),code -6 TID 29060
经过多个小时的测试中去之后,我已经想通了,这是最初创建没有在的onDestroy()方法正确关闭上线插座。
它这样的事情有:
公共无效的onDestroy(){
对(对等体:peers.values()){
peer.pc.dispose();
}
videoSource.dispose();
factory.dispose();
client.disconnect();
client.close();
}
它需要通过这样的方式接近:
公共无效的onDestroy(){
对(对等体:peers.values()){
peer.pc.dispose();
}
videoSource.dispose();
factory.dispose();
client.off();< ----您需要打开,然后断开,然后将其关闭。
client.disconnect();
client.close();
}
I am trying to disconnect the call by pressing back button and the application crashes with this error. I am using Pierre Chabardes 's AndroidRTC app on eclipse. https://github.com/pchab/AndroidRTC
I have also builded the latest WebRTC libjingle_peerconnection_so.so & libjingle_peerconnection.jar through linux machine.
04-10 12:20:16.695: E/rtc(29060): #
04-10 12:20:16.695: E/rtc(29060): # Fatal error in ../../talk/app/webrtc/java/jni/peerconnection_jni.cc, line 926
04-10 12:20:16.695: E/rtc(29060): # Check failed: 0 == (reinterpret_cast<MediaSourceInterface*>(j_p))->Release() (0 vs. 1)
04-10 12:20:16.695: E/rtc(29060): # Unexpected refcount.
04-10 12:20:16.695: E/rtc(29060): #
04-10 12:20:16.695: A/libc(29060): Fatal signal 6 (SIGABRT), code -6 in tid 29060
After going through multiple hours of testing, I had figured out that the Socket which was initially created was not closed properly in the onDestroy() method on line .
Its something like this there:
public void onDestroy() {
for (Peer peer : peers.values()) {
peer.pc.dispose();
}
videoSource.dispose();
factory.dispose();
client.disconnect();
client.close();
}
it needs to be close by this way :
public void onDestroy() {
for (Peer peer : peers.values()) {
peer.pc.dispose();
}
videoSource.dispose();
factory.dispose();
client.off();<---- You need to turn OFF and then disconnect and then close it.
client.disconnect();
client.close();
}
这篇关于Android的崩溃WebRTC技术的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!