peerconnection example crashes

375 views
Skip to first unread message

austin...@gmail.com

unread,
Apr 29, 2014, 7:13:57 AM4/29/14
to discuss...@googlegroups.com
Hi All
I followed all the steps (in getting started page for webRTC) to build the webRTC.
Next I followed steps from http://sourcey.com/webrtc-native-to-browser-video-streaming-example/ to test between native c++ webRTC to browser chrome webRTC.

Mainly the steps I followed are

1. After building webRTC, downloaded and built the peerconnection_client and peerconnection_server
2. Started peerconnection_server in one terminal
3. Stared peerconnection_client in another terminal in same machine
4.  Opened native-to-browser-test.html in chrome browser
5. Both browser and Native webRTC connected to server (i can see names of remote client)
6. Double clicked on user shown in peerconnection_client gui

Next peerconnection_client crashes with below errors

Setting microphone to (id=0, name=Default device) and speaker to (id=0, name=Default device)
Set microphone to (id=0 name=Default device) and speaker to (id=0 name=Default device)
Error(helpers.cc:296): Failed to generate random id!
Error(helpers.cc:296): Failed to generate random id!
Error(helpers.cc:296): Failed to generate random id!
Error(helpers.cc:296): Failed to generate random id!

Allowing SCTP data engine.
Generating identity.
Error(nssidentity.cc:80): Couldn't generate key pair
Error(nssidentity.cc:375): Couldn't generate key pai
r
Enumerating V4L2 devices
V4L2 device metadata found at /sys/class/video4linux/
Found V4L2 capture device /dev/video0
Trying /sys/class/video4linux/video0/name
Name for video0 is UVC Camera (046d:0825)
Total V4L2 devices found : 1
Created VideoCapturer for UVC Camera (046d:0825)
 Capture Requested 640x480x30
 Supported MJPG 160x120x30 distance 386547056646
 Supported MJPG 176x144x30 distance 373662941190

some more logs
.................................
..................................


Camera '/dev/video0' started with format I420 640x480x30, elapsed time 60 ms
SwitchToStreamingUI
Error(helpers.cc:273): Failed to generate random string!
Error(common.cc:76): ../../talk/session/media/mediasession.cc(236): ASSERT FAILED: false @ GenerateCname

Trace/breakpoint trap (core dumped)
necs@NECS-101:~/webrtc/trunk$ find -name helpers.cc
./trunk-unnecessary/talk/base/helpers.cc
./talk/base/helpers.cc
necs@NECS-101:~/webrtc/trunk$


Please somebody help me , how to avoid this issue.

Note - I have a webcam attached to machine (ubuntu 12.04 lts) and it is working fine.

Austin

Vikas Marwaha

unread,
Apr 29, 2014, 5:53:52 PM4/29/14
to discuss...@googlegroups.com
Hi,

What revision of webrtc did you build peerconnection_client with? The error you are getting seems to be fixed in issue 2911. If you still see the problem, please file an issue in the webrtc tracker.

/Vikas


--

---
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-webrt...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

austin...@gmail.com

unread,
Apr 30, 2014, 9:08:02 AM4/30/14
to discuss...@googlegroups.com

Hi Vikas
You are right. After taking care of fix of 2911 (SSL init and close), looks it is not crashing.


I am executing peerconnection_server in one terminal , peerconnection_client in another terminal and native-to-browser-test.htm in chrome.
When I double click on user shown in client gui, I can see my webcam light is ON, but do not see any video in browser.

Getting some messages in chrome browser with '+' sign. On clicking '+' sign, I see below message.


Message from 'user@NECS-101' -
{ "candidate" : "a=candidate:186199869 1 udp 2122194687 192.168.1.101 50045 typ host generation 0\r\n", "sdpMLineIndex" : 0, "sdpMid" : "audio" }

Is this behaviour right?

I thought , peerconnection_client will stream the video to chrome browser ? am I wrong here ?

Austin
 

Vikas

unread,
May 1, 2014, 6:53:07 PM5/1/14
to discuss...@googlegroups.com
Hi,

I have not tried the native-to-browser.htm but i am guessing if things are right, you should see your video in the browser. If you open chrome://webrtc-internals and check the ice connection state, is it completed?  Also do you see any video packets actually flowing to the browser?

/Vikas

austin...@gmail.com

unread,
May 2, 2014, 1:51:14 AM5/2/14
to discuss...@googlegroups.com
Hi Vikas
I accessed chrome://webrtc-internals. I see the content as below.

Create Dump

A diagnostic audio recording is used for analyzing audio problems. It contains the audio played out from the speaker and recorded from the microphone and is saved to the local disk. Checking this box will enable the recording for an ongoing WebRTC call and for future WebRTC calls. When the box is unchecked or this page is closed, this recording functionality will be disabled for future WebRTC calls, but an ongoing call will continue to record until the call is ended. Only recording in one tab is supported. If several tabs are running WebRTC calls, the resulting file will be invalid. To restart the dump, the tab with the call being recorded must be closed and recording disabled and enabled again. When enabling, you select a file to save the dump to. Choose a non-existing file name. Selecting an existing file will append to it, not overwrite it, rendering the file invalid.



I hope this does not have ICE configuration, how can I confg ICE stuff.

Your help is really appreciated here.

Austin

Vikas

unread,
May 2, 2014, 4:08:49 PM5/2/14
to discuss...@googlegroups.com
Hi,

If you look at the webrtc-internals page, you will see IceConnectionStateChange. The latest ice connection state should correspond to completed, if things are good. If you can't figure out, you can share the chrome://webrtc-internals dump.

/Vikas

austin...@gmail.com

unread,
May 3, 2014, 1:22:29 AM5/3/14
to discuss...@googlegroups.com
Hi Vikas
I am using crome Version 34.0.1847.116. I accessed chrome internal page  chrome://webrtc-internals/ . Here are the steps I followed.
I am not sure what mean by dump here, I am trying to access the
chrome://webrtc-internals/  page, with that whatever data I can get, I am going to put it here.

1. Accessed chrome://webrtc-internals/
2. I see just a single line - 
Create Dump
3. I clicked on
Create Dump
4. I saw the data as below

Create Dump

A diagnostic audio recording is used for analyzing audio problems. It contains the audio played out from the speaker and recorded from the microphone and is saved to the local disk. Checking this box will enable the recording for an ongoing WebRTC call and for future WebRTC calls. When the box is unchecked or this page is closed, this recording functionality will be disabled for future WebRTC calls, but an ongoing call will continue to record until the call is ended. Only recording in one tab is supported. If several tabs are running WebRTC calls, the resulting file will be invalid. To restart the dump, the tab with the call being recorded must be closed and recording disabled and enabled again. When enabling, you select a file to save the dump to. Choose a non-existing file name. Selecting an existing file will append to it, not overwrite it, rendering the file invalid.

5. Next I clicked on the button "Download the peerconnection....." button

Looks it created a file  "aba44c2a-121f-4668-84f7-9a21fdd262e7"  in my Download folder.

6. The file content is as below
{
 "getUserMedia": [],
 "PeerConnections": {}
}

I hope I have some problem here..,  please guide me  what to do next, how to configure it properly.


Regards
Austin

austin...@gmail.com

unread,
May 5, 2014, 6:00:11 AM5/5/14
to discuss...@googlegroups.com
Vikas
Any idea on this ?

Austin

Vikas

unread,
May 5, 2014, 12:10:59 PM5/5/14
to discuss...@googlegroups.com
Hi,

I assumed you opened chome://webrtc-internals when the browser test with peer connection was running. Till step 5, it does look correct. When you open the dump, you should see stats and api calls. Are you just seeing the stuff you posted?

/Vikas
Reply all
Reply to author
Forward
0 new messages