Skip to content
This repository was archived by the owner on Sep 19, 2024. It is now read-only.
This repository was archived by the owner on Sep 19, 2024. It is now read-only.

[BUG] Example remove_brackets.js throws an error #17

@fetimo

Description

@fetimo

Describe the bug

Installing remove_brackets.js from the examples folder causes a crash which is observed in the Minecraft log file. The filter is not applied.

[15:24:41] [Server thread/INFO]: [Not Secure] <Fetimo> is this an issue?
[15:24:41] [Render thread/INFO]: [CHAT] <Fetimo> is this an issue?
[15:24:41] [Render thread/INFO]: [STDERR]: javax.script.ScriptException: delight.nashornsandbox.exceptions.ScriptMemoryAbuseException: Script used more than the allowed [1048576 B] of memory. The operation could NOT be gracefully interrupted.
[15:24:41] [Render thread/INFO]: [STDERR]: 	at delight.nashornsandbox.internal.NashornSandboxImpl$1.invokeFunction(NashornSandboxImpl.java:464)
[15:24:41] [Render thread/INFO]: [STDERR]: 	at io.github.darkkronicle.advancedchatfilters.scripting.ScriptFilter.execute(ScriptFilter.java:115)
[15:24:41] [Render thread/INFO]: [STDERR]: 	at io.github.darkkronicle.advancedchatfilters.scripting.ScriptManager.filter(ScriptManager.java:162)
[15:24:41] [Render thread/INFO]: [STDERR]: 	at io.github.darkkronicle.advancedchatcore.chat.MessageDispatcher.preFilter(MessageDispatcher.java:123)
[15:24:41] [Render thread/INFO]: [STDERR]: 	at io.github.darkkronicle.advancedchatcore.chat.MessageDispatcher.handleText(MessageDispatcher.java:113)
[15:24:41] [Render thread/INFO]: [STDERR]: 	at net.minecraft.class_338.handler$zzb000$advancedchatcore$addMessage(class_338.java:1078)
[15:24:41] [Render thread/INFO]: [STDERR]: 	at net.minecraft.class_338.method_44811(class_338.java)
[15:24:41] [Render thread/INFO]: [STDERR]: 	at net.minecraft.class_7594.method_44943(class_7594.java:135)
[15:24:41] [Render thread/INFO]: [STDERR]: 	at net.minecraft.class_7594.method_45749(class_7594.java:96)
[15:24:41] [Render thread/INFO]: [STDERR]: 	at net.minecraft.class_7594.method_44818(class_7594.java:85)
[15:24:41] [Render thread/INFO]: [STDERR]: 	at net.minecraft.class_7594.method_45748(class_7594.java:95)
[15:24:41] [Render thread/INFO]: [STDERR]: 	at net.minecraft.class_634.method_43595(class_634.java:909)
[15:24:41] [Render thread/INFO]: [STDERR]: 	at net.minecraft.class_7438.method_43629(class_7438.java:40)
[15:24:41] [Render thread/INFO]: [STDERR]: 	at net.minecraft.class_7438.method_11054(class_7438.java:14)
[15:24:41] [Render thread/INFO]: [STDERR]: 	at net.minecraft.class_2600.method_11072(class_2600.java:22)
[15:24:41] [Render thread/INFO]: [STDERR]: 	at net.minecraft.class_1255.method_18859(class_1255.java:156)
[15:24:41] [Render thread/INFO]: [STDERR]: 	at net.minecraft.class_4093.method_18859(class_4093.java:23)
[15:24:41] [Render thread/INFO]: [STDERR]: 	at net.minecraft.class_1255.method_16075(class_1255.java:130)
[15:24:41] [Render thread/INFO]: [STDERR]: 	at net.minecraft.class_1255.method_5383(class_1255.java:115)
[15:24:41] [Render thread/INFO]: [STDERR]: 	at net.minecraft.class_310.method_1523(class_310.java:1174)
[15:24:41] [Render thread/INFO]: [STDERR]: 	at net.minecraft.class_310.method_1514(class_310.java:801)
[15:24:41] [Render thread/INFO]: [STDERR]: 	at net.minecraft.client.main.Main.main(Main.java:237)
[15:24:41] [Render thread/INFO]: [STDERR]: 	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:462)
[15:24:41] [Render thread/INFO]: [STDERR]: 	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
[15:24:41] [Render thread/INFO]: [STDERR]: 	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
[15:24:41] [Render thread/INFO]: [STDERR]: Caused by: delight.nashornsandbox.exceptions.ScriptMemoryAbuseException: Script used more than the allowed [1048576 B] of memory. The operation could NOT be gracefully interrupted.
[15:24:41] [pool-29-thread-1/ERROR]: Uncaught exception in thread "pool-29-thread-1"
java.lang.ThreadDeath: null
	at java.lang.Thread.stop(Thread.java:942) ~[?:?]
	at delight.nashornsandbox.internal.ThreadMonitor.run(ThreadMonitor.java:149) ~[org_javadelight_delight-nashorn-ndbox-0.2.5-3fbf333c1d6912ef.jar:?]
	at delight.nashornsandbox.internal.JsEvaluator.runMonitor(JsEvaluator.java:47) ~[org_javadelight_delight-nashorn-ndbox-0.2.5-3fbf333c1d6912ef.jar:?]
	at delight.nashornsandbox.internal.NashornSandboxImpl.executeSandboxedOperation(NashornSandboxImpl.java:265) ~[org_javadelight_delight-nashorn-ndbox-0.2.5-3fbf333c1d6912ef.jar:?]
	at delight.nashornsandbox.internal.NashornSandboxImpl$1.invokeFunction(NashornSandboxImpl.java:460) ~[org_javadelight_delight-nashorn-ndbox-0.2.5-3fbf333c1d6912ef.jar:?]
	at io.github.darkkronicle.advancedchatfilters.scripting.ScriptFilter.execute(ScriptFilter.java:115) ~[AdvancedChatFilters-1.19.3-1.2.7.jar:?]
	at io.github.darkkronicle.advancedchatfilters.scripting.ScriptManager.filter(ScriptManager.java:162) ~[AdvancedChatFilters-1.19.3-1.2.7.jar:?]
	at io.github.darkkronicle.advancedchatcore.chat.MessageDispatcher.preFilter(MessageDispatcher.java:123) ~[AdvancedChatCore-1.19.4-1.5.10.jar:?]
	at io.github.darkkronicle.advancedchatcore.chat.MessageDispatcher.handleText(MessageDispatcher.java:113) ~[AdvancedChatCore-1.19.4-1.5.10.jar:?]
	at net.minecraft.class_338.handler$zzb000$advancedchatcore$addMessage(class_338.java:1078) ~[client-intermediary.jar:?]
	at net.minecraft.class_338.method_44811(class_338.java) ~[client-intermediary.jar:?]
	at net.minecraft.class_7594.method_44943(class_7594.java:135) ~[client-intermediary.jar:?]
	at net.minecraft.class_7594.method_45749(class_7594.java:96) ~[client-intermediary.jar:?]
	at net.minecraft.class_7594.method_44818(class_7594.java:85) ~[client-intermediary.jar:?]
	at net.minecraft.class_7594.method_45748(class_7594.java:95) ~[client-intermediary.jar:?]
	at net.minecraft.class_634.method_43595(class_634.java:909) ~[client-intermediary.jar:?]
	at net.minecraft.class_7438.method_43629(class_7438.java:40) ~[client-intermediary.jar:?]
	at net.minecraft.class_7438.method_11054(class_7438.java:14) ~[client-intermediary.jar:?]
	at net.minecraft.class_2600.method_11072(class_2600.java:22) ~[client-intermediary.jar:?]
	at net.minecraft.class_1255.method_18859(class_1255.java:156) ~[client-intermediary.jar:?]
	at net.minecraft.class_4093.method_18859(class_4093.java:23) ~[client-intermediary.jar:?]
	at net.minecraft.class_1255.method_16075(class_1255.java:130) ~[client-intermediary.jar:?]
	at net.minecraft.class_1255.method_5383(class_1255.java:115) ~[client-intermediary.jar:?]
	at net.minecraft.class_310.method_1523(class_310.java:1174) ~[client-intermediary.jar:?]
	at net.minecraft.class_310.method_1514(class_310.java:801) ~[client-intermediary.jar:?]
	at net.minecraft.client.main.Main.main(Main.java:237) ~[fabric-loader-0.14.19-1.19.4.jar:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:462) ~[fabric-loader-0.14.19.jar:?]
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) ~[fabric-loader-0.14.19.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) ~[fabric-loader-0.14.19.jar:?]
[15:24:41] [Render thread/INFO]: [STDERR]: 	at delight.nashornsandbox.internal.NashornSandboxImpl.executeSandboxedOperation(NashornSandboxImpl.java:273)
[15:24:41] [Render thread/INFO]: [STDERR]: 	at delight.nashornsandbox.internal.NashornSandboxImpl$1.invokeFunction(NashornSandboxImpl.java:460)
[15:24:41] [Render thread/INFO]: [STDERR]: 	... 24 more

Minecraft Info
Minecraft information:
- advancedchatbox 1.19.2-1.1.6
|-- com_carrotsearch_hppc 0.9.0
|-- edu_washington_cs_knowitall_opennlp-chunk-models 1.5
|-- edu_washington_cs_knowitall_opennlp-postag-models 1.5
|-- edu_washington_cs_knowitall_opennlp-tokenize-models 1.5
|-- javax_measure_unit-api 2.1.3
|-- javax_xml_bind_jaxb-api 2.3.1
|-- net_loomchild_segment 2.0.3
|-- net_sf_trove4j_trove4j 3.0.3
|-- org_apache_opennlp_opennlp-tools 1.9.3
|-- org_carrot2_morfologik-fsa 2.1.7
|-- org_carrot2_morfologik-fsa-builders 2.1.7
|-- org_carrot2_morfologik-speller 2.1.7
|-- org_carrot2_morfologik-stemming 2.1.7
|-- org_jetbrains_intellij_deps_trove4j 1.0.20200330
|-- org_languagetool_language-en 5.5
|-- org_languagetool_languagetool-core 5.5
|-- tech_units_indriya 1.3
-- tech_uom_lib_uom-lib-common 1.1
- advancedchatcore 1.19.4-1.5.10
|-- com_electronwill_night-config_core 3.6.5
|-- com_electronwill_night-config_toml 3.6.5
|-- com_github_darkkronicle_konstruct_addons 2.0.3-build1
|-- com_github_darkkronicle_konstruct_core 2.0.3-build1
|-- io_github_maowimpl_owo 2.0.0
|-- org_apache_commons_commons-csv 1.8
-- org_mariuszgromada_math_mathparser_org-mxparser 4.4.2
- advancedchatfilters 1.19.3-1.2.7
|-- org_javadelight_delight-nashorn-sandbox 0.2.5
|-- org_openjdk_nashorn_nashorn-core 15.3
-- org_webjars_bower_js-beautify 1.9.0
- advancedchathud 1.19.3-1.3.7
- Fabric Loader 0.14.19

  • Minecraft version 1.19.4

To Reproduce
Steps to reproduce the behavior:

  1. Install dependencies as above
  2. Copy remove_brackets.js file to filters folder, install
  3. Type a message in chat
  4. See error in log

Expected behavior
I'd expect the example filters to work

Additional context
Running macOS 13.3.1 with M1 Pro, Java 17.0.3 64-bit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions