CraftTweaker

CraftTweaker

151M Downloads

VerifyError when attempting to run scripts

solonovamax opened this issue ยท 2 comments

commented

Issue description

When attempting to run this script, java emits a java.lang.VerifyError while loading the class.

[15:16:43.395][ERROR][CraftTweaker-ZenCode]: Error while running scripts:
java.lang.VerifyError: Inconsistent stackmap frames at branch target 129
Exception Details:
  Location:
    scripts/chisel-reborn-stonecutter.run()V @126: goto
  Reason:
    Current frame's stack size doesn't match stackmap.
  Current Frame:
    bci: @126
    flags: { }
    locals: { top, 'net/minecraft/class_1792', top, top, top, 'java/lang/IllegalArgumentException' }
    stack: { }
  Stackmap Frame:
    bci: @129
    flags: { }
    locals: { top, 'net/minecraft/class_1792' }
    stack: { 'java/util/Iterator' }
  Bytecode:
    0000000: 1209 b800 0fb2 0015 bb00 1759 1219 121b
    0000010: b700 1fb6 0023 c000 25bb 0017 5912 2712
    0000020: 29b7 001f b600 2db9 0033 0100 59b9 0039
    0000030: 0100 9900 5259 b900 3d01 00c0 003f 4c2b
    0000040: b800 45b8 004b 124c b800 5212 5332 4e12
    0000050: 552d b600 5bb8 000f b200 602b b800 45b8
    0000060: 0063 1264 1265 b600 692b b800 6d12 6f2d
    0000070: b600 5bb8 0075 b600 79a7 0008 3a05 a700
    0000080: 03a7 ffab 57b1
  Exception Handler Table:
    bci [63, 121] => handler: 124
  Stackmap Table:
    same_locals_1_stack_item_frame(@44,Object[#53])
    full_frame(@124,{Top,Object[#63]},{Object[#123]})
    same_locals_1_stack_item_frame(@129,Object[#53])
    full_frame(@132,{},{Object[#53]})

	at Scripts.run(Unknown Source)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.openzen.zenscript.javabytecode.JavaBytecodeRunUnit.run(JavaBytecodeRunUnit.java:127)
	at org.openzen.zencode.java.ScriptingEngine.run(ScriptingEngine.java:184)
	at com.blamejared.crafttweaker.impl.script.scriptrun.runner.ExecutingScriptRunner.executeRunAction(ExecutingScriptRunner.java:22)
	at com.blamejared.crafttweaker.impl.script.scriptrun.runner.ScriptRunner.runScripts(ScriptRunner.java:92)
	at com.blamejared.crafttweaker.impl.script.scriptrun.runner.ScriptRunner.run(ScriptRunner.java:68)
	at com.blamejared.crafttweaker.impl.script.scriptrun.DecoratedRunKind$DecoratedScriptRunner.run(DecoratedRunKind.java:27)
	at com.blamejared.crafttweaker.impl.script.scriptrun.ScriptRun.executeRun(ScriptRun.java:93)
	at com.blamejared.crafttweaker.impl.script.scriptrun.ScriptRun.execute(ScriptRun.java:58)
	at com.blamejared.crafttweaker.impl.script.ScriptReloadListener.apply(ScriptReloadListener.java:80)
	at com.blamejared.crafttweaker.impl.script.ScriptReloadListener.method_18788(ScriptReloadListener.java:38)
	at net.minecraft.class_4080.method_18790(class_4080.java:13)
	at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718)
	at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
	at net.minecraft.class_4014.method_18365(class_4014.java:69)
	at net.minecraft.class_1255.method_18859(class_1255.java:156)
	at net.minecraft.class_4093.method_18859(class_4093.java:23)
	at net.minecraft.class_1255.method_16075(class_1255.java:130)
	at net.minecraft.class_1255.method_18857(class_1255.java:139)
	at net.minecraft.class_310.method_18857(class_310.java:39038)
	at net.minecraft.class_7196.method_45694(class_7196.java:188)
	at net.minecraft.class_7196.method_41891(class_7196.java:123)
	at net.minecraft.class_7196.method_41899(class_7196.java:202)
	at net.minecraft.class_7196.handler$bhh000$bclib$wt_callFixerOnLoad(class_7196.java:1546)
	at net.minecraft.class_7196.method_41894(class_7196.java)
	at net.minecraft.class_528$class_4272.method_20174(class_528.java:590)
	at net.minecraft.class_528$class_4272.method_20164(class_528.java:480)
	at net.minecraft.class_528$class_4272.method_25402(class_528.java:402)
	at net.minecraft.class_350.method_25402(class_350.java:327)
	at net.minecraft.class_4069.method_25402(class_4069.java:38)
	at net.minecraft.class_312.method_1611(class_312.java:98)
	at net.minecraft.class_437.method_25412(class_437.java:409)
	at net.minecraft.class_312.method_1601(class_312.java:98)
	at net.minecraft.class_312.method_22686(class_312.java:169)
	at net.minecraft.class_1255.execute(class_1255.java:102)
	at net.minecraft.class_312.method_22684(class_312.java:169)
	at org.lwjgl.glfw.GLFWMouseButtonCallback$Container.invoke(GLFWMouseButtonCallback.java:81)
	at dynamic_fps.impl.util.event.InputObserver.onPress(InputObserver.java:96)
	at org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:43)
	at org.lwjgl.system.JNI.invokeV(Native Method)
	at org.lwjgl.glfw.GLFW.glfwPollEvents(GLFW.java:3438)
	at com.mojang.blaze3d.systems.RenderSystem.pollEvents(RenderSystem.java:201)
	at com.mojang.blaze3d.systems.RenderSystem.flipFrame(RenderSystem.java:219)
	at net.minecraft.class_1041.method_15998(class_1041.java:288)
	at net.minecraft.class_310.method_1523(class_310.java:1241)
	at net.minecraft.class_310.method_1514(class_310.java:802)
	at net.minecraft.client.main.Main.main(Main.java:250)
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470)
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
	at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:87)
	at org.prismlauncher.EntryPoint.listen(EntryPoint.java:130)
	at org.prismlauncher.EntryPoint.main(EntryPoint.java:70)

Steps to reproduce

  1. Add script
  2. Open world so scripts are loaded
  3. Exception.

Script used

https://hst.sh/cigeciheqo.swift

The crafttweaker.log file

https://hst.sh/gukorubopo.md

Minecraft version

1.20.1

Modloader

Fabric

Modloader version

0.15.3

CraftTweaker version

14.0.30

Other relevant information

n/a

There are many other mods loaded, but I do not believe this is an issue with any of them.

The latest.log file

https://mclo.gs/5aKkVq8

commented

It appears that try catch statements are not fully functional right now, especially when put inside of a loop.
Removing the try catch should make your code start working

We are going to be tracking this issue here: ZenCodeLang/ZenCode#130

commented

It appears that try catch statements are not fully functional right now, especially when put inside of a loop.
Removing the try catch should make your code start working

We are going to be tracking this issue here: ZenCodeLang/ZenCode#130

Alright, will close in favour of that issue as it's an issue with ZenCode not CraftTweaker. (was too lazy to find the zencode repo earlier lol)

you can reopen if you feel it's appropriate.