MySQL abuse stacktrace
LadyCailinBot opened this issue ยท 3 comments
CMDHELPER-2947 - Reported by opoq
I haven't a clue what kind of context to provide for a MySQL bug.
```[13:23:36 INFO]: CH: Running original command from a MCCommandSender ----> /run query('INSERT INTO cornerstone
(`owner`) VALUES (`opoq`);')
[13:23:36 ERROR]: Uh oh! You've found an error in Core.
This is an error caused while running your code, so you may be able to find a workaround, but is ultimately an error in Core itself.
The line of code that caused the error was this:
eval()
on or around /home/opoq/mc/plugins/CommandHelper/aliases.msa:3.
Please report this error to the developers, and be sure to include the version numbers:
Server version: 1.7.9-R0.1-SNAPSHOT;
CommandHelper version: 3.3.1-SNAPSHOT:2693-88990a9,master;
Loaded extensions and versions:
Core (version 3.3.1);
Here's the stacktrace:
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.rangeCheck(ArrayList.java:635)
at java.util.ArrayList.get(ArrayList.java:411)
at com.laytonsmith.core.functions.SQL$query.optimizeDynamic(SQL.java:215)
at com.laytonsmith.core.MethodScriptCompiler.optimize(MethodScriptCompiler.java:1707)
at com.laytonsmith.core.MethodScriptCompiler.optimize(MethodScriptCompiler.java:1625)
at com.laytonsmith.core.MethodScriptCompiler.compile(MethodScriptCompiler.java:1368)
at com.laytonsmith.core.functions.DataHandling$eval.execs(DataHandling.java:3494)
at com.laytonsmith.core.Script.eval(Script.java:311)
at com.laytonsmith.core.MethodScriptCompiler.execute(MethodScriptCompiler.java:1842)
at com.laytonsmith.core.MethodScriptCompiler.execute(MethodScriptCompiler.java:1802)
at com.laytonsmith.core.Script.run(Script.java:193)
at com.laytonsmith.core.AliasCore.alias(AliasCore.java:167)
at com.laytonsmith.commandhelper.CommandHelperServerListener.onServerCommand(CommandHelperServerListener.java:41)
at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:292)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
at org.bukkit.plugin.TimedRegisteredListener.callEvent(TimedRegisteredListener.java:30)
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487)
at net.minecraft.server.v1_7_R3.DedicatedServer.aB(DedicatedServer.java:315)
at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:284)
at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:576)
at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:482)
at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628)
Comment by opoq
And this occurs when I try to compile an alias containing the above code, instead of using /run $ = eval($):
[13:31:41 INFO]: [CommandHelper]: MethodScript files processed
[13:31:41 WARN]: java.lang.RuntimeException: While processing a script, (/home/opoq/mc/plugins/CommandHelper/aliases.msa) an unexpected exception occurred. (No further information is available, unfortunately.)
[13:31:41 WARN]: at com.laytonsmith.core.AliasCore$LocalPackage.compileMSA(AliasCore.java:660)
[13:31:41 WARN]: at com.laytonsmith.core.AliasCore.reload(AliasCore.java:475)
[13:31:41 WARN]: at com.laytonsmith.commandhelper.CommandHelperPlugin.onCommand(CommandHelperPlugin.java:439)
[13:31:41 WARN]: at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
[13:31:41 WARN]: at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:180)
[13:31:41 WARN]: at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchCommand(CraftServer.java:722)
[13:31:41 WARN]: at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchServerCommand(CraftServer.java:709)
[13:31:41 WARN]: at net.minecraft.server.v1_7_R3.DedicatedServer.aB(DedicatedServer.java:319)
[13:31:41 WARN]: at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:284)
[13:31:41 WARN]: at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:576)
[13:31:41 WARN]: at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:482)
[13:31:41 WARN]: at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628)
[13:31:41 WARN]: Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
[13:31:41 WARN]: at java.util.ArrayList.rangeCheck(ArrayList.java:635)
[13:31:41 WARN]: at java.util.ArrayList.get(ArrayList.java:411)
[13:31:41 WARN]: at com.laytonsmith.core.functions.SQL$query.optimizeDynamic(SQL.java:215)
[13:31:41 WARN]: at com.laytonsmith.core.MethodScriptCompiler.optimize(MethodScriptCompiler.java:1707)
[13:31:41 WARN]: at com.laytonsmith.core.MethodScriptCompiler.optimize(MethodScriptCompiler.java:1625)
[13:31:41 WARN]: at com.laytonsmith.core.MethodScriptCompiler.compile(MethodScriptCompiler.java:1368)
[13:31:41 WARN]: at com.laytonsmith.core.Script.compileRight(Script.java:807)
[13:31:41 WARN]: at com.laytonsmith.core.Script.compile(Script.java:581)
[13:31:41 WARN]: at com.laytonsmith.core.AliasCore$LocalPackage.compileMSA(AliasCore.java:653)
[13:31:41 WARN]: ... 11 more
Comment by opoq
Turns out this is just what happens when you skip the 'profile' arg. :P