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 Leak of Client Level #240

Closed
pietro-lopes opened this issue Aug 29, 2024 · 2 comments
Closed

Memory Leak of Client Level #240

pietro-lopes opened this issue Aug 29, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@pietro-lopes
Copy link

Bug description

This cache is leaking the level

image

Minecraft version

1.21.1

Mod version

1.21.1-1.1.19

Mod loader and version

NeoForge 21.1.28

Steps to reproduce

With EMI installed

  1. Join world
  2. Do some search on EMI
  3. Leave world to main screen
  4. Join world again
  5. Check memory for some hanging ClientLevel

Expected behavior

Should have a cleanup strategy to clear those cache on LevelEvent.Unload, maybe? Pick what you know it is best.

Log files

screenshot posted

Screenshots

No response

@pietro-lopes
Copy link
Author

Also, some renderers are holding entity, you need to find a way to clean up if the level is unloaded.

@henkelmax henkelmax added bug Something isn't working and removed triage labels Aug 29, 2024
@henkelmax
Copy link
Owner

Thank you for bringing this to my attention!
I think I've fixed all the leaks by using weak references. Please let me know if you find anything else.

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
@henkelmax @pietro-lopes and others