SkriptLang / Skript

Skript is a Spigot plugin which allows server admins to customize their server easily, but without the hassle of programming a plugin or asking/paying someone to program a plugin for them.
https://docs.skriptlang.org
GNU General Public License v3.0
1.08k stars 373 forks source link

Skript haulting on parse #4905

Closed TheLimeGlass closed 1 year ago

TheLimeGlass commented 2 years ago

Skript/Server Version

2.6.3

Bug Description

When Skript parses this code in a script it freezes the server. I had no crash report for 5 minutes.

command /wat:
    trigger:
        set {_vector} to vector between {pos2} and {pos1}
        set {_middle} to location at x of {_vector}, y of {_vector}, z of {_vector} in the world of {pos1}

Expected Behavior

Not crash

Steps to Reproduce

Make a script of this, save, start the server and freezes.

Other

I think it has to do with the fact that x of syntaxes conflict for vectors and locations. The syntax was working fine until I added of after the x, y and z. LocationAt conflicting with VectorXYZ classes is my guess unless this is unrelated to the syntaxes and just a freezing issue with the parser in 2.6.3 because I did also notice when an error shows, the error message lags way more than it used to before 2.6.3.

Related issue: #1783

TheLimeGlass commented 2 years ago

Related to parser lag https://github.com/SkriptLang/Skript/issues/1117