xKiv
Active member
for some reason, I recently (this week) started getting a NullPointerException in batch_close (namely, of batches in which something is autosold):
that's weird, since the code basically does (slightly paraphrased)
That *looks* (without debugging - I should have really done *thar*) like something is setting LibraryFunction.interpreter = null, and the only place I can find anything like that is at the end of LibraryFunction.execute().
note: the autosell actually goes through
Code:
...
class java.lang.NullPointerException: null
java.lang.NullPointerException
at net.sourceforge.kolmafia.textui.RuntimeLibrary.batch_close(RuntimeLibrary.java:1469)
at sun.reflect.GeneratedMethodAccessor119.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at net.sourceforge.kolmafia.textui.parsetree.LibraryFunction.execute(LibraryFunction.java:126)
at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:166)
at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:451)
...
that's weird, since the code basically does (slightly paraphrased)
Code:
if ((batched = LibraryFunction.interpreter.batched) != null) {
for each entry in batched: KoLmafiaCLI.DEFAULT_SHELL.executeCommand(entry.command, entry.parameters);
LibraryFunction.interpreter.batched = null; // this is the NPE line
}
That *looks* (without debugging - I should have really done *thar*) like something is setting LibraryFunction.interpreter = null, and the only place I can find anything like that is at the end of LibraryFunction.execute().
note: the autosell actually goes through