Skip to content

Resolved memory consumption issue, Your app was consuming too much memory and did crash for lengthy recording #9

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sihatafnan
Copy link
Contributor

With current implementation, if you can't record for couple of minutes because the datasetencoder object stores the captured frames and associated depth map and confidence maps and it keeps growing. Eventually the app crashes. The fix i did was, resetting the datsetencoder after a certain interval, let's say 30s and keep track of the last frame that it captured. In this way, you can free up the memory space consumed by your app for lengthy recordings and keep recording for a long time.

@kekeblom
Copy link
Collaborator

This is not a very elegant solution to this problem. I haven't noticed any crashes due to memory myself. Which device are you using?

Was it in debug mode or release mode? In debug mode, encoding pngs and video is a lot slower, which could cause lots of frames to get queued up and could maybe be the source of the issue.

Did you find out more specifically what is consuming the memory? Resetting the dataset encoder at an arbitrary interval is quite hacky and would make maintaining the code harder. It could introduce subtle bugs where initialization or destruction causes some side effects.

Does this even work with the RGB frames? What happens to the video file?

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

Successfully merging this pull request may close these issues.

None yet

2 participants