OCD Inventory control

I'm just going to stop talking about why rebooting helps for now. I see benefits. Both in helpdesk and my personal coding, it's the first step in any troubleshooting I personally take and suggest. The developers of mafia disagree that it should be a part of troubleshooting. That means that I should stop suggesting it to users of mafia. I will attempt to do so and no longer suggest restarting to others as a standard part of troubleshooting problems.

Much like with the last time I was aggravating Veracity, it doesn't benefit to continue trying to show why I believe there's a reason for it when the developers disagree, which was when I stopped talking there. This post serves as notice so that developers hopefully don't need to ask me to post more examples which will only aggravate and frustrate. I hope this is less annoying.

I agree that restarting can help with memory issues. Mentioning memory issues was pointless in this thread though. If mafia is wrong about the state of something (which has zero to do with memory usage), then figuring out what mafia is wrong about and making a bug report would be the thing to do, with restarting mafia available as a band-aid fix in the mean time.
 
Mafia is currently using 1032.4MB of memory while idling and doing nothing

I suggest you actually learn about how java manages memory before accusing mafia of doing it wrong.
If you let java run withou any options on a machine with a lot of memory, it will allocate a lot of memory. And it won't run GC [1] until it gets close to exhausting currently available memory. And it likely won't release any memory to the system anyway.

I find that running mafia with -Xmx256m is more than enough.

[1] except on young generation, which is a separate (and much smaller, unless you screw it up with JVM parameters) part of the heap
 
I refreshed, completely shut down Mafia and then after a few hours, logged back in. It was still doing it. I had to remove everything from my closet first then re-run it for the script to work.
 
Hi Bale, been loving your awesome script for a while now, however there's always been one issue that I've been too lazy to report, until now. It refuses to autosell some of the Klaw machine items. It always outputs that it's going to autosell them and then never does. Anyway there's good news and bad news.

The good news is that I'm finally posting here about that issue, hooray!

The bad news is that I'm motivated to do so because today I got an error message when running the script:

Code:
> call scripts\OCD Inventory Control.ash

autosell 3 Angry Farmer candy, 1 blue plasma ball, 1 cheap studded belt, 1 club necklace, 1 Crimbo Candy Cookbook, 112 Daffy Taffy, 1 flavored foot massage oil, 1 marzipan skull, 114 Mr. Mediocrebar, 1 rubber WWtNSD? bracelet, 1 stick-on eyebrow piercing

autosell 1 stuffed baby gravy fairy, 2 stuffed cocoabo, 2 stuffed hand turkey, 2 stuffed MagiMechTech MicroMechaMech, 2 stuffed mind flayer, 1 stuffed sleazy gravy fairy, 1 stuffed stinky gravy fairy, 3 toast

Total autosale = 10,198
Unexpected error, debug log printed.
Script execution aborted (java.lang.NullPointerException): (OCD Inventory Control.ash, line 782)

Code:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
         KoLmafia v16.1 r13273, Windows 7, Java 1.7.0_25
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Please note: do not post this log in the KoLmafia thread of KoL's
 Gameplay-Discussion forum. If you would like the KoLmafia dev team
 to look at it, please write a bug report at kolmafia.us. Include
 specific information about what you were doing when you made this
 and include this log as an attachment.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Timestamp: Tue Nov 26 21:02:34 GMT 2013
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Unexpected error, debug log printed.
class java.lang.NullPointerException: null
java.lang.NullPointerException
	at net.sourceforge.kolmafia.textui.RuntimeLibrary.batch_close(RuntimeLibrary.java:1721)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.sourceforge.kolmafia.textui.parsetree.LibraryFunction.execute(LibraryFunction.java:106)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:154)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:435)
	at net.sourceforge.kolmafia.textui.parsetree.Conditional.execute(Conditional.java:96)
	at net.sourceforge.kolmafia.textui.parsetree.If.execute(If.java:68)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:435)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:153)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:154)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:435)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:153)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:154)
	at net.sourceforge.kolmafia.textui.parsetree.Assignment.execute(Assignment.java:103)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:435)
	at net.sourceforge.kolmafia.textui.parsetree.Try.execute(Try.java:72)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:435)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:153)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:154)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionReturn.execute(FunctionReturn.java:100)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:435)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:153)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:154)
	at net.sourceforge.kolmafia.textui.parsetree.Assignment.execute(Assignment.java:103)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:435)
	at net.sourceforge.kolmafia.textui.parsetree.Conditional.execute(Conditional.java:96)
	at net.sourceforge.kolmafia.textui.parsetree.If.execute(If.java:68)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:435)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:153)
	at net.sourceforge.kolmafia.textui.Interpreter.executeScope(Interpreter.java:396)
	at net.sourceforge.kolmafia.textui.Interpreter.execute(Interpreter.java:320)
	at net.sourceforge.kolmafia.textui.Interpreter.execute(Interpreter.java:313)
	at net.sourceforge.kolmafia.textui.command.CallScriptCommand.call(CallScriptCommand.java:256)
	at net.sourceforge.kolmafia.textui.command.CallScriptCommand.run(CallScriptCommand.java:75)
	at net.sourceforge.kolmafia.KoLmafiaCLI.doExecuteCommand(KoLmafiaCLI.java:595)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeCommand(KoLmafiaCLI.java:548)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeLine(KoLmafiaCLI.java:449)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeLine(KoLmafiaCLI.java:317)
	at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.handleQueue(CommandDisplayFrame.java:190)
	at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.run(CommandDisplayFrame.java:164)

(It didn't carry out any autoselling, rerunning the script kept producing the same error)

I'm going to guess that the error message might be an issue with the latest mafia build but I'm posting here because a) there's another bug with autoselling klaw items anyway and b) might as well double-check if it's a script fault first.
 
Last edited:
Ok, I'm getting an error. Not sure what the hell I did but it was working earlier today and now this :(

autoSatisfyWithCloset => true
Unexpected error, debug log printed.
Script execution aborted (java.lang.NullPointerException): (OCD Inventory Control.ash, line 782)
 
I didn't think the script was at fault and it just happened for the first time so I just assumed it was new. I've been on and off all day working and didn't have time to read the last few pages, I was just tossing this up so it would be known. I still don't have time to check though so hopefully I can fix it later on tonight :)
 
didn't have time to read the last few pages

"the last few pages" is actually the two posts immediately before your own. You were the second person to report it. This is probably related to the recent batch processing improvements that Veracity very recently made to KoLmafia. I'm sure that once she is less busy she'll read the forum (and this thread) and let us know if there is some relationship between her recent revisions and this new bug.

PS. I understand about being too busy to read the last two posts. I just want you to know that lost was frustrated because you interrupted the topic in progress to complain about the same topic that was already being discussed.
 
Last edited:
I usually try to go back 2-3 pages when I have an issue, that's the only reason I didn't even look. I'm done for today though, not feeling very good (paint fumes) so I'll catch up on it now and get it fixed :)

EDIT: I just figured out where my quick search went wrong! I searched for "782" and nothing showed up. The part where he posted it is in the scroll area and couldn't be searched for :) I see it now, sorry guys :( also sorry Lost, I'll wait until I can check on an issue I'm having before posting it up from now on :)
 
Last edited:
I didn't try to search the forum, when I start typing on my laptop and I'm not in a field then it highlights what matches. That's all I tried at first. It was just a quick look and when nothing showed up I posted. I'm going to shut up now so we can get back on track :)
 
Hey Bale, just wanted to let you know that I love this script and really appreciate the effort you put into it. Thanks a lot for letting us all enjoy it :).
 
It has been reported that sometimes OCDRelay will display an item called None with a missing image. I have seen this a couple times and finally think I am on the road to having a repeatable bug report, although I don't have it yet. I had boiling seal blood in the inventory, it is not in any of my OCD files and I got an uncharacterized None. I think Kolmafia did not think I had it in my inventory. I refreshed the inventory and it appeared and reran OCDRelay and it was there. So it may have something to do with the item or it may have to do with a case where KoLmafia's idea of inventory is out of synch. I'll continue digging, especially if it is the latter and I can reproduce it reliably.
 
That happened to me only when in PvP an opponent had a fight message that says "You acquire an" item that does not exist. That caused KoLmafia to believe in an item it could not parse.

I believe there is already a bug report on that, but I could not find it...
 
When I tried to reproduce last night, it didn't.

Today I took notes.

I finished adventuring and ran my script that moved stuff to the DC. ODCRelay did not have a None item. Moved some stuff from DC to closet to bag. No none, but noticed boiling seal blood was not there. Moved remaining material from closet to bag. Got relay none, alphabetically after big boom. Moved everything to DC. Ran and got None again. Refreshed inventory. None disappeared and cold seal sweat needed to be characterized.

My move to DC script should have moved the sweat to the DC and there were no indications that it failed to do so, until I did a refresh inventory and it (re)appeared. Hypothesis is OCD behaves nicely when inventory is in synch and that something in moving from DC to bag to inventory is getting things out of synch. That something could be KoLmafia or it could be my scripts that do the moving. Will continue to investigate but start a new thread for results unless the needle turns back towards OCD.
 
Back
Top