Problem in creating peerConnection object!

542 views
Skip to first unread message

Arun Pandiyan

unread,
Apr 27, 2017, 9:03:50 AM4/27/17
to discuss-webrtc
I've built Webrtc android application using the steps in webrtc.org (native android application development). Now AppRTC is working without any problems or error. I've created a activity with same implementation but using SocketIO as Signalling server. So i've created SocketIOClient  and also modified AppRTCClient (removed the room connection parameters as the activity is started using Background Service).

Every object is created without any problem. But during creating peerConnection object in PeerConnectionClient, it shows the following errors

04-27 18:31:58.310 17234-17234/org.appspot.apprtc V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@e0e3ad9
04-27 18:31:58.730 17234-17870/org.appspot.apprtc I/SIC: {"roomid":"OP27042017001","message":{"type":"offer","sdp":"v=0\r\no=- 4313699662671259120 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE audio video\r\na=msid-semantic: WMS eQGoYHOMfFU9AYubUgC8jdVR0UsuCoMLJ0pm\r\nm=audio 9 UDP\/TLS\/RTP\/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:B+Uq\r\na=ice-pwd:a9AtqAP9BQkeELTZEfHeKORY\r\na=fingerprint:sha-256 F7:86:55:30:9E:35:CF:D1:41:DA:E0:26:80:69:72:3A:96:D5:77:E3:61:B1:CD:34:BD:0F:4B:F1:6E:A5:D9:CD\r\na=setup:actpass\r\na=mid:audio\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=sendrecv\r\na=rtcp-mux\r\na=rtpmap:111 opus\/48000\/2\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=rtpmap:103 ISAC\/16000\r\na=rtpmap:104 ISAC\/32000\r\na=rtpmap:9 G722\/8000\r\na=rtpmap:0 PCMU\/8000\r\na=rtpmap:8 PCMA\/8000\r\na=rtpmap:106 CN\/32000\r\na=rtpmap:105 CN\/16000\r\na=rtpmap:13 CN\/8000\r\na=rtpmap:110 telephone-event\/48000\r\na=rtpmap:112 telephone-event\/32000\r\na=rtpmap:113 telephone-event\/16000\r\na=rtpmap:126 telephone-event\/8000\r\na=ssrc:2936746860 cname:DO1PZ\/lNjMWcM4bY\r\na=ssrc:2936746860 msid:eQGoYHOMfFU9AYubUgC8jdVR0UsuCoMLJ0pm 36ffc8c1-a961-4c87-9dad-8ef4071520dc\r\na=ssrc:2936746860 mslabel:eQGoYHOMfFU9AYubUgC8jdVR0UsuCoMLJ0pm\r\na=ssrc:2936746860 label:36ffc8c1-a961-4c87-9dad-8ef4071520dc\r\nm=video 9 UDP\/TLS\/RTP\/SAVPF 96 98 100 102 127 97 99 101 125\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:B+Uq\r\na=ice-pwd:a9AtqAP9BQkeELTZEfHeKORY\r\na=fingerprint:sha-256 F7:86:55:30:9E:35:CF:D1:41:DA:E0:26:80:69:72:3A:96:D5:77:E3:61:B1:CD:34:BD:0F:4B:F1:6E:A5:D9:CD\r\na=setup:actpass\r\na=mid:video\r\na=extmap:2 urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:3 http:\/\/www.webrtc.org\/experiments\/rtp-hdrext\/abs-send-time\r\na=extmap:4 urn:3gpp:video-orientation\r\na=extmap:5 http:\/\/www.ietf.org\/id\/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:6 http:\/\/www.webrtc.org\/experiments\/rtp-hdrext\/playout-delay\r\na=sendrecv\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=rtpmap:96 VP8\/90000\r\na=rtcp-fb:96 ccm fir\r\na=rtcp-fb:96 nack\r\na=rtcp-fb:96 nack pli\r\na=rtcp-fb:96 goog-remb\r\na=rtcp-fb:96 transport-cc\r\na=rtpmap:98 VP9\/90000\r\na=rtcp-fb:98 ccm fir\r\na=rtcp-fb:98 nack\r\na=rtcp-fb:98 nack pli\r\na=rtcp-fb:98 goog-remb\r\na=rtcp-fb:98 transport-cc\r\na=rtpmap:100 H264\/90000\r\na=rtcp-fb:100 ccm fir\r\na=rtcp-fb:100 nack\r\na=rtcp-fb:100 nack pli\r\na=rtcp-fb:100 goog-remb\r\na=rtcp-fb:100 transport-cc\r\na=fmtp:100 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\na=rtpmap:102 red\/90000\r\na=rtpmap:127 ulpfec\/90000\r\na=rtpmap:97 rtx\/90000\r\na=fmtp:97 apt=96\r\na=rtpmap:99 rtx\/90000\r\na=fmtp:99 apt=98\r\na=rtpmap:101 rtx\/90000\r\na=fmtp:101 apt=100\r\na=rtpmap:125 rtx\/90000\r\na=fmtp:125 apt=102\r\na=ssrc-group:FID 611908353 264956641\r\na=ssrc:611908353 cname:DO1PZ\/lNjMWcM4bY\r\na=ssrc:611908353 msid:eQGoYHOMfFU9AYubUgC8jdVR0UsuCoMLJ0pm 796685e2-0614-4a81-a2ad-26b0e3d237ee\r\na=ssrc:611908353 mslabel:eQGoYHOMfFU9AYubUgC8jdVR0UsuCoMLJ0pm\r\na=ssrc:611908353 label:796685e2-0614-4a81-a2ad-26b0e3d237ee\r\na=ssrc:264956641 cname:DO1PZ\/lNjMWcM4bY\r\na=ssrc:264956641 msid:eQGoYHOMfFU9AYubUgC8jdVR0UsuCoMLJ0pm 796685e2-0614-4a81-a2ad-26b0e3d237ee\r\na=ssrc:264956641 mslabel:eQGoYHOMfFU9AYubUgC8jdVR0UsuCoMLJ0pm\r\na=ssrc:264956641 label:796685e2-0614-4a81-a2ad-26b0e3d237ee\r\n"},"socketid":"P9oztWS4lCIQ7OiTAAbJ"}
04-27 18:31:58.769 17234-17234/org.appspot.apprtc D/CallActivity: Creating peer connection, delay=5711ms
04-27 18:31:58.769 17234-17870/org.appspot.apprtc I/SIC: {"roomid":"OP27042017001","message":{"room":"OP27042017001","type":"candidate","label":0,"id":"audio","candidate":"candidate:3623465064 1 udp 2122194687 192.168.2.96 51661 typ host generation 0 ufrag B+Uq network-id 1"},"socketid":"P9oztWS4lCIQ7OiTAAbJ"}
04-27 18:31:58.770 17234-17870/org.appspot.apprtc I/SIC: {"roomid":"OP27042017001","message":{"room":"OP27042017001","type":"candidate","label":1,"id":"video","candidate":"candidate:3623465064 1 udp 2122194687 192.168.2.96 51662 typ host generation 0 ufrag B+Uq network-id 1"},"socketid":"P9oztWS4lCIQ7OiTAAbJ"}
04-27 18:31:58.780 17234-17234/org.appspot.apprtc I/CameraManagerGlobal: Connecting to camera service
04-27 18:31:58.792 17234-17234/org.appspot.apprtc I/org.webrtc.Logging: CallActivity: Creating capturer using camera2 API.
04-27 18:31:58.792 17234-17234/org.appspot.apprtc I/org.webrtc.Logging: CallActivity: Looking for front facing cameras.
04-27 18:31:58.794 17234-17234/org.appspot.apprtc I/org.webrtc.Logging: CallActivity: Creating front facing camera capturer.
04-27 18:31:58.799 17234-17737/org.appspot.apprtc I/org.webrtc.Logging: PCRTCClient: Capturing format: 1280x720@30
04-27 18:31:58.799 17234-17234/org.appspot.apprtc D/CallActivity: Creating ANSWER...
04-27 18:31:58.799 17234-17737/org.appspot.apprtc D/PCRTCClient: Create peer connection.
04-27 18:31:58.799 17234-17737/org.appspot.apprtc D/PCRTCClient: PCConstraints: mandatory: [], optional: [DtlsSrtpKeyAgreement: true]
04-27 18:31:58.799 17234-17737/org.appspot.apprtc D/PCRTCClient: EGLContext: org.webrtc.EglBase14$Context@bee19b9
04-27 18:31:58.799 17234-17737/org.appspot.apprtc I/org.webrtc.Logging: EglBase14: SDK version: 25. isEGL14Supported: true
04-27 18:31:58.802 17234-17737/org.appspot.apprtc I/org.webrtc.Logging: EglBase14: SDK version: 25. isEGL14Supported: true
04-27 18:31:58.806 17234-17737/org.appspot.apprtc I/libjingle: (peerconnection_jni.cc:1540): Set EGL context for HW encoding.
04-27 18:31:58.806 17234-17737/org.appspot.apprtc I/MediaCodecVideoEncoder: MediaCodecVideoEncoder: MediaCodecVideoEncoderFactory::SetEGLContext
04-27 18:31:58.806 17234-17737/org.appspot.apprtc I/libjingle: (peerconnection_jni.cc:1548): Set EGL context for HW decoding.
04-27 18:31:58.806 17234-17737/org.appspot.apprtc I/MediaCodecVideoDecoder: MediaCodecVideoDecoder: MediaCodecVideoDecoderFactory::SetEGLContext
04-27 18:31:58.809 17234-17737/org.appspot.apprtc E/rtc: #
                                                         # Fatal error in ../../webrtc/sdk/android/src/jni/jni_helpers.cc, line 190
                                                         # last system error: 88
                                                         # Check failed: !IsNull(jni, o)
                                                         # GetObjectField returned NULL
                                                         #
                                                         
                                                         
                                                         --------- beginning of crash
04-27 18:31:58.809 17234-17737/org.appspot.apprtc A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 17737 (pool-4-thread-1)
                                                          
                                                          [ 04-27 18:31:58.810   464:  464 W/         ]
                                                          debuggerd: handling request: pid=17234 uid=10228 gid=10228 tid=17737

Taylor Brandstetter

unread,
Apr 27, 2017, 2:18:22 PM4/27/17
to discuss-webrtc
This error means a structure passed into the PeerConnection had an unexpectedly null member.

This check occurs in a number of places; to narrow down further, could you get a symbolized stack trace, or share some code that reproduces the crash?

--

---
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-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/26673a4a-9fb6-4c2c-b76e-2d806c6012db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Arun Pandiyan

unread,
Apr 28, 2017, 7:57:13 AM4/28/17
to discuss-webrtc

I've checked the objects passing into the function
createPeerConnection(rtcConfig,pcConstraints, pcObserver)

all values are equal to the objects created during apprtc call. The only difference is the Signalling Server. I tried even overriding my signalling server mechanism to directly accept the call. Nothing Works.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
MyPeerConnectionClient.java
WebRTClient.java
CallActivity.java

Taylor Brandstetter

unread,
Apr 28, 2017, 1:21:39 PM4/28/17
to discuss-webrtc
Can you share a minimal example that reproduces the problem (e.g., just the relevant calls to the PeerConnectionFactory constructor and createPeerConnection)? And can you check if the "iceServers" member of RTCConfiguration ends up null? That looks like the most likely explanation.

To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/8e7f2c49-cf91-40b3-9412-e6fc12b44658%40googlegroups.com.

Arun Pandiyan

unread,
Apr 28, 2017, 4:13:32 PM4/28/17
to discuss-webrtc
I've checked as you suggested. Yes, the iceServers members of RTCConfig have the following and it contains null object as its TLS parameter for the following constructor

public IceServer(String uri, String username, String password, PeerConnection.TlsCertPolicy tlsCertPolicy) {
 
this.uri = uri;
 
this.username = username;
 
this.password = password;
 
this.tlsCertPolicy = tlsCertPolicy;
}

this is done when the ice servers are added in the signalling parameters. I've managed to create IceServer object after passing a variable for tlscertpolicy.

Thanks Taylor!

kamran bhatti

unread,
Sep 13, 2017, 2:37:03 AM9/13/17
to discuss-webrtc
I got the same error you asked in question and I haven't figured it out yet. Can you help me?
Reply all
Reply to author
Forward
0 new messages