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

Prevent NullPointerException when there are no simulcast source groups. #134

Merged
merged 1 commit into from Feb 23, 2016

Conversation

Projects
None yet
2 participants
@legastero
Contributor

legastero commented Feb 12, 2016

The main for loop at line 894 short circuits if a source group does not
have a simulcast semantic. If there are no simulcast source groups at
all, the ssrc2stream hash map is never populated, triggering a NPE
after the main for loop.

This change detects that there were no simulcast groups and skips
running those final steps.

Prevent NullPointerException when there are no simulcast source groups.
The main for loop at line 894 short circuits if a source group does not
have a simulcast semantic. If there are no simulcast source groups at
all, the ssrc2stream hash map is never populated, triggering a NPE
after the main for loop.

This change detects that there were no simulcast groups and skips
running those final steps.
@bgrozev

This comment has been minimized.

Show comment
Hide comment
@bgrozev

bgrozev Feb 22, 2016

Member

Thank you for the fix!

Do I correctly understand that the NPE is due to simulcastStream being null on line 923? If that's the case, I think an NPE could still occur in the case where there are some SIM groups, but there is also a FID group for an SSRC not in a SIM group, for example something like:
SIM 1 2
FID 1 3
FID 2 4
FID 100 200

Member

bgrozev commented Feb 22, 2016

Thank you for the fix!

Do I correctly understand that the NPE is due to simulcastStream being null on line 923? If that's the case, I think an NPE could still occur in the case where there are some SIM groups, but there is also a FID group for an SSRC not in a SIM group, for example something like:
SIM 1 2
FID 1 3
FID 2 4
FID 100 200

@legastero

This comment has been minimized.

Show comment
Hide comment
@legastero

legastero Feb 22, 2016

Contributor

Correct.

The case we've been dealing with is when we have FID groups, but no SIM groups.

Contributor

legastero commented Feb 22, 2016

Correct.

The case we've been dealing with is when we have FID groups, but no SIM groups.

@bgrozev

This comment has been minimized.

Show comment
Hide comment
@bgrozev

bgrozev Feb 22, 2016

Member

Cool, thanks!

I need your contributor agreement (CLA) before I can merge, and I can't find it. You can sign the individual or corporate version. If you have already signed it, please let me know of the name that was used.

Member

bgrozev commented Feb 22, 2016

Cool, thanks!

I need your contributor agreement (CLA) before I can merge, and I can't find it. You can sign the individual or corporate version. If you have already signed it, please let me know of the name that was used.

@legastero

This comment has been minimized.

Show comment
Hide comment
@legastero

legastero Feb 22, 2016

Contributor

Just signed as individual, under Lance Stout

Contributor

legastero commented Feb 22, 2016

Just signed as individual, under Lance Stout

bgrozev added a commit that referenced this pull request Feb 23, 2016

Merge pull request #134 from legastero/no-simulcast-group-npe
Prevent NullPointerException when there are no simulcast source groups.

@bgrozev bgrozev merged commit 2d890fa into jitsi:master Feb 23, 2016

@bgrozev

This comment has been minimized.

Show comment
Hide comment
@bgrozev

bgrozev Feb 23, 2016

Member

Thank you!

Member

bgrozev commented Feb 23, 2016

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment