-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
fix: rtcp interceptor nil panic #2930
Conversation
Thank you @LeeTeng2001! How can I reproduce this? I would like to add a test before merging! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2930 +/- ##
==========================================
+ Coverage 78.22% 78.24% +0.02%
==========================================
Files 91 91
Lines 11125 11128 +3
==========================================
+ Hits 8702 8707 +5
+ Misses 1935 1933 -2
Partials 488 488
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
hi, can you give me some idea on how to write a unit test that cover this part of code? I would love to write one without spinning up a full webrtc connection. Actually I don't really know which part of the negotiation process caused my code to panic. |
I would like to write a very minimal code to trigger the track receiver to peek without hooking up full webrtc framework. This is what I got so far, but it ran into deadlock, can you give me some idea on how I should achive this?
|
@LeeTeng2001 Do you have an example/can you explain how to reproduce with the full WebRTC? I can make it more minimal after that! sorry don’t fully understand yet |
@Sean-Der I can't provide the full example as it's confidential, can I provide error trace point instead? This panic happens after local descriptor has gather completed. When I run my code in debug mode, I noticed that the track codec is empty, is this expected behaviour? I tested and this issue is still present on v4 version of webrtc, I thought this issue might be fixed with #2610, are they related? |
Relevant debug output before panic
|
Can you provide the Offer/Answer that causes the issue? I just want to understand/fix the root cause |
Sure:
Answer:
|
hello, should I provide additional infos? This is a relevant issue |
bump |
e057683
to
5b8323d
Compare
@LeeTeng2001 I got it! The issue was that if the RTPReceiver fails during setup we would use the nil pointers incorrectly. I was able to get a test for it, merging now :) |
If we failed to startReceive we would still make the Receiver as ready to start reading. Fixes pion#2929
Description
Add a nil rtpinterceptor check before invoking read method
Reference issue
Fixes #2929