Skip to content

[Communication - Calling] Improper internal disposal of RemoteVideoStream causes stream limit exhaustion #36753

@lsbrettjewell

Description

@lsbrettjewell
  • Package Name: @azure/communication-calling
  • Package Version: 1.40.1
  • Operating system: Windows
  • browser
    • name/version: Chrome 142.0.7444.176

Describe the bug
The internal disposal of RemoteVideoStream does not correctly dispose of the VideoStreamRendererView. As a result, the view remains in the call’s activeRemoteVideoStreamViews map, causing entries to accumulate. After six disposals on mobile, no new remote video streams can be rendered.

  1. handleRemovedStream calls dispose on the RemoteVideoStream
  2. RemoteVideoStream disposal calls dispose on the RemoteStreamRenderer
  3. RemoteStreamRenderer disposal calls dispose on the VideoStreamRendererView
  4. During VideoStreamRendererView disposal, the view calls dispose on the RemoteStreamRenderer, which throws. Because of the error, the view disposal does not complete, and the view is never removed from activeRemoteVideoStreamViews.

To Reproduce
This occurs when switching network interfaces, which triggers internal disposal of RemoteVideoStream. After several cycles of this (6 on mobile if only 1 remote video stream), the stale views accumulate and remote video streams can no longer be rendered.

Metadata

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.Communication - Calling ServerService AttentionWorkflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions