Closed LadyCailinBot closed 4 years ago
Comment by LadyCailin
I've added a new stack trace in a better location to help me identify where the problem actually is. Try the new builds, and post the new stacktrace, please. Thanks!
Comment by CyaNox
Looks pretty much the same (Haven't tried a smaller test case to narrow it down).
[14:46:58 ERROR]: Uh oh! You've found an error in CommandHelper. This is an error caused by your code, so you may be able to find a workaround, but is ultimately an error in CommandHelper itself. The line of code that caused the error was this:
@en_r = null
assign(@en_r, java-null)
on or around /srv/mc/live/survival/plugins/CommandHelper/LocalPackages/shared/MobSpawning/MobSpawning.msa:120.
Please report this error to the developers, and be sure to include the version numbers: Server version: 1.7.2-R0.3-SNAPSHOT; CommandHelper version: 3.3.1-SNAPSHOT:2509-ef31d72,master. Here's the stacktrace:
java.lang.NullPointerException
at com.laytonsmith.core.constructs.IVariable.<init>(IVariable.java:22)
at com.laytonsmith.core.functions.DataHandling$assign.exec(DataHandling.java:182)
at com.laytonsmith.core.Script.eval(Script.java:308)
at com.laytonsmith.core.Script.eval(Script.java:270)
at com.laytonsmith.core.functions.BasicLogic$ifelse.execs(BasicLogic.java:407)
at com.laytonsmith.core.Script.eval(Script.java:260)
at com.laytonsmith.core.Script.eval(Script.java:270)
at com.laytonsmith.core.functions.BasicLogic$ifelse.execs(BasicLogic.java:407)
at com.laytonsmith.core.Script.eval(Script.java:260)
at com.laytonsmith.core.Script.eval(Script.java:270)
at com.laytonsmith.core.MethodScriptCompiler.execute(MethodScriptCompiler.java:1580)
at com.laytonsmith.core.MethodScriptCompiler.execute(MethodScriptCompiler.java:1540)
at com.laytonsmith.core.constructs.CClosure.execute(CClosure.java:144)
at com.laytonsmith.core.functions.ExecutionQueue$queue_push$1$1.run(ExecutionQueue.java:72)
at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftTask.run(CraftTask.java:58)
at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345)
at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:583)
at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:273)
at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:540)
at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:446)
at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617)
[14:46:58 WARN]: [CommandHelper] Task #243 for CommandHelper v3.3.1-SNAPSHOT:2509-ef31d72,master generated an exception
com.laytonsmith.core.exceptions.CancelCommandException
at com.laytonsmith.core.Script.eval(Script.java:372) ~[?:?]
at com.laytonsmith.core.Script.eval(Script.java:270) ~[?:?]
at com.laytonsmith.core.functions.BasicLogic$ifelse.execs(BasicLogic.java:407) ~[?:?]
at com.laytonsmith.core.Script.eval(Script.java:260) ~[?:?]
at com.laytonsmith.core.Script.eval(Script.java:270) ~[?:?]
at com.laytonsmith.core.functions.BasicLogic$ifelse.execs(BasicLogic.java:407) ~[?:?]
at com.laytonsmith.core.Script.eval(Script.java:260) ~[?:?]
at com.laytonsmith.core.Script.eval(Script.java:270) ~[?:?]
at com.laytonsmith.core.MethodScriptCompiler.execute(MethodScriptCompiler.java:1580) ~[?:?]
at com.laytonsmith.core.MethodScriptCompiler.execute(MethodScriptCompiler.java:1540) ~[?:?]
at com.laytonsmith.core.constructs.CClosure.execute(CClosure.java:144) ~[?:?]
at com.laytonsmith.core.functions.ExecutionQueue$queue_push$1$1.run(ExecutionQueue.java:72) ~[?:?]
at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftTask.run(CraftTask.java:58) ~[Spigot.jar:git-Spigot-1235]
at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345) [Spigot.jar:git-Spigot-1235]
at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:583) [Spigot.jar:git-Spigot-1235]
at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:273) [Spigot.jar:git-Spigot-1235]
at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:540) [Spigot.jar:git-Spigot-1235]
at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:446) [Spigot.jar:git-Spigot-1235]
at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [Spigot.jar:git-Spigot-1235]
Comment by CyaNox
Managed to make the test case a whole lot smaller and it seems to be specific to get_entity_rider(). Might still test with the other methods but the code below does reproduce the crash.
/entitystats4 = >>>
@e = all_entities()
console('All entities: ' . array_size(@e))
queue_clear('entitystats')
@living = array('ZOMBIE', 'VILLAGER')
foreach(@e, @en){
queue_push(closure(
console('Checking: ' . @en)
try(
@en_r = get_entity_rider(@en) # Line 314
,)
), 'entitystats')
queue_delay(5, 'entitystats')
}
queue_push(closure(
console('Entity stats collected.')
), 'entitystats')
console('Queues initiated.')
<<<
>entitystats4
[15:04:10 INFO]: CommandHelper: All entities: 1118
[15:04:10 INFO]: CommandHelper: Queues initiated.
[15:04:10 INFO]: CommandHelper: Checking: 2
[15:04:10 ERROR]: Uh oh! You've found an error in CommandHelper. This is an error caused by your code, so you may be able to find a workaround, but is ultimately an error in CommandHelper itself. The line of code that caused the error was this:
@en_r = ''
assign(@en_r, java-null)
on or around /srv/mc/live/survival/plugins/CommandHelper/LocalPackages/shared/MobSpawning/MobSpawning.msa:314.
Please report this error to the developers, and be sure to include the version numbers: Server version: 1.7.2-R0.3-SNAPSHOT; CommandHelper version: 3.3.1-SNAPSHOT:2509-ef31d72,master. Here's the stacktrace:
java.lang.NullPointerException
at com.laytonsmith.core.constructs.IVariable.<init>(IVariable.java:22)
at com.laytonsmith.core.functions.DataHandling$assign.exec(DataHandling.java:182)
at com.laytonsmith.core.Script.eval(Script.java:308)
at com.laytonsmith.core.functions.Exceptions$_try.execs(Exceptions.java:385)
at com.laytonsmith.core.Script.eval(Script.java:260)
at com.laytonsmith.core.Script.eval(Script.java:270)
at com.laytonsmith.core.MethodScriptCompiler.execute(MethodScriptCompiler.java:1580)
at com.laytonsmith.core.MethodScriptCompiler.execute(MethodScriptCompiler.java:1540)
at com.laytonsmith.core.constructs.CClosure.execute(CClosure.java:144)
at com.laytonsmith.core.functions.ExecutionQueue$queue_push$1$1.run(ExecutionQueue.java:72)
at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftTask.run(CraftTask.java:58)
at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345)
at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:583)
at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:273)
at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:540)
at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:446)
at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617)
[15:04:10 WARN]: [CommandHelper] Task #33025 for CommandHelper v3.3.1-SNAPSHOT:2509-ef31d72,master generated an exception
com.laytonsmith.core.exceptions.CancelCommandException
at com.laytonsmith.core.Script.eval(Script.java:372) ~[?:?]
at com.laytonsmith.core.functions.Exceptions$_try.execs(Exceptions.java:385) ~[?:?]
at com.laytonsmith.core.Script.eval(Script.java:260) ~[?:?]
at com.laytonsmith.core.Script.eval(Script.java:270) ~[?:?]
at com.laytonsmith.core.MethodScriptCompiler.execute(MethodScriptCompiler.java:1580) ~[?:?]
at com.laytonsmith.core.MethodScriptCompiler.execute(MethodScriptCompiler.java:1540) ~[?:?]
at com.laytonsmith.core.constructs.CClosure.execute(CClosure.java:144) ~[?:?]
at com.laytonsmith.core.functions.ExecutionQueue$queue_push$1$1.run(ExecutionQueue.java:72) ~[?:?]
at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftTask.run(CraftTask.java:58) ~[Spigot.jar:git-Spigot-1235]
at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345) [Spigot.jar:git-Spigot-1235]
at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:583) [Spigot.jar:git-Spigot-1235]
at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:273) [Spigot.jar:git-Spigot-1235]
at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:540) [Spigot.jar:git-Spigot-1235]
at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:446) [Spigot.jar:git-Spigot-1235]
at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [Spigot.jar:git-Spigot-1235]
Comment by LadyCailin
This should be fixed in the latest build.
CMDHELPER-2875 - Reported by CyaNox
Heavy CH crash when trying to do a little bit of statistics collecting on entities using execution queues.
This happens in the following code:
I've not had the ability yet to figure out a smaller code example that produces the same results (Also due to the crash I have not fully tested the rest of the code but it should be mostly valid).