jaredlll08 / searchables

Searchables is a library mod that adds helper methods that allow for searching and filtering elements based on components, as well as offering built in auto-complete functionality.
MIT License
8 stars 8 forks source link

Game crash when type "key:```" (3x"`") in searchbar #9

Closed EdrowsLuo closed 6 months ago

EdrowsLuo commented 7 months ago

Game crash when type "key:``" (3x"") in searchbar

jaredlll08 commented 7 months ago

mc version? Controlling version? Searchables version?

Please can you retype your search term in a codeblock like this (surround by ```):

key:" (3x)"

since I'm not sure if github is changing the formatting

EdrowsLuo commented 7 months ago

1.20.1, latest version of searchables and controlling.

i mean:

key: ```  <-three backquote
EdrowsLuo commented 7 months ago

stack trace:

[Render thread/ERROR] [net.minecraft.client.Minecraft/FATAL]: Reported exception thrown!
net.minecraft.ReportedException: charTyped event handler
    at net.minecraft.client.gui.screens.Screen.m_96579_(Screen.java:444) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?]
    at net.minecraft.client.KeyboardHandler.m_90889_(KeyboardHandler.java:440) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?]
    at net.minecraft.client.KeyboardHandler.m_167827_(KeyboardHandler.java:466) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?]
    at net.minecraft.util.thread.BlockableEventLoop.execute(BlockableEventLoop.java:102) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?]
    at net.minecraft.client.KeyboardHandler.m_90934_(KeyboardHandler.java:465) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?]
    at org.lwjgl.glfw.GLFWCharModsCallbackI.callback(GLFWCharModsCallbackI.java:46) ~[lwjgl-glfw-3.3.1.jar%23120!/:build 7]
    at org.lwjgl.system.JNI.invokeV(Native Method) ~[lwjgl-3.3.1.jar%23132!/:build 7]
    at org.lwjgl.glfw.GLFW.glfwWaitEventsTimeout(GLFW.java:3474) ~[lwjgl-glfw-3.3.1.jar%23120!/:build 7]
    at com.mojang.blaze3d.systems.RenderSystem.limitDisplayFPS(RenderSystem.java:237) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?]
    at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1173) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?]
    at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:718) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?]
    at net.minecraft.client.main.Main.main(Main.java:218) ~[1.20.1%20debug.jar:?]
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
    at java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
    at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:111) ~[fmlloader-1.20.1-47.2.21.jar:?]
    at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.clientService(CommonLaunchHandler.java:99) ~[fmlloader-1.20.1-47.2.21.jar:?]
    at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$makeService$0(CommonClientLaunchHandler.java:25) ~[fmlloader-1.20.1-47.2.21.jar:?]
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) ~[modlauncher-10.0.9.jar:?]
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) ~[modlauncher-10.0.9.jar:?]
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) ~[modlauncher-10.0.9.jar:?]
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:108) ~[modlauncher-10.0.9.jar:?]
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:78) ~[modlauncher-10.0.9.jar:?]
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) ~[modlauncher-10.0.9.jar:?]
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) ~[modlauncher-10.0.9.jar:?]
    at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) ~[bootstraplauncher-1.1.2.jar:?]
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
    at java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
    at oolloo.jlw.Wrapper.invokeMain(Wrapper.java:71) ~[?:?]
    at oolloo.jlw.Wrapper.main(Wrapper.java:51) ~[?:?]
Caused by: java.lang.IndexOutOfBoundsException
    at com.blamejared.searchables.api.TokenRange.rangeIndexAtPosition(TokenRange.java:116) ~[Searchables-forge-1.20.1-1.0.2.jar%23159!/:1.0.2]
    at com.blamejared.searchables.api.SearchableType.getSuggestionsFor(SearchableType.java:52) ~[Searchables-forge-1.20.1-1.0.2.jar%23159!/:1.0.2]
    at com.blamejared.searchables.api.autcomplete.AutoComplete.accept(AutoComplete.java:96) ~[Searchables-forge-1.20.1-1.0.2.jar%23159!/:1.0.2]
    at com.blamejared.searchables.api.autcomplete.AutoComplete.accept(AutoComplete.java:25) ~[Searchables-forge-1.20.1-1.0.2.jar%23159!/:1.0.2]
    at com.blamejared.searchables.api.autcomplete.AutoCompletingEditBox$DelegatingConsumers.lambda$accept$0(AutoCompletingEditBox.java:154) ~[Searchables-forge-1.20.1-1.0.2.jar%23159!/:1.0.2]
    at java.util.ArrayList.forEach(ArrayList.java:1596) ~[?:?]
    at com.blamejared.searchables.api.autcomplete.AutoCompletingEditBox$DelegatingConsumers.accept(AutoCompletingEditBox.java:154) ~[Searchables-forge-1.20.1-1.0.2.jar%23159!/:1.0.2]
    at net.minecraft.client.gui.components.EditBox.m_94174_(EditBox.java:148) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?]
    at net.minecraft.client.gui.components.EditBox.m_94164_(EditBox.java:143) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?]
    at net.minecraft.client.gui.components.EditBox.m_5534_(EditBox.java:354) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?]
    at net.minecraft.client.gui.components.events.ContainerEventHandler.m_5534_(ContainerEventHandler.java:86) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?]
    at net.minecraft.client.KeyboardHandler.lambda$charTyped$6(KeyboardHandler.java:442) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?]
    at net.minecraft.client.gui.screens.Screen.m_96579_(Screen.java:437) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?]
    ... 28 more
jaredlll08 commented 6 months ago

This has been fixed by a Searchables update which is building now.