Skip to content
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

Regex exceptions not handled #7159

Open
1 task done
sovdeeth opened this issue Oct 19, 2024 · 0 comments
Open
1 task done

Regex exceptions not handled #7159

sovdeeth opened this issue Oct 19, 2024 · 0 comments
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. patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version.

Comments

@sovdeeth
Copy link
Member

sovdeeth commented Oct 19, 2024

Skript/Server Version

[18:26:20 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[18:26:20 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[18:26:20 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[18:26:20 INFO]: [Skript] Server Version: 1.21-130-b1b5d4c (MC: 1.21)
[18:26:20 INFO]: [Skript] Skript Version: 2.9.3 (selfbuilt-unknown)
[18:26:20 INFO]: [Skript] Installed Skript Addons:
[18:26:20 INFO]: [Skript]  - skript-reflect v2.5.1 (https://github.com/SkriptLang/skript-reflect)
[18:26:20 INFO]: [Skript] Installed dependencies: None

using dev/feature build

Bug Description

Console exception when using invalid regex

Expected Behavior

Silently fail/runtime error

Steps to Reproduce

command /test:
    trigger:
        send regex split "test" at "\b{_name}\b"

Errors or Screenshots

[18:24:20 ERROR]: #!#!
[18:24:20 ERROR]: #!#! [Skript] Severe Error:
[18:24:20 ERROR]: #!#!
[18:24:20 ERROR]: #!#! Something went horribly wrong with Skript.
[18:24:20 ERROR]: #!#! This issue is NOT your fault! You probably can't fix it yourself, either.
[18:24:20 ERROR]: #!#! It looks like you are using some plugin(s) that alter how Skript works (addons).
[18:24:20 ERROR]: #!#! Here is full list of them:
[18:24:20 ERROR]: #!#! skript-reflect v2.5.1 (https://github.com/SkriptLang/skript-reflect)
[18:24:20 ERROR]: #!#! We could not identify which of those are specially related, so this might also be Skript issue.
[18:24:20 ERROR]: #!#! You should try disabling those plugins one by one, trying to find which one causes it.
[18:24:20 ERROR]: #!#! If the error doesn't disappear even after disabling all listed plugins, it is probably Skript issue.
[18:24:20 ERROR]: #!#! In that case, you will be given instruction on how should you report it.
[18:24:20 ERROR]: #!#! On the other hand, if the error disappears when disabling some plugin, report it to author of that plugin.
[18:24:20 ERROR]: #!#! Only if the author tells you to do so, report it to Skript's issue tracker.
[18:24:20 ERROR]: #!#!
[18:24:20 ERROR]: #!#! Stack trace:
[18:24:20 ERROR]: #!#! java.util.regex.PatternSyntaxException: Illegal repetition near index 3
\b{_name}\b
   ^
[18:24:20 ERROR]: #!#!     at java.base/java.util.regex.Pattern.error(Pattern.java:2204)
[18:24:20 ERROR]: #!#!     at java.base/java.util.regex.Pattern.closure(Pattern.java:3488)
[18:24:20 ERROR]: #!#!     at java.base/java.util.regex.Pattern.sequence(Pattern.java:2390)
[18:24:20 ERROR]: #!#!     at java.base/java.util.regex.Pattern.expr(Pattern.java:2245)
[18:24:20 ERROR]: #!#!     at java.base/java.util.regex.Pattern.compile(Pattern.java:1945)
[18:24:20 ERROR]: #!#!     at java.base/java.util.regex.Pattern.<init>(Pattern.java:1576)
[18:24:20 ERROR]: #!#!     at java.base/java.util.regex.Pattern.compile(Pattern.java:1101)
[18:24:20 ERROR]: #!#!     at java.base/java.lang.String.split(String.java:3356)
[18:24:20 ERROR]: #!#!     at java.base/java.lang.String.split(String.java:3229)
[18:24:20 ERROR]: #!#!     at Skript-2.9.3.jar//ch.njol.skript.expressions.ExprJoinSplit.get(ExprJoinSplit.java:84)
[18:24:20 ERROR]: #!#!     at Skript-2.9.3.jar//ch.njol.skript.expressions.ExprJoinSplit.get(ExprJoinSplit.java:27)
[18:24:20 ERROR]: #!#!     at Skript-2.9.3.jar//ch.njol.skript.lang.util.SimpleExpression.getArray(SimpleExpression.java:97)
[18:24:20 ERROR]: #!#!     at Skript-2.9.3.jar//ch.njol.skript.expressions.ExprJoinSplit.get(ExprJoinSplit.java:71)
[18:24:20 ERROR]: #!#!     at Skript-2.9.3.jar//ch.njol.skript.expressions.ExprJoinSplit.get(ExprJoinSplit.java:27)
[18:24:20 ERROR]: #!#!     at Skript-2.9.3.jar//ch.njol.skript.lang.util.SimpleExpression.getArray(SimpleExpression.java:97)
[18:24:20 ERROR]: #!#!     at Skript-2.9.3.jar//ch.njol.skript.effects.EffChange.execute(EffChange.java:284)
[18:24:20 ERROR]: #!#!     at Skript-2.9.3.jar//ch.njol.skript.lang.Effect.run(Effect.java:49)
[18:24:20 ERROR]: #!#!     at Skript-2.9.3.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:58)
[18:24:20 ERROR]: #!#!     at Skript-2.9.3.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:85)
[18:24:20 ERROR]: #!#!     at Skript-2.9.3.jar//ch.njol.skript.lang.Trigger.execute(Trigger.java:51)
[18:24:20 ERROR]: #!#!     at Skript-2.9.3.jar//ch.njol.skript.command.ScriptCommand.execute2(ScriptCommand.java:345)
[18:24:20 ERROR]: #!#!     at Skript-2.9.3.jar//ch.njol.skript.command.ScriptCommand.lambda$execute$0(ScriptCommand.java:304)
[18:24:20 ERROR]: #!#!     at Skript-2.9.3.jar//ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:315)
[18:24:20 ERROR]: #!#!     at Skript-2.9.3.jar//ch.njol.skript.command.ScriptCommand.onCommand(ScriptCommand.java:250)
[18:24:20 ERROR]: #!#!     at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
[18:24:20 ERROR]: #!#!     at io.papermc.paper.command.brigadier.bukkit.BukkitCommandNode$BukkitBrigCommand.run(BukkitCommandNode.java:91)
[18:24:20 ERROR]: #!#!     at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73)
[18:24:20 ERROR]: #!#!     at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:31)
[18:24:20 ERROR]: #!#!     at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:19)
[18:24:20 ERROR]: #!#!     at net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8)
[18:24:20 ERROR]: #!#!     at net.minecraft.commands.execution.CommandQueueEntry.execute(CommandQueueEntry.java:5)
[18:24:20 ERROR]: #!#!     at net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:103)
[18:24:20 ERROR]: #!#!     at net.minecraft.commands.Commands.executeCommandInContext(Commands.java:443)
[18:24:20 ERROR]: #!#!     at net.minecraft.commands.Commands.performCommand(Commands.java:350)
[18:24:20 ERROR]: #!#!     at net.minecraft.commands.Commands.performCommand(Commands.java:337)
[18:24:20 ERROR]: #!#!     at net.minecraft.commands.Commands.performCommand(Commands.java:332)
[18:24:20 ERROR]: #!#!     at net.minecraft.server.network.ServerGamePacketListenerImpl.performUnsignedChatCommand(ServerGamePacketListenerImpl.java:2147)
[18:24:20 ERROR]: #!#!     at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$11(ServerGamePacketListenerImpl.java:2121)
[18:24:20 ERROR]: #!#!     at net.minecraft.server.TickTask.run(TickTask.java:18)
[18:24:20 ERROR]: #!#!     at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151)
[18:24:20 ERROR]: #!#!     at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24)
[18:24:20 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1537)
[18:24:20 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201)
[18:24:20 ERROR]: #!#!     at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125)
[18:24:20 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1514)
[18:24:20 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1507)
[18:24:20 ERROR]: #!#!     at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135)
[18:24:20 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1466)
[18:24:20 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1473)
[18:24:20 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1318)
[18:24:20 ERROR]: #!#!     at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330)
[18:24:20 ERROR]: #!#!     at java.base/java.lang.Thread.run(Thread.java:1583)
[18:24:20 ERROR]: #!#!
[18:24:20 ERROR]: #!#! Version Information:
[18:24:20 ERROR]: #!#!   Skript: 2.9.3 (custom version)
[18:24:20 ERROR]: #!#!     Flavor: selfbuilt-unknown
[18:24:20 ERROR]: #!#!     Date: unknown
[18:24:20 ERROR]: #!#!   Bukkit: 1.21-R0.1-SNAPSHOT
[18:24:20 ERROR]: #!#!   Minecraft: 1.21
[18:24:20 ERROR]: #!#!   Java: 21.0.3 (Java HotSpot(TM) 64-Bit Server VM 21.0.3+7-LTS-152)
[18:24:20 ERROR]: #!#!   OS: Windows 10 amd64 10.0
[18:24:20 ERROR]: #!#!
[18:24:20 ERROR]: #!#! Server platform: Paper
[18:24:20 ERROR]: #!#!
[18:24:20 ERROR]: #!#! Current node: null
[18:24:20 ERROR]: #!#! Current item: set {_request} (as java.lang.Object) to join regex split {_request} (as java.lang.String) at "\b{_name}\b" with {_coloured-name} (as java.lang.String)
[18:24:20 ERROR]: #!#! Current trigger: command /action (simple event) (chertia\chat\actions.sk, line 17)
[18:24:20 ERROR]: #!#!
[18:24:20 ERROR]: #!#! Thread: Server thread
[18:24:20 ERROR]: #!#!
[18:24:20 ERROR]: #!#! Language: english
[18:24:20 ERROR]: #!#! Link parse mode: DISABLED
[18:24:20 ERROR]: #!#!
[18:24:20 ERROR]: #!#! End of Error.
[18:24:20 ERROR]: #!#!

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
@sovdeeth sovdeeth added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: low Issues that are not harmful to the experience but are related to useful changes or additions. labels Oct 19, 2024
@UnderscoreTud UnderscoreTud added the PR available Issues which have a yet-to-be merged PR resolving it label Nov 8, 2024
@Efnilite Efnilite added completed The issue has been fully resolved and the change will be in the next Skript update. patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. and removed priority: low Issues that are not harmful to the experience but are related to useful changes or additions. PR available Issues which have a yet-to-be merged PR resolving it labels Nov 12, 2024
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. patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version.
Projects
None yet
Development

No branches or pull requests

3 participants