CommandHelper

CommandHelper

46.5k Downloads

NegativeArraySizeException ba_get_string() on mostly invalid data.

LadyCailinBot opened this issue ยท 1 comments

commented

CMDHELPER-2886 - Reported by CyaNox

Though technically I'm providing it with incorrect data this should probably produce a better error.

root@qubetubers:/srv/mc/scripts/sk89q# java -jar CommandHelper.jar cmdline nbttest.ms 2>&1 |strings
Jan 16, 2014 12:33:23 AM com.laytonsmith.core.Script eval
SEVERE: Uh oh! You've found an error in MethodScript. This is an error caused by your code, so you may be able to find a workaround, but is ultimately an error in MethodScript itself. The line of code that caused the error was this:
@ba =
'3?:
9K=o
3y=1
*,UZ
<PKSk
jyjos
PSyP
*-U1
VKSq
n=MQ3
[OS{
*,UZ
)Z-M
*-U1
VKSq
)j6`
FSyPZ
6Z-M
RyPZ
Eu~@
s*n=
;ES{
n=MQ
9+m4
Bnp*
)j6`
*-U1
;EST
<(-m4UX
5Q0m4E
RyPZ
6Z-j
0m4Eu
6Z-j6`
E+m4
*,UZ
RyPZ
6Z-j
0m4Eu
*,UZ
~q*f
lZ-j6`
5+m4
*,UZ
<(-m4UX
5Q0m4E
RyPZ
6Z-j
RyPZ
6Z-j
<(-m4UX
5Q0m4E
<(-m4UX
5Q0m4u
pzim
KSoZ
t_c7
!A:A
ba_get_string(@ba)
on or around /srv/mc/scripts/sk89q/NBT.inc.ms:44.
Please report this error to the developers, and be sure to include the version numbers: Server version: SHELL; MethodScript version: 3.3.1-SNAPSHOT:2522-a8e1e6c,master. Here's the stacktrace:
java.lang.NegativeArraySizeException
        at com.laytonsmith.core.constructs.CByteArray.readUTF8String(CByteArray.java:406)
        at com.laytonsmith.core.functions.ByteArrays$ba_get_string.exec(ByteArrays.java:322)
        at com.laytonsmith.core.Script.eval(Script.java:308)
        at com.laytonsmith.core.Script.eval(Script.java:270)
        at com.laytonsmith.core.Script.seval(Script.java:208)
        at com.laytonsmith.core.functions.BasicLogic$_switch.execs(BasicLogic.java:277)
        at com.laytonsmith.core.Script.eval(Script.java:260)
        at com.laytonsmith.core.Procedure.execute(Procedure.java:194)
        at com.laytonsmith.core.Procedure.cexecute(Procedure.java:149)
        at com.laytonsmith.core.Script.eval(Script.java:237)
        at com.laytonsmith.core.Script.eval(Script.java:270)
        at com.laytonsmith.core.Procedure.execute(Procedure.java:191)
        at com.laytonsmith.core.Procedure.cexecute(Procedure.java:149)
        at com.laytonsmith.core.Script.eval(Script.java:237)
        at com.laytonsmith.core.Procedure.execute(Procedure.java:191)
        at com.laytonsmith.core.Procedure.cexecute(Procedure.java:149)
        at com.laytonsmith.core.Script.eval(Script.java:237)
        at com.laytonsmith.core.Script.eval(Script.java:270)
        at com.laytonsmith.core.Script.eval(Script.java:270)
        at com.laytonsmith.core.MethodScriptCompiler.execute(MethodScriptCompiler.java:1592)
        at com.laytonsmith.tools.Interpreter.execute(Interpreter.java:255)
        at com.laytonsmith.tools.Interpreter.startWithTTY(Interpreter.java:87)
        at com.laytonsmith.core.Main.main(Main.java:349)
commented

Comment by LadyCailin

Will be fixed in next build.