CaffeineMC / sodium-fabric

A Fabric mod designed to improve frame rates and reduce micro-stutter
Other
4.62k stars 787 forks source link

Out Of Memory #1299

Closed TheIrishStud closed 10 months ago

TheIrishStud commented 2 years ago

Version information

sodium-fabric-mc1.18.2-0.4.1+build.15

Reproduction Steps

  1. Combine BYG - Yungs mods - Terralith/Incendium/Nullscape data packs - heaven dimension data pack - village data pack - Replay mod for 1.18 - maybe fantastic clouds mod too i don't know
  2. Create a world and load in.
  3. Begin moving around.
  4. Crash

Crash Report file

[16:02:01] [main/INFO]: Loading Minecraft 1.18.2 with Fabric Loader 0.14.5 [16:02:01] [main/INFO]: Fabric is preparing JARs on first launch, this may take a few seconds... [16:02:01] [main/WARN]: Warnings were found!

Additional information

Don't understand what's going on. Played for days before this started happening. Thought it was the Replay Mod for 1.18 increasing memory usage since I just learned how to make timelapses and wide shots yesterday but after removing everything added recently I'm still crashing with the same "OutOfMemory" error. Checked for outdated mods... deleted configurations and options txt files... nothing I do is stopping me from crashing when I go to create a world.

TheIrishStud commented 2 years ago

After a day of frustration from failed trail and error I got everything working again besides trying the replay mod. Could have been something from a previous version of windows 10 before I did a clean install with completely fresh Minecraft files and configurations. Will continue to do some more testing and see if I can recreate the OutOfMemory error after trying to use the replay mod again. If I can successfully recreate the error I'll provide every mod, data pack, and resource pack used to recreate the constant crashing with only 4gb of ram. (8gb single stick with 4gb dedicated to Minecraft)

NealSavage commented 2 years ago

It's happening to me too, constant memory leak logs. It's because of sodium. It doesnt happen to me unless I have sodium installed.

cassphodel commented 2 years ago

I'm experiencing a memory leak as well when using Sodium with a pack I developed. After around a half hour and consuming 12GB of memory the game runs out and crashes.

NealSavage commented 2 years ago

Yeah, it's still happening for me. It's really really bad.

NealSavage commented 2 years ago

Why has this still not been fixed? The issue has been identified for like 20 days or something. It's a literal game breaking bug, it should have been fixed immediately.

magneticflux- commented 2 years ago

@NealSavage

The issue has been identified

Three people claim the issue exists. Nobody has provided a minimal reproduction of the issue. If you want somebody to fix it, provide a list of mods where the issue exists AND if any of the mods are removed, the issue goes away. Then someone can start to identify the bug and possibly fix it.

jellysquid3 commented 2 years ago

It's a literal game breaking bug, it should have been fixed immediately.

I'm not at your behest to do anything for you. You are using my software, with thousands of hours of development time poured into it, for free. Under normal circumstances I would just ban you from my issue tracker for, quite frankly, your terrible entitlement, but this issue actually matters to me, and banning you would not help me figure out what the problem is.

As per what magneticflux wrote, we need to know if this issue happens with just Sodium installed, or if there are specific mods required to aggravate the issue. It is impossible-- or at least, it's far too time consuming-- for us to try and download every mod you have, exact versions and all, to figure out which one is causing the problem. If we did this for every issue on this tracker (for which there are thousands) nothing would ever get fixed.

So please, help us help you, and give us something to work with other than "this is happening to me."

NealSavage commented 2 years ago

I already gave logs and information on another reporting of this issue.... It's not like I complained and gave no information. But, I can check real quick if it happens with only Sodium, one second, I'll edit with results.

Edit: Yes it does. Logs on the way in another edit, gotta copy and paste them into bytebin for ya.

Edit edit:

MultiMC Console Output: https://bytebin.lucko.me/ipJLSlyZpJ Logs: https://bytebin.lucko.me/9VgD34a0mg

NealSavage commented 2 years ago

That was with literally only Sodium installed as a mod, not even anything like Fabric API. Hope that helps you out.

magneticflux- commented 2 years ago

@NealSavage Enable the "Memory Tracing" option and post logs with warnings again. That option may lower performance, but it will indicate where the memory leaked from.

NealSavage commented 2 years ago

@NealSavage Enable the "Memory Tracing" option and post logs with warnings again. That option may lower performance, but it will indicate where the memory leaked from.

Where's that at? I'll do it, just can't find it.

magneticflux- commented 2 years ago

Whoops, it was removed from the UI. It's an option in .minecraft/config/sodium-options.json

NealSavage commented 2 years ago

Whoops, it was removed from the UI. It's an option in .minecraft/config/sodium-options.json

Ahhhh okay, I found it there! Heeere ya go! :)

MultiMC Console Output: https://bytebin.lucko.me/2PcB1CQHbS Logs: https://bytebin.lucko.me/HkHGChM8YN

Hope that's more helpful!

magneticflux- commented 2 years ago

@TheIrishStud @cassphodel Logs from the two of you with this option enabled would also be appreciated, so we know if it's the same issue.

LordVertice commented 2 years ago

I'm experiencing the same issue, using only Sodium and with Memory Tracing turned on. Sometimes the crash is very sudden, but I've seen some weird rendering issues too, screenshot. A file called "hs_err_pid1368.log" was also created, but it contains some sensitive info. If you need it, let me know how I can send it to you in private.

I hope this helps you out in some way!

latest.log file: https://pastebin.com/DqyCUH0C

TheIrishStud commented 2 years ago

@magneticflux- Logs from the two of you with this option enabled would also be appreciated, so we know if it's the same issue.

I honestly don't believe that is what was causing the issue because I remember myself deleting all json config files in an attempt to remedy the situation by manually resetting every single one of my currently used mod configurations and after updating to 1.19 and playing for an extended period of time I'm still borderline running out of memory just by simply exploring 10k blocks in every straight direction starting from center spawn. I'm up to 70 very small quality of life mods on 1.19 and Sodium performance takes a dump after I've traveled 10k blocks in 3 different directions. 1st direction... perfectly green memory usage while using Better F3... 2nd direction... same as the 1st... 3rd direction while attempting to travel 10k blocks... Sodium takes a massive performance dump a couple thousand blocks away from 10k... 4th direction is a little worse... Only made it 8k blocks on the 3rd direction before having to chug at 11 FPS back to 6k towards center spawn... 4th direction barely let me pass 7k before the performance takes a dump and I was lucky enough to 7 FPS chug back to center spawn without crashing... memory usage completely redlines while trying to explore far out distances at least for me... I'll go back to 1.18 very soon and see if it isn't enabled when I make new json config files and post the logs after attempting to properly recreate this Out Of Memory issue. My apologies for not being able to go back and attempt this recreation sooner but I'm ignorantly guessing that it has to do with vast amounts of new chunk generation because 1000x1000x1000x1000 isn't that big of a file size and I'm not using a small hard-drive...

To be continued as soon as possible... I hope some of this update helps to possibly figure out why memory usage is taking a dump with low allocation in the mean time. ^_^

Edit: On a side note it might be possible that combining BYG and the Terralith data pack/Terralith seed fix data pack with sodium on 1.18 causes a huge pile-up of new generation chunks rendering all at once during the 1st world load and the distance trying to be rendered simply has so much going on within those 16-20 chunks of render distance causing major memory dumps and performance loss. Which ultimately ends up with this Out Of Memory issue... if you can understand any of what I just edited in. Like too many biomes rendering all at once similar to flushing too much toilet paper down the toilet... so much packed in that it just stops. Lol

TheIrishStud commented 2 years ago

@jellysquid3 My apologies for not replying and attempting a recreation sooner. It may take me a day or so to re-gather all the of resource packs I was using on 1.18 but I still have the vast majority of my previous 124 mods downloaded from the log post when creating this issue so at the very latest I should have the logs @magneticflux- needs to determine if our issues are one in the same. I hope some of my explanation for sodium on 1.19 above possibly helps to figure out this Out Of Memory issue in the meantime while I crunch down and tell my family to leave me alone for 6-8 hours. ^_^

Edit: Now that I think about it I also had the updated version of Terralith installed on 1.19 as well and 0 frame rate drops started happening similar to the performance dumps from traveling 10k blocks in all directions. I just didn't attempt to crash when my FPS started chugging in direction 3 and 4. The same kind of performance dumps happened all the time on both 1.17 and 1.18 when I tried to combine Terralith, the mod and the data pack separately of course, with sodium before this Out Of Memory issue occurred before and now when I try them together with the updated data pack on 1.19.... just the performance dumps and memory redlines... I haven't experienced this Out Of Memory issue since updating to 1.19 and re-installing Windows 10. Hope that bit of info might help too. Didn't know if it was Sodium or Terralith so I posted for that team about the 0 frame rate drops and having to force crashes on 1.18 and 1.19.

TheIrishStud commented 2 years ago

@jellysquid3 @magneticflux- I return with a sad face in tow... after returning to 1.18 I was unable get the Terralith data pack seed fix to work so I could properly recreate the world that I was primarily trying to use with the correct terrain generated when I experienced this Out Of Memory issue. I'm stupid fresh into data pack usage as in I just started using data packs a month or so ago so I don't know what's going on now. The option magneticflux said to turn on was indeed turned off but without getting Terralith seed fix to work with the specified world because of some biome error that didn't exist before they updated to 1.19. At the end of the day I really just think, in my honest opinion, that biome mods and data packs like Terralith aren't for 4gb GPUs combined with windows 10, a single 8gb stick of memory, and only 4gb of allocated memory. I'll try to recreate the issue on 1.19 without any biome mods or data packs. After having to reinstall Windows 10 I haven't been too keen to jump back into the custom biome mods scene with such average hardware anyway. My apologies but the 1.19 issue I described above has happened all the time since I 1st began modding... with both fabric and forge and sodium and optifine... Modded and vanilla... once I explore too far Minecraft takes a dump and I stop playing for weeks or months... I'm sorry I cannot provide anything further regarding this issue for I am really not that tech savvy. The vast majority of my computing experience is "copy/paste/break/try to fix/fix and get glad or dont fix and get mad/break something else/go sniff some grass/ rinse/ repeat" and that's what I do to stay sane in the face of so much (PC world lingo/language) that I don't understand.

Edit: Heck for all I know Minecraft is just simply becoming more and more of a jumble-coded mess and low-mid tier hardware simply can't play Minecraft anymore. Only been playing since I bought Java after 1.15 released and have been modding since day 1. Nothing I do stops Minecraft from taking a dump and crashing once when I explore too far in single player. Multiplayer is absolutely never on my mind because of the insane server lag and low tiks per minute causing huge frame jumps and hackers. IDK because this happens with every update and I'm limited to 1.25 TB of data per month. That of which I can burn through with ease simply by downloading and updating too many games. I literally have to self regulate how much data I use every month so I don't get over-charged on my internet bill. LOL

JustZvan commented 1 year ago

Assuming you want the best performance. Try installing: FerriteCore ( https://www.curseforge.com/minecraft/mc-mods/ferritecore-fabric) this mod reduces memory usage Lithium ( https://modrinth.com/mod/lithium ) the best general purpose optimization mod Phosphor ( https://modrinth.com/mod/phosphor ) or Starlight ( https://modrinth.com/mod/starlight ) lightning engine optimization mods Memory Leak Fix ( https://modrinth.com/mod/memoryleakfix ) fixes some memory leaks

I don't know will this help, but it's worth trying.