Skip to content
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

Memory leaks produced by publishing/unpublishing camera tracks #521

Open
VatamanuBogdan opened this issue Oct 9, 2024 · 2 comments
Open
Labels
bug Something isn't working

Comments

@VatamanuBogdan
Copy link

Describe the bug
See livekit/client-sdk-swift#420. I found that the same memory leak problem appears on Android for every publish -> unpublish track operation.

To Reproduce
Publish then unpublish a camera track, repeat these steps multiple times and you will see that the memory increases. The memory will be deallocated when the room is disconnected.

Expected behavior
After every camera track unpublish the memory should decrease.

Screenshots
Android Memory Leaks

Device Info:

  • Device: Samsung Galaxy A33
  • OS: Android 13
  • LiveKit SDK version: v2.6.0

Additional context
See livekit/client-sdk-swift#420 (comment)

@VatamanuBogdan VatamanuBogdan added the bug Something isn't working label Oct 9, 2024
@tuan-jason
Copy link

@davidliu We have the same leak here, except that the native memory doesn't decrease for us even after disconnecting from room.

The reproduction step that cause the native mem leak in our case is simply trying to repeatedly create a LocalVideoTrack with a custom CameraCapturer as implemented in below function:

Screenshot 2024-12-10 at 11 24 52

The memory status screenshot is here:

Screenshot 2024-12-10 at 11 24 27

We can also provide a reproducible sample within LiveKit SDK sample app as well if you need.
So, please help taking a look.

Thank you.

@adrian-niculescu
Copy link

This still replicates as of LiveKit Android v2.12.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants