- edited description
Too many string concatenations lead to IllegalArgumentException
Issue #43
duplicate
When a function contains more than 126 string concatenations, the following error will be thrown:
java.lang.IllegalArgumentException: Stack size exceeds maximum 256
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:125)
at net.mobtalker.mobtalkerscript.v3.MtsFunctionPrototype.<init>(MtsFunctionPrototype.java:62)
at net.mobtalker.mobtalkerscript.v3.compiler.FunctionState.createPrototype(FunctionState.java:511)
at net.mobtalker.mobtalkerscript.v3.compiler.MtsCompiler.compile(MtsCompiler.java:717)
at net.mobtalker.mobtalkerscript.v3.compiler.MtsCompiler.loadChunk(MtsCompiler.java:158)
at net.mobtalker.mobtalkerscript.v3.compiler.MtsCompiler.loadFile(MtsCompiler.java:115)
at net.mobtalker.mobtalkerscript.v3.compiler.MtsCompiler.loadFile(MtsCompiler.java:104)
at net.mobtalker.mobtalkerscript.standalone.MobTalkerScript.main(MobTalkerScript.java:66)
The number after “Stack size exceeds maximum” appears to depend on the actual number of string concatenations (and, likely, other parts of a script). The amount of string concatenations appears to be constant and independent of how nested the chunk is.
Originally reported here.
Comments (5)
-
reporter -
reporter - changed title to Too many string concatenations lead to IllegalArgumentException
- edited description
-
reporter - edited description
-
reporter - attached script
-
reporter - changed status to duplicate
Duplicate of
#36. - Log in to comment