Every Compat (Wood Good)

Every Compat (Wood Good)

22M Downloads

[๐Ÿž]: World Edit Memory Leak

EdoEquin0x opened this issue ยท 38 comments

commented

Before Continuing:

  • Always check you are using the latest version of the mods and its dependencies
  • Remove mod that enhances Minecraft: Optifine, Sodium, others. The issue still persists.
  • If you are unsure which mod is the culprit.
    Disable all of your mods and enable them 1-2 mods each time to isolate the culprit
  • Confirm that there is no existing issue with a similar description submitted in the list of issues.

Version

1.20.1

Loader

Forge

EveryCompat Version

Latest for 1.20.1

Moonlight Lib Version

Latest for 1.20.1

Issue with mods

Memory Usage is rising to worrying values when Every Wood add his compats.

Issue Detail

It seems that Every Wood is acting weird with Worldedit when it need to add a lot of blocks

OPTIONAL: Latest.log | Crash-report Attachment

No logs since nothing talk about it. I have this message from WorldEdit Dev that describe what might create the problem though.
image
image

OPTIONAL: To Produce

  1. Install some decorations mod (Macaw mods, heart & home, chipped etc)
  2. Install some wood mod (Bop, Region Unexplored)
  3. Install World Edit
  4. Launch on server
commented

And this does not happen without world edit? Also do you mean memory leaks when you use some world edit command? Does it keep on rising (after world is booted)?
Please provide more info

commented

Also send your latest.log

commented

Hello, this does not happen without world edit. The memory leak doesn't happen when using a command or anything, it happen on server boot. It doesn't keep rising.
[
latest.log
](url)

commented

you could disable all of the mods except EC and WE, until you see the same behaviour of RAM with one mod enabled which should be the culprit.

This could be a combination of 3 mods: WE, EC and an unknown mod (which one adds furniture or wood types). Testing will be required. Other factors need to be uncovered.

I've used WE before. I know that when you copy a structure you can paste it somewhere else. It usually is saved in RAM (if I understand correctly). the other is you can save the structure to a file and use it later in another world or whatever.

commented

hm not sure how to debug this tbh. Would have to install world edit and see. Not sure if spark can report memory usge either.
Anyways can you fill this up:

Ram used World Edit EC
? no no
? no yes
? yes yes
? yes no

I have a rough idea of the resosuces that EC shoudl take up given your log so what I'm tyring to figure out is who is at fault here, if memory leak is in EC or world edit

commented

Here for the RAM used the minute the server is online and ready:

Ram used World Edit EC
3.7Go no no
4.3Go no yes
9Go yes yes
5.8Go yes no

If theses values look normal to you, let me know, this value looked awfully high to me thus the issue post.

commented

so world edit does use quite a bit of ram.
from no WO to WO it added 2.1gb
Now we know from the log that EC has registered ardound 5k blocks, which are around 55% of your total blocks. I would expect resource usage increase to be a significant fraction of the original resources used when EC is not on which adds up seeing the 0.6gb increase. One could assume that the rest of the blocks in the game take up 0.6gb of ram aswell since EC doubled the amount.

IF World edit were to have some really big internal data structure which would scale linearly whith the registered blocks, even being conservative and saying that 100% of World Edit ram usage was because of this, one would only expect a total of 2.1GB x2 taken by WE when both mods are on which isnt quite the case as there remain 0.6gb of ram unaccounted for.

However if those data structures would scale with blockstates instead of blocks and you would happen to have installed some mods that add many of those (say furniture mod that adds many variants of a chair where even if 1 block was registered many blockstates would be present) then this would explain the data increase.

In short I cannot confidently say its a memory leak from EC nor disporove it.

What i see is that between the two mod WE manages to comsume way more data that EC which is highly unusual given EC has the potential to skyrocket ram usage under the right cirumstances as it can potentially register infinite blocks (which need ram to exist, thats how it is) depending on the mods added .

Since it only happens with WE its either a very specific conflict that further increases ram usage or its just world edit itself that is overwhelmed by the blocks registered by ec.
Reminder that the blocks that EC registered are totally up to the used choices as they depend solely on the wood-adding and furniture-adding mods that one chooses to install. If too many are on the mod can easily register hunder of thausands of those

commented

Note that I kept all of the other mods while doing that table.

Maybe one of the mod is working badly with WE by default and adding blocks from that mods through EC make the thing much much worse ?

commented
  1. If you had Macaw's Door installed with Dramatic Doors, then that's one factor. yes.
  2. one more thing. The DramaticDoors Module doesn't have the update for new supported mods. it's a lot more than I thought.
  3. I don't know what mods you installed which add wood types to Minecraft. it may explain why 2) happened.
commented

1 Yes, Macaw's door
2 BOP and RU

commented

Damn, now we just uncovered all of the factors. Region Unexplored wasn't accounted for in the list of Supported mod.

Dramatic Doors will be up to date in the next EveryCompat version.

commented

I will try it once it's release and tell you how it run

commented

I found the mod that cause the issue I think.

It seems to be Dramatic Doors.

By removing it I am able to start a server with both EC and WE (and all of the other mods I had on the logs) with 5.4Go only.

commented

interesting. What's the version of Dramatic Doors?

commented

I used the latest one for 1.20.1 so that one https://www.curseforge.com/minecraft/mc-mods/dramatic-doors/files/4870748

I noticed that by itself it increase the memory usage of WE by 1.5Go and then together with EC increase it by much much more, explaining everything.

So EC is not the faulty one, it just do what it supposed to do: adding compat, and well, with Dramatic door it add hundreds of faulty blocks

commented

That's because Dramatic Doors can support Fabric, Quilt, Forge, and NeoForge. and a long list of supported mods. "faulty" blocks? what do you mean by "faulty"?
I see Every Compat has Dramatic Door support disabled.

commented

By faulty I mean blocks that increase memory usage by that much (see the initial post with the screen from WE dev),

I noticed that installing DD with WE give the high memory usage that can be seen in my table on the WE-only section.

I also noticed that adding EC to the mix give that 9Go used since it probably add a lot more Dramatic Doors thus making things worse.

commented

Where did you saw it was disabled ? I have them in game

commented

I saw them in the Source Code and fixed it. it was a typo.

there are 2 modules. one for DramaticDoors Macaws and Dramatic Doors.

the reason why Dramatic Doors is disabled is because it was using Dramatic Doors Macaw TWICE! ๐Ÿคฆ

edit:
it's on FORGE side, FABRIC side is fine.

edit 2:
I need to update the module because Dramatic Doors got a few more new supported mods.

commented

So basically what happens is DD and EC both add their respective compats that are basically the same ?

commented

So basically what happens is DD and EC both add their respective compats that are basically the same ?

yup...

commented

Is it what might cause the issue ?

commented

I won't be able to upload the new version of EveryCompat because I don't have Quark beta mod for 1.20.1 as a required library. EC will be uploaded to Curseforge/modrinth later.

commented

So note that even if EC had a failed module that was registering unneded blocks, in yur setup without world edit even with all those blocks, EC was only taking 0.6gb of ram.
I believe that this issue might just be World Edit doing something terribly inefficent and not being able to deal with mods that add many blockstates. That would explian why ram usage only jumped so much when adding WE. Of course removing DD helped there simply because removing DD would remove all its added blocks (which are already quite a few) PLUS EC added ones which too would be quite many. Ram usage from your instance however still seems disproportionally high for just world edit and so this issue would just appear again when adding any other mod that add more content.

commented

โ˜๏ธ i was going to mention our discussion (with MehVahdJukaar) about this. it would be good if you could run some tests with the new version of EC and see if the problem persists, then the problem is on the WE side.

commented

If you want I can do the same table I did with the new version

commented

that will be good info to have. one good point from MehVahdJukaar

WE doesn't add any blocks so EC would not register any new stuff when just adding WE

in other words, World Edit does not have any blocks to add and just features as you know what it's capable of.
I'll be uploading the mod to CurseForge/modrinth in a moment

Edit:
on that note, it will take a while to get approval

commented

I'm fine with waiting don't worry

commented

Look like it didn't changed much, the problem is still occurring.. It will be hard to have support from WE since the dev always blame other mods's devs

commented

Worth noting that on some boot with the new EC, DD and WE, the ram is at 7Go instead on 9Go, on other boot the ram is at 9 like before. This is pretty weird

Edit: Removing Macaw's Door lowered the ram usage to 5.7Go at every boot even with DD, EC and WE !

commented

So if WE Is indeed having some ludicrous inefficient data structure that scales with blockstate count obviously removing mods that many if them will decrease Thier side. EC would just amplify this effect. Core of the issue however would appear to still be world edit. I wonder where all those resources end up being used, they seem way too high. Also didn't the dev literally confirm this world edit issue with that message you posted?

commented

Not really, the answer from her I posted can be summarized by "This is not worldedit's fault, it's the other mods that implement their blockstate wrongly"

commented

Yeah well, when readding the rest of my modpack I go back to crazy ram values, WE is probably the problem overall

commented

Unfortunately, that's up to DEV to fix the mod or not.
If you don't mind. what's the reason you added WE to your modpack?

commented

Because I plan to use all of that on a server, since there will be a lot of building on it, WE is kind of a must-have

commented

I see. Just checking, you used this WE mod, right?

commented

Yes

commented

7.2.15 version