Skip to content

Expression Highlighter crashes game if a URL is invalid #151

@NineOfGaming

Description

@NineOfGaming

Describe the bug
When a part is expected to have a URL it crashes the game if it is invalid in any way shape or form.

To Reproduce
Steps to reproduce the behavior:

  1. Type /txt <click:open_url:>
  2. Crash

Expected behavior
Doesnt crash

Crash Report
com.google.gson.JsonParseException: Expected authority at index 8: https://
at knot//com.mojang.serialization.DataResult$Error.mdb4df54$owo$lambda$addStackTraceToException$0$0(DataResult.java:584)
at knot//com.mojang.serialization.DataResult$Error.getOrThrow(DataResult.java:287)
at knot//net.kyori.adventure.platform.modcommon.impl.NonWrappingComponentSerializer.serialize(NonWrappingComponentSerializer.java:78)
at knot//dev.dfonline.codeclient.Utility.componentToOrderedText(Utility.java:318)
at knot//dev.dfonline.codeclient.dev.highlighter.ExpressionHighlighter.formatCommand(ExpressionHighlighter.java:187)
at knot//dev.dfonline.codeclient.dev.highlighter.ExpressionHighlighter.format(ExpressionHighlighter.java:92)
at knot//net.minecraft.class_4717.mdb4df54$codeclient$lambda$provideRenderText$0$1(class_4717.java:537)
at java.base/java.util.Optional.ifPresent(Optional.java:178)
at knot//net.minecraft.class_4717.handler$zhl000$codeclient$provideRenderText(class_4717.java:533)
at knot//net.minecraft.class_4717.method_23931(class_4717.java:320)
at knot//net.minecraft.class_342.method_73211(class_342.java:496)
at knot//net.minecraft.class_342.method_48579(class_342.java:443)
at knot//net.minecraft.class_339.method_25394(class_339.java:67)
at knot//net.minecraft.class_437.method_25394(class_437.java:126)
at knot//net.minecraft.class_408.method_25394(class_408.java:251)
at knot//net.minecraft.class_437.method_47413(class_437.java:119)
at knot//net.minecraft.class_757.mixinextras$bridge$method_47413$108(class_757.java)
at knot//net.minecraft.class_757.wrapOperation$bkj000$fabric-screen-api-v1$onRenderScreen(class_757.java:3486)
at knot//net.minecraft.class_757.mixinextras$bridge$wrapOperation$bkj000$fabric-screen-api-v1$onRenderScreen$112(class_757.java)
at knot//net.minecraft.class_757.wrapOperation$zdn000$architectury$wrapRenderScreen(class_757.java:12991)
at knot//net.minecraft.class_757.method_3192(class_757.java:537)
at knot//net.minecraft.class_310.method_1523(class_310.java:1393)
at knot//net.minecraft.class_310.method_1514(class_310.java:966)
at knot//net.minecraft.client.main.Main.main(Main.java:250)
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:514)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:72)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at com.modrinth.theseus.MinecraftLaunch.relaunch(MinecraftLaunch.java:63)
at com.modrinth.theseus.MinecraftLaunch.main(MinecraftLaunch.java:28)

Checks
Please check all these for more infomation with the bug.

  • I am using the latest version.
  • I have tried disabling various options to see if they cause the issue, such as new ones or ones I have recently enabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions