Asek3 / Oculus

GNU Lesser General Public License v3.0
114 stars 60 forks source link

Memory leak on change dimensions (+Create mod) #631

Open ViRb3 opened 6 months ago

ViRb3 commented 6 months ago

What happened?

Oculus causes a bug in Create's underlying rendering engine, Flywheel, where it causes ClientLevel references to never be unloaded. When changing dimensions, such as teleporting to nether end back, an additional instance of the class is held, which permanently increases memory usage by up to 300MB on big modpacks. This never clears, even on disconnect, and forces the game to need a restart frequently. Shaders don't need to be enabled for this to happen. Create does not exhibit this bug when Oculus is removed.

Screenshot 2024-05-14 at 16 27 49

Screenshots

Screenshot 2024-05-14 at 00 49 37

Screenshot 2024-05-14 at 00 50 27

Relevant log output

No response

Minecraft Version

1.20.1

Oculus Version

1.7.0

Rubidium / Embeddium Version

0.3.18

Operating System

macOS 14.5

What is your GPU?

M3 Max

Java Version

Java 17.0.2 arm64

Additional context

No response

KostromDan commented 3 days ago

Can confirm on 1.19.2.

KostromDan commented 2 days ago

Fix for 1.20.1 https://github.com/pietro-lopes/AllTheLeaks/blob/1.20.1/src/main/java/dev/uncandango/alltheleaks/mixin/core/main/WorldAttachedMixin.java

KostromDan commented 2 days ago

Can confirm on 1.19.2.

FIxed for 1.19.2 https://github.com/KostromDan/Mekalus/commit/f884847e0a60b06113b7e60c1ac11ba0d192e4e7