Skip to content

Error when i trying reloaded the main script and disabled the secondary once. #4916

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

Closed
1 task done
cooffeeRequired opened this issue Jul 16, 2022 · 4 comments
Closed
1 task done
Assignees
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. priority: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation).

Comments

@cooffeeRequired
Copy link
Contributor

cooffeeRequired commented Jul 16, 2022

Skript/Server Version

[07:20:26 INFO]: [Skript] Server Version: git-Purpur-1713 (MC: 1.19)
[07:20:26 INFO]: [Skript] Skript Version: 2.6.2-mc-1.19-build2
[07:20:26 INFO]: [Skript] Installed Skript Addons: 
[07:20:26 INFO]: [Skript]  - skript-yaml v1.4
[07:20:26 INFO]: [Skript]  - skript-reflect v2.3 (https://github.com/TPGamesNL/skript-reflect)
[07:20:26 INFO]: [Skript]  - skUtilities v0.9.2 (https://tim740.github.io/)
[07:20:26 INFO]: [Skript]  - WebSK v1.2.1
[07:20:26 INFO]: [Skript]  - SkBee v1.16.3 (https://github.com/ShaneBeee/SkBee)
[07:20:26 INFO]: [Skript] Installed dependencies: None

Bug Description

when I try to disable the script using "disable script .." I also tried "if script .. is loaded" but it didn''t help.

Expected Behavior

reloaded the _main_.sk but turn off the /utils/ scripts...

Steps to Reproduce

  • main,sk
on stop:
    loop ...(new File("plugins/Skript/scripts/BoxFight/utils").listFiles()):
        set {_n::*} to "%loop-value%" split at "\"
        set {_m} to last element of {_n::*}
        replace all "-", ".sk" in {_m} with ""
        disable script "BoxFight\utils\%{_m}%.sk"
  • utils/utils.sk
  on load:
    send returnStatus("utils")

Errors or Screenshots


[07:19:40 ERROR]: #!#! 
[07:19:40 ERROR]: #!#! [Skript] Severe Error:
[07:19:40 ERROR]: #!#! 
[07:19:40 ERROR]: #!#! Something went horribly wrong with Skript.
[07:19:40 ERROR]: #!#! This issue is NOT your fault! You probably can't fix it yourself, either.
[07:19:40 ERROR]: #!#! It looks like you are using some plugin(s) that alter how Skript works (addons).
[07:19:40 ERROR]: #!#! Here is full list of them:
[07:19:40 ERROR]: #!#! skript-reflect v2.3 (https://github.com/TPGamesNL/skript-reflect) WebSK v1.2.1 SkBee v1.16.3 (https://github.com/ShaneBeee/SkBee) skript-yaml v1.4 skUtilities v0.9.2 (https://tim740.github.io/) 
[07:19:40 ERROR]: #!#! We could not identify which of those are specially related, so this might also be Skript issue.
[07:19:40 ERROR]: #!#! You should try disabling those plugins one by one, trying to find which one causes it.
[07:19:40 ERROR]: #!#! If the error doesn't disappear even after disabling all listed plugins, it is probably Skript issue.
[07:19:40 ERROR]: #!#! In that case, you will be given instruction on how should you report it.
[07:19:40 ERROR]: #!#! On the other hand, if the error disappears when disabling some plugin, report it to author of that plugin.
[07:19:40 ERROR]: #!#! Only if the author tells you to do so, report it to Skript's issue tracker.
[07:19:40 ERROR]: #!#! 
[07:19:40 ERROR]: #!#! Stack trace:
[07:19:40 ERROR]: #!#! java.lang.IndexOutOfBoundsException: Index 1 out of bounds for length 1
[07:19:40 ERROR]: #!#!     at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100)
[07:19:40 ERROR]: #!#!     at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106)
[07:19:40 ERROR]: #!#!     at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302)
[07:19:40 ERROR]: #!#!     at java.base/java.util.Objects.checkIndex(Objects.java:359)
[07:19:40 ERROR]: #!#!     at java.base/java.util.ArrayList.remove(ArrayList.java:504)
[07:19:40 ERROR]: #!#!     at Skript.jar//ch.njol.skript.SkriptEventHandler.removeTriggers(SkriptEventHandler.java:211)
[07:19:40 ERROR]: #!#!     at Skript.jar//ch.njol.skript.ScriptLoader.unloadScript_(ScriptLoader.java:1022)
[07:19:40 ERROR]: #!#!     at Skript.jar//ch.njol.skript.ScriptLoader.reloadScript(ScriptLoader.java:1055)
[07:19:40 ERROR]: #!#!     at Skript.jar//ch.njol.skript.effects.EffScriptFile.execute(EffScriptFile.java:102)
[07:19:40 ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.Effect.run(Effect.java:50)
[07:19:40 ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)
[07:19:40 ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89)
[07:19:40 ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.Trigger.execute(Trigger.java:56)
[07:19:40 ERROR]: #!#!     at Skript.jar//ch.njol.skript.command.ScriptCommand.execute2(ScriptCommand.java:286)
[07:19:40 ERROR]: #!#!     at Skript.jar//ch.njol.skript.command.ScriptCommand.lambda$execute$0(ScriptCommand.java:251)
[07:19:40 ERROR]: #!#!     at Skript.jar//ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:256)
[07:19:40 ERROR]: #!#!     at Skript.jar//ch.njol.skript.command.ScriptCommand.onCommand(ScriptCommand.java:195)
[07:19:40 ERROR]: #!#!     at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
[07:19:40 ERROR]: #!#!     at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168)
[07:19:40 ERROR]: #!#!     at org.bukkit.craftbukkit.v1_19_R1.CraftServer.dispatchCommand(CraftServer.java:940)
[07:19:40 ERROR]: #!#!     at org.bukkit.craftbukkit.v1_19_R1.CraftServer.dispatchServerCommand(CraftServer.java:903)
[07:19:40 ERROR]: #!#!     at net.minecraft.server.dedicated.DedicatedServer.bg(DedicatedServer.java:512)
[07:19:40 ERROR]: #!#!     at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:486)
[07:19:40 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1441)
[07:19:40 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.v(MinecraftServer.java:1208)
[07:19:40 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:307)
[07:19:40 ERROR]: #!#!     at java.base/java.lang.Thread.run(Thread.java:833)
[07:19:40 ERROR]: #!#! 
[07:19:40 ERROR]: #!#! Version Information:
[07:19:40 ERROR]: #!#!   Skript: 2.6.2-mc-1.19-build2 (custom version)
[07:19:40 ERROR]: #!#!     Flavor: selfbuilt-unknown
[07:19:40 ERROR]: #!#!     Date: unknown
[07:19:40 ERROR]: #!#!   Bukkit: 1.19-R0.1-SNAPSHOT
[07:19:40 ERROR]: #!#!   Minecraft: 1.19
[07:19:40 ERROR]: #!#!   Java: 18.0.1.1 (Java HotSpot(TM) 64-Bit Server VM 18.0.1.1+2-6)
[07:19:40 ERROR]: #!#!   OS: Windows 10 amd64 10.0
[07:19:40 ERROR]: #!#!
[07:19:40 ERROR]: #!#! Server platform: Paper
[07:19:40 ERROR]: #!#!
[07:19:40 ERROR]: #!#! Current node: null
[07:19:40 ERROR]: #!#! Current item: disable script file {_arg} (as java.lang.String)
[07:19:40 ERROR]: #!#! Current trigger: command /build-in (simple event) (vscode.sk, line 25)
[07:19:40 ERROR]: #!#!
[07:19:40 ERROR]: #!#! Thread: Server thread
[07:19:40 ERROR]: #!#!
[07:19:40 ERROR]: #!#! Language: english
[07:19:40 ERROR]: #!#! Link parse mode: DISABLED
[07:19:40 ERROR]: #!#!
[07:19:40 ERROR]: #!#! End of Error.
[07:19:40 ERROR]: #!#!

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
@TheLimeGlass
Copy link
Contributor

TheLimeGlass commented Jul 16, 2022

Latest version is 2.6.3 try that first https://github.com/SkriptLang/Skript/releases

@cooffeeRequired
Copy link
Contributor Author

cooffeeRequired commented Jul 16, 2022

hi the same problem

[09:23:03 ERROR]: #!#! 
[09:23:03 ERROR]: #!#! [Skript] Severe Error:
[09:23:03 ERROR]: #!#! 
[09:23:03 ERROR]: #!#! Something went horribly wrong with Skript.
[09:23:03 ERROR]: #!#! This issue is NOT your fault! You probably can't fix it yourself, either.
[09:23:03 ERROR]: #!#! It looks like you are using some plugin(s) that alter how Skript works (addons).
[09:23:03 ERROR]: #!#! Here is full list of them:
[09:23:03 ERROR]: #!#! skript-reflect v2.3 (https://github.com/TPGamesNL/skript-reflect) WebSK v1.2.1 SkBee v1.16.3 (https://github.com/ShaneBeee/SkBee) skript-yaml v1.4 skUtilities v0.9.2 (https://tim740.github.io/) 
[09:23:03 ERROR]: #!#! We could not identify which of those are specially related, so this might also be Skript issue.
[09:23:03 ERROR]: #!#! You should try disabling those plugins one by one, trying to find which one causes it.
[09:23:03 ERROR]: #!#! If the error doesn't disappear even after disabling all listed plugins, it is probably Skript issue.
[09:23:03 ERROR]: #!#! In that case, you will be given instruction on how should you report it.
[09:23:03 ERROR]: #!#! On the other hand, if the error disappears when disabling some plugin, report it to author of that plugin.
[09:23:03 ERROR]: #!#! Only if the author tells you to do so, report it to Skript's issue tracker.
[09:23:03 ERROR]: #!#! 
[09:23:03 ERROR]: #!#! Stack trace:
[09:23:03 ERROR]: #!#! java.lang.IndexOutOfBoundsException: Index 1 out of bounds for length 1
[09:23:03 ERROR]: #!#!     at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100)
[09:23:03 ERROR]: #!#!     at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106)
[09:23:03 ERROR]: #!#!     at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302)
[09:23:03 ERROR]: #!#!     at java.base/java.util.Objects.checkIndex(Objects.java:359)
[09:23:03 ERROR]: #!#!     at java.base/java.util.ArrayList.remove(ArrayList.java:504)
[09:23:03 ERROR]: #!#!     at Skript.jar//ch.njol.skript.SkriptEventHandler.removeTriggers(SkriptEventHandler.java:211)
[09:23:03 ERROR]: #!#!     at Skript.jar//ch.njol.skript.ScriptLoader.unloadScript_(ScriptLoader.java:1022)
[09:23:03 ERROR]: #!#!     at Skript.jar//ch.njol.skript.ScriptLoader.reloadScript(ScriptLoader.java:1055)
[09:23:03 ERROR]: #!#!     at Skript.jar//ch.njol.skript.effects.EffScriptFile.execute(EffScriptFile.java:102)
[09:23:03 ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.Effect.run(Effect.java:50)
[09:23:03 ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)
[09:23:03 ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89)
[09:23:03 ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.Trigger.execute(Trigger.java:56)
[09:23:03 ERROR]: #!#!     at Skript.jar//ch.njol.skript.command.ScriptCommand.execute2(ScriptCommand.java:286)
[09:23:03 ERROR]: #!#!     at Skript.jar//ch.njol.skript.command.ScriptCommand.lambda$execute$0(ScriptCommand.java:251)
[09:23:03 ERROR]: #!#!     at Skript.jar//ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:256)
[09:23:03 ERROR]: #!#!     at Skript.jar//ch.njol.skript.command.ScriptCommand.onCommand(ScriptCommand.java:195)
[09:23:03 ERROR]: #!#!     at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
[09:23:03 ERROR]: #!#!     at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168)
[09:23:03 ERROR]: #!#!     at org.bukkit.craftbukkit.v1_19_R1.CraftServer.dispatchCommand(CraftServer.java:940)
[09:23:03 ERROR]: #!#!     at org.bukkit.craftbukkit.v1_19_R1.CraftServer.dispatchServerCommand(CraftServer.java:903)
[09:23:03 ERROR]: #!#!     at net.minecraft.server.dedicated.DedicatedServer.bg(DedicatedServer.java:512)
[09:23:03 ERROR]: #!#!     at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:486)
[09:23:03 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1441)
[09:23:03 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.v(MinecraftServer.java:1208)
[09:23:03 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:307)
[09:23:03 ERROR]: #!#!     at java.base/java.lang.Thread.run(Thread.java:833)
[09:23:03 ERROR]: #!#! 
[09:23:03 ERROR]: #!#! Version Information:
[09:23:03 ERROR]: #!#!   Skript: 2.6.3 (latest)
[09:23:03 ERROR]: #!#!     Flavor: skriptlang-github
[09:23:03 ERROR]: #!#!     Date: 00:55:22.847925631
[09:23:03 ERROR]: #!#!   Bukkit: 1.19-R0.1-SNAPSHOT
[09:23:03 ERROR]: #!#!   Minecraft: 1.19
[09:23:03 ERROR]: #!#!   Java: 18.0.1.1 (Java HotSpot(TM) 64-Bit Server VM 18.0.1.1+2-6)
[09:23:03 ERROR]: #!#!   OS: Windows 10 amd64 10.0
[09:23:03 ERROR]: #!#! 
[09:23:03 ERROR]: #!#! Server platform: Paper
[09:23:03 ERROR]: #!#! 
[09:23:03 ERROR]: #!#! Current node: null
[09:23:03 ERROR]: #!#! Current item: disable script file {_arg} (as java.lang.String)
[09:23:03 ERROR]: #!#! Current trigger: command /build-in (simple event) (vscode.sk, line 25)
[09:23:03 ERROR]: #!#! 
[09:23:03 ERROR]: #!#! Thread: Server thread
[09:23:03 ERROR]: #!#! 
[09:23:03 ERROR]: #!#! Language: english
[09:23:03 ERROR]: #!#! Link parse mode: DISABLED
[09:23:03 ERROR]: #!#! 
[09:23:03 ERROR]: #!#! End of Error.
[09:23:03 ERROR]: #!#! 
[09:23:03 INFO]: An internal error occurred while attempting to perform this comma
[09:23:57 INFO]: [Skript] Server Version: git-Purpur-1713 (MC: 1.19)
[09:23:57 INFO]: [Skript] Skript Version: 2.6.3
[09:23:57 INFO]: [Skript] Installed Skript Addons:
[09:23:57 INFO]: [Skript]  - skript-yaml v1.4
[09:23:57 INFO]: [Skript]  - skript-reflect v2.3 (https://github.com/TPGamesNL/skript-reflect)
[09:23:57 INFO]: [Skript]  - skUtilities v0.9.2 (https://tim740.github.io/)
[09:23:57 INFO]: [Skript]  - WebSK v1.2.1
[09:23:57 INFO]: [Skript]  - SkBee v1.16.3 (https://github.com/ShaneBeee/SkBee)
[09:23:57 INFO]: [Skript] Installed dependencies: None

@AyhamAl-Ali
Copy link
Member

Can you share a screenshot of your Skript folder and utils folder
Also share the result of

broadcast "All: %enabled scripts%"
broadcast "All: %disabled scripts%"

@AyhamAl-Ali AyhamAl-Ali added the waiting for reply The report needs a response from the reporter to determine course of action. label Jul 16, 2022
@TPGamesNL
Copy link
Member

If an on unload event modifies SkriptEventHandler.selfRegisteredTriggers, it may cause this exception due to concurrent modification. It may also cause the wrong values to be removed from the script, corrupting loaded scripts.

@TPGamesNL TPGamesNL added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation). and removed waiting for reply The report needs a response from the reporter to determine course of action. labels Jul 17, 2022
@TPGamesNL TPGamesNL self-assigned this Jul 17, 2022
@TPGamesNL TPGamesNL added the PR available Issues which have a yet-to-be merged PR resolving it label Jul 22, 2022
@TheLimeGlass TheLimeGlass added completed The issue has been fully resolved and the change will be in the next Skript update. and removed PR available Issues which have a yet-to-be merged PR resolving it labels Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. priority: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation).
Projects
None yet
Development

No branches or pull requests

4 participants