-
-
Notifications
You must be signed in to change notification settings - Fork 374
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 in Function #2337
Comments
Since when does this occur? |
Can test other versions of Skript, give me a moment |
Skript 2.4-alpha1 (Spigot 1.14.4): Exists From here on out, running modified Skript (bug exists on Skript 2.4-beta5)
Skript 2.2-dev36 (Spigot 1.11.2) Exists |
@bensku Seems like Skript 2.2-dev34 broke it, try starting from there? |
Thanks for investigating it! dev34 is so old that I'm probably not going to investigate there. Rewriting messy parts of the function system is likely faster, and produces other benefits (readable code) too. Unfortunately this means that the fix will take a while. |
Potentially related #2279 |
Likely fixed in #2383. In the end, this was not terribly hard to fix. |
I just found out that this issue has been reintroduced in some recent Skript update, as this memory leak still occurs in Skript 2.5-alpha3. |
Just to note, it seems like the memory leak was never resolved by the function overhaul. See #2877 for some memory profiles taken that show the leak. |
The lore part of this issue is caused by #3779 (see the comment for example with items) So this doesn't just affect functions |
Description
When a function returns a variable, and the function is called but does not actually get stored in a variable (local or global), it causes a leak
Steps to Reproduce
If you run the
/test
command multiple times, this occurs:As you can see, at the first call of /test there's only 1 line of lore, but then the next call of /test has 2, followed by 3, ...
Expected Behavior
Prior lore should not be stored, since it's technically local
Errors / Screenshots
Server Information
Additional Context
Should probably test other vectors other than lore, to confirm if it's limited to lore or all expressions
Also, @bensku
The text was updated successfully, but these errors were encountered: