-
Notifications
You must be signed in to change notification settings - Fork 318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QUESTION] Segmentation fault while adding a new addTransceiver() in Common.js #510
Comments
Hi all, This line is causing the segmentation fault. amazon-kinesis-video-streams-webrtc-sdk-c/src/source/PeerConnection/SessionDescription.c Line 542 in 57a95ad
The pSdpMediaDescription is got from the pLocalSessionDescription which is initialized in the createOffer() |
Need to take a closer look at the codebase but we have unbound array access here: https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-c/blob/master/src/source/PeerConnection/SessionDescription.c#L585 and here: https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-c/blob/master/src/source/PeerConnection/SessionDescription.c#L597 whereas https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-c/blob/master/src/source/Sdp/Sdp.h#L186 defines only 3 media descriptions.
|
…ansceivers, changing to heap allocation due to large on-stack structure, adding test to validate. Issue: #510
Thanks @MushMal for the quick turnaround. Meanwhile we have disabled SCTP in our offer to support an additional video track as we don't need application media line for our use case. I will try with the new fix supporting up to 5 media lines. Thanks once again. |
I am resolving this issue for now. Please don’t hesitate to reopen |
Hi all,
I am trying to add a new screen video track for my KVSViewer. I made changes to the struct __SampleStreamingSession in Samples.h under the samples folder and made the corresponding changes in Common.js
screenTrack.kind = MEDIA_STREAM_TRACK_KIND_VIDEO;
screenTrack.codec = RTC_CODEC_H264_PROFILE_42E01F_LEVEL_ASYMMETRY_ALLOWED_PACKETIZATION_MODE;
STRCPY(screenTrack.streamId, "myKvsVideoStream");
STRCPY(screenTrack.trackId, "myScreenTrack");
CHK_STATUS(addTransceiver(pSampleStreamingSession->pPeerConnection,
&screenTrack,
NULL,
&pSampleStreamingSession->pScreenRtcRtpTransceiver));
I also added the corresponding transceiverOnFrame for the new transreceiver. But, when I run the KVSViewer I am getting Segmentation fault in populateSessionDescriptionDataChannel() of SessionDescription.c.
The back trace from gdb is as follows
#0 0x00007ffff7bb5db1 in populateSessionDescriptionDataChannel () at /home/ubuntu/amazon-kinesis-video-streams-webrtc-sdk-c/build/libkvsWebrtcClient.so
#1 0x00007ffff7bb60a6 in populateSessionDescriptionMedia () at /home/ubuntu/amazon-kinesis-video-streams-webrtc-sdk-c/build/libkvsWebrtcClient.so
#2 0x00007ffff7bb6191 in populateSessionDescription () at /home/ubuntu/amazon-kinesis-video-streams-webrtc-sdk-c/build/libkvsWebrtcClient.so
#3 0x00007ffff7bb14bb in createOffer () at /home/ubuntu/amazon-kinesis-video-streams-webrtc-sdk-c/build/libkvsWebrtcClient.so
#4 0x7262657720505443 in ()
The issue happens while creating the SDP offer to be sent to the master. I am clueless on why this is happening or may be I am missing something. Can anybody help me on how to resolve this or is this a bug in the SDK?
The text was updated successfully, but these errors were encountered: