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 with backgroundUpload causing crashes #288

Open
1 of 2 tasks
GunnarAK opened this issue Apr 30, 2024 · 2 comments
Open
1 of 2 tasks

Memory leaks with backgroundUpload causing crashes #288

GunnarAK opened this issue Apr 30, 2024 · 2 comments

Comments

@GunnarAK
Copy link

GunnarAK commented Apr 30, 2024

Current behavior

Uploading 69 video files ranging from 12 MB to 170 MB (using an asyncqueue with concurrency limit of 5) will cause to increase the memory usage on iOS Simulator easily to 4 GB without releasing memory after a successful upload. Unmounting the uploading logic in JS will also not release memory.

I have received various crash reports from Firebase Crashlytics about iPhones experiencing crashes due to this.

Expected behavior

After an upload is done the memory should be released from that task.

Platform

  • Android
  • iOS

React Native Version

0.73.2

React Native Compressor Version

1.8.24

Reproducible Steps And Demo

  1. Have a large set of video files (any multitude of the concurrency limit)
  2. Optional: Write async queue logic with concurrency limit of 5
  3. Upload multiple files to a (local) server
  4. Check RAM usage before and after uploading

Video demo

https://mega.nz/file/J4kDTJbT#Tf_zWMLtmg98Ax921nRlCkxh2YnouabflKnk0G-PgUE

@GunnarAK
Copy link
Author

I've also tried 'cancelling' an upload after its done, hoping it would collect the garbage. But unfortunately it does nothing.

@GunnarAK
Copy link
Author

@numandev1 hey man, hope you're doing well!

Are you able to reproduce this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant