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 #10302

Open
4 of 5 tasks
pietro-lopes opened this issue Oct 2, 2024 · 1 comment · May be fixed by #10304
Open
4 of 5 tasks

Memory Leak of Client Level #10302

pietro-lopes opened this issue Oct 2, 2024 · 1 comment · May be fixed by #10304
Labels
Bug: Confirmed A reproduced bug Bug Gotta squash 'em all!

Comments

@pietro-lopes
Copy link

Is there an existing issue for this?

  • I have searched the existing issues.

Are you using the latest MineColonies Version?

  • I am running the latest beta/release version of MineColonies for my Minecraft version.
    I am also running the latest versions of other mods that are part of my problem.

Did you check on the Wiki? or ask on Discord?

  • I checked the MineColonies Wiki and made sure my issue is not covered there. Or I was sent from discord to open an issue here.

What were you playing at the time? Were you able to reproduce it in both settings?

  • Single Player
  • Multi Player

Minecraft Version

1.21

MineColonies Version

1.1.719

Structurize Version

1.0.752

Related Mods and their Versions

JEI - 19.19.3.226

Current Behavior

To add JEI Compat, Minecolonies instantiate Citizens with the current real ClientLevel, causing it to hold forever.

image

Expected Behavior

Maybe implement some sort of fake level or grab the level/instantiate lazily? dunno.

Reproduction Steps

  1. Load world with JEI in the mod list
  2. Change dimensions
  3. Check memory for active ClientLevels, you might see at least 2. the old and the current.

Logs

check image

Anything else?

No response

Footer


Viewers

  • Add a thumbs-up to the bug report if you are also affected. This helps the bug report become more visible to the team and doesn't clutter the comments.
  • Add a comment if you have any insights or background information that isn't already part of the conversation.
@Nightenom
Copy link
Member

Possible solution: create static fakeLevel for all job cats (from latest blockui), reimplement realLevel() method with mc.instance.level, properly setup entities - might need some changes in fakeLevel because currently it has only setEntities(collection)
I don't recommend using Entity#setLevel nor linking entities with normal level instance (as we do now..)

@Nightenom Nightenom added the Bug: Confirmed A reproduced bug label Oct 2, 2024
@uecasm uecasm linked a pull request Oct 3, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Confirmed A reproduced bug Bug Gotta squash 'em all!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants