You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a script that uses LuckPerms to check if a player has a permission and if so, runs a command. It was working for several days but it now suddenly crashes the server. I have tested it with players who do and do not have the permission and it crashed regardless.
My script will work at first, but eventually it will begin resulting in the error I have documented in the logs. I'm not sure what triggers it to start breaking. KubeJS loads with no errors. LuckPerms works fine by itself or in command blocks. It's only when combined with KubeJS that results in issues. https://mclo.gs/QJvsN1Z
The text was updated successfully, but these errors were encountered:
This is caused by how KJS handles threading, or rather how it doesn't. All scripts in KJS lock onto a main lock and only one bit of a script can execute at a time. This can occasionally cause issues when two scripts try to execute in parallel and one of them depends on the other finishing (here specifically a chat event waiting on permissions to be grabbed from the main thread while the main thread waits for the lock to be given back from the chat event for another (probably something.tick, i cant tell though because you don't have full stack watchdog installed) handler.
A solution to this one on the KJS side will be to make the chat event execute on the main thread, or you can do that with a server tick event listening for entries to be added to a synchronous list from a chat handler.
Thank you for that insight! Does this issue happen even if it isn't using LuckPerms commands? I've found out that it's happening on these scripts as well, even though these scripts just run tellraw commands. https://mclo.gs/JfWm3ui
Those scripts on their own won't be causing it, as all command stuff is run directly on the server thread. The issue is caused by two different script trying to execute at the same time on different threads.
Minecraft Version
1.20.1
KubeJS Version
fabric-2001.6.5-build.16
Rhino Version
fabric-2001.2.3-build.6
Architectury Version
9.2.14-fabric
Forge/Fabric Version
Fabric 0.16.10
Describe your issue
I have a script that uses LuckPerms to check if a player has a permission and if so, runs a command. It was working for several days but it now suddenly crashes the server. I have tested it with players who do and do not have the permission and it crashed regardless.
Here is my crash log: https://mclo.gs/VuduoQ9
Here is my regular log that shows me logging in and then timing out and the server crashing: https://mclo.gs/ZHYK2gV
My script will work at first, but eventually it will begin resulting in the error I have documented in the logs. I'm not sure what triggers it to start breaking. KubeJS loads with no errors. LuckPerms works fine by itself or in command blocks. It's only when combined with KubeJS that results in issues.
https://mclo.gs/QJvsN1Z
The text was updated successfully, but these errors were encountered: