#Potential Memory Leak?

1 messages ยท Page 1 of 1 (latest)

cedar basin
#

Our server is using 2.3, (iirc beta.8).

I woke up this morning to the server MSPT being in the hundred thousands, and I was extremely impressed that it can even go that high.

We aren't using 2.4 as 2.4 breaks warium VS very badly, (and the tester releases haven't been too much better), plus it doesn't seem server ready (a new 2.4 patch has come out every other day atp, thank you VS team for working so hard).

Anyways, it looks like it's related to warium VS, novum probably has already been notified of the issue, but I'm putting it here anyways just in case y'all find something.

Spark heap dump and spark report will be uploaded in a moment, discord mobile sucks and I can't upload directly to the forum post ๐Ÿ˜ญ

cedar basin
normal heart
#

I mean

#

if this is something that only happens in older versions

#

maybe they fixed it in newer ones soo

cedar basin
#

either way, good to know for people who are still on this version

normal heart
#

ppl usually dont have the necessary iq to first look for their issues in here

#

they just spam general and hope

cedar basin
#

99% of my problems are fixed with the Almighty, all powerful, Ctrl+F button

deft axle
#

๐Ÿฅ€

#

mod internally is totally different nowadays

normal heart
#

yeah thats what I meant

cedar basin
#

2.4 just doesn't seem stable enough for server usage yet

daring ocean
cedar basin
#

yup ๐Ÿ’€

daring ocean
normal heart
#

what about we stop using mcreator for vs warium

daring ocean
#

actually

#

I would consider all of these performing unreasonably bad for a block entity

cedar basin
cedar basin
deft axle
cedar basin
#

ran a quick observable 2dstare

deft axle
#

if you were gonna use 2.3 use latest beta

cedar basin
#

Yes beta.12

daring ocean
#

2.3.0-beta.10 is latest for create 0.5.1j

#

2.3.0-beta.12 is latest for create 6

cedar basin
deft axle
#

ah wait misread

#

anyways 2.4 should be stable for a server thonk if its not id like to know the error

cedar basin
#

but it's certainly a missed fact I see

deft axle
#

2.4 is the main version of the mod

muted garden
#

2.4 does not work well with warium atm

cedar basin
deft axle
#

ah

#

i see

#

fair enough

#

is it drag?

#

ive been told by warium's dev that drag really loves to make warium planes fly like soup

muted garden
#

i think the problem was found and it was not drag

#

something about inverse calculated lift

cedar basin
daring ocean
#

we should have fixed that

daring ocean
normal heart
cedar basin
#

Helicopters going wack was one of them

daring ocean
#

idk someone renamed me

normal heart
daring ocean
deft axle
#

i fixed that in 2.4.8

#

ive been told lift is now a bit too functional tho

#

loves to make things pitch

cedar basin
#

I know we were supposed to do a tester event yesterday to test 2.4.8.1 with the warium VS tester release but something happened and it had to be pushed

muted garden
cedar basin
normal heart
#

am I funny gng

muted garden
#

pistonboy

normal heart
#

im waiting for the real piston approval

deft axle
#

stickyboy ๐Ÿฅ€

normal heart
#

๐Ÿฅบ

#

it looked funny to me

muted garden
#

why are you sticky..?

normal heart
#

what exactly are you thinking about bud

#

im sticky cuz minecraft

normal heart
cedar basin
#

Maybe the memory leak was the friends we made on the way

#

๐Ÿ’€

muted garden
#

maybe the memory friends were the on the way leak

cedar basin
#

Anyways, we gotta test 2.4.8.1 with the tester release, although I'm still waiting on longy. I'll start persuading him to alive himself again

daring ocean
#

this isn't even a memory leak coppercrying

#

kids these days don't know a memory leak from just ass code clueless

muted garden
#

its just warium

deft axle
daring ocean
#

๐Ÿ˜”

cedar basin
# deft axle the world if warium was ported off mcreator

Vibey has offered a couple times to give novum modding lessons, and I've told novum I can help setup some stuff, but I think he's just a bit too scared to switch off of MCreator because java is scary or smth.

Testers riot daily in tester chat for him to get off MCreator ๐Ÿ˜ญ
-# k well not daily but it happens commonly

daring ocean
#

mhm the problem is

#

to switch to java

#

he has to rewrite the entirety of warium and warium VS from the ground up

#

simultaneously while learning java/modding the proper way

cedar basin
#

which is a huge task

daring ocean
#

indeed

cedar basin
#

Worst comes to worst, his testers are here for him, vibey can help him learn java, and some of the other testers who know how to code mods can also help.

I'm just a datapack maker so I couldn't do more than recipes, getting the folder structure correct, tags, ship weights, and other datapack/resourcepack related stuff, although it could be a bit helpful since MCreator just throws it into root without any folder structure ๐Ÿ’€

#

Unzipping warium for a texture is literal hell and he doesn't even have to obfuscate the mod ๐Ÿ˜ญ

#

actually what am I yapping about, obfuscating only applies to the code anyways, and that's what a .class file is

#

Anyways, we're all here for novum

muted garden
#

more like copy paste to new gradle

#

then everything is good to go and you can edit away

#

i have done it before and it is not that hard

#

especially with the tools intellj provides

#

(refactor is the most useful feature ever and we all take it for granted)

daring ocean
#

edit away on the absolutely terrible mcreator code

muted garden
#

yeah

daring ocean
#

its... not really managable

muted garden
#

but its better than restarting

daring ocean
#

trying to decipher it for cosmic horizons was nearly impossible

#

its basically obfuscated ๐Ÿ’€

#

your own code

muted garden
#

its still java. for warium i think its neccasary

daring ocean
#

possibly

#

I think novum should maybe like

#

make it a comunity effort

#

open source a stiched together repo

#

and have everyone hack away at the mcreator code a bit at a time

#

until it gets manageable enough for novum to tweak it to his preference (for organization etc)

muted garden
#

he most likely wont do that. but i have been eggin' him on to make me a dev

daring ocean
#

why do you think he won't go for it?

muted garden
#

ngl the decompiled deobf code aint all that hard to read

muted garden
daring ocean
#

it would all be through PRs probably

#

where he can choose which to accept

muted garden
#

tru

#

but he also is pretty secretive with the files

daring ocean
#

a strange but good first step

#

is to go back through all the procedures

#

and add as many variables as possible

#

value you only use once? variable
value you use a bunch? variable
intermediary value? variable

#

it will atleast 10x the generated code quality

muted garden
#

hm

daring ocean
#

not because "variables are good"

daring ocean
muted garden
#

he does seem to use a lot of variables. which might be why i can read the code

daring ocean
# daring ocean but because of how mcreator generates code

if you use a complex value (like idk 5 * playerX), it will copy paste that to whereever is needed. So if you plug that into a function that uses that value like, 3 times, it will copy paste that entire complex value calculation for each time the value is used. If you add a variable between, it only does that complicated code once, and can just fill in the variable for all the occurrences in the next function.

muted garden
#

lol yeah

full tiger
muted garden
daring ocean
# daring ocean if you use a complex value (like idk 5 * playerX), it will copy paste that to wh...

this also comes from the fact that mcreator procedure blocks (when made by a plugin author or official) are limited to:

  1. If it returns a value, the entire expression must be self contained and evaluate to that value. Aka all your code has to be between () and you end up using a ton of ternary operators (a way of doing calculations / conditions while still directly returning a value).
  2. if it runs code, it can't really have variables of its own, since those can conflict with the naming of other variables / cause lambda+final issues on compilation. This forces you to use the users input (which might be a copy pasted expression) every time, instead of putting it in a temporary value
daring ocean
#

trying to target mcreator code for a mixin is like trying to find a needle in a haystack in a room of mirrors

muted garden
#

i think mcreatormemfix mod has an automated thing

#

not sure tho

daring ocean
# daring ocean this also comes from the fact that mcreator procedure blocks (when made by a plu...

to give an example, here is how a normal programmer would do it:

Object myVar = null;
if (myThingy instanceof MyClass newThingy) {
  myVar = newThingy.getValue();
}

myFunction(myVar, myVar);
// use myVar later

here is mcreator (if you don't explicitly use a variable for myVar):

myFunction(((myThingy instanceof MyClass) ? ((MyClass) myThingy).getValue() : null), ((myThingy instanceof MyClass) ? ((MyClass) myThingy).getValue() : null));

now that might not look horrible, but imagine that nested like 5 deep

muted garden
#

mmm

full tiger
#

oh...
this might require more powerfull tool then mixin

muted garden
#

with all this said, i would be very willing to optimize the big bad things first.. if novum teams up and lets me help with development

pearl cradle
#

Its gonna take a defcon 1 event to get Novum to move to Java

normal heart
#

better off making Warium 2 atp

#

vs2 and warium 2

muted garden
#

novum has been talking to me about warium 2.0

#

he expects to switch over to java as things get more advanced

#

gonna be quite a few custom renderers and such

normal heart
#

thats better

#

another boywithuke listener in this server

#

holy fuck

#

i love you

muted garden
#

YIPPEEEE