Bale
Minion
Using r8833. I'm trying to run my OCD relay script. This only happens with one character. Others seem able to run the relay script without trouble. ???
	
	
	
		
All I can tell is that I've narrowed down the problem with debug statements to this:
	
	
	
		
	
	
	
		
I cannot figure out why it would die there, nor why it will only die for one character! So I make some more mods to is_craftable() and get an even more bizarre output
	
	
	
		
Output:
	
	
	
		
As odd as it is to get items 4896 and 4872, the oddest thing is that when I run this script on other characters, those items do not appear. How the heck is file_to_map("concoctions.txt", crafty) producing a different map for different characters??
Even more horrifying, 4896 and 4872 are not items!! I cannot remove them from the map when I try.
I'm pretty sure that the error happens because crafty[4896] does not have a value, but how did it get in the map?
				
			
		Code:
	
	=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
         KoLmafia v14.3 r8833, Windows XP, Java 1.6.0_22
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Please note: do not post this log in the KoLmafia thread. If you
 would like the 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 the log as an attachment.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Timestamp: Sat Dec 18 01:25:54 EST 2010
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Unexpected error, debug log printed.
class java.lang.NullPointerException: null
java.lang.NullPointerException
	at net.sourceforge.kolmafia.textui.parsetree.Variable.setValue(Variable.java:122)
	at net.sourceforge.kolmafia.textui.parsetree.VariableReference.setValue(VariableReference.java:108)
	at net.sourceforge.kolmafia.textui.parsetree.VariableReference.setValue(VariableReference.java:97)
	at net.sourceforge.kolmafia.textui.parsetree.ForEachLoop.executeSlice(ForEachLoop.java:163)
	at net.sourceforge.kolmafia.textui.parsetree.ForEachLoop.execute(ForEachLoop.java:109)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:451)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:129)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:166)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:451)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:129)
	at net.sourceforge.kolmafia.textui.Interpreter.executeScope(Interpreter.java:265)
	at net.sourceforge.kolmafia.textui.Interpreter.execute(Interpreter.java:198)
	at net.sourceforge.kolmafia.textui.Interpreter.execute(Interpreter.java:191)
	at net.sourceforge.kolmafia.KoLmafiaASH.getClientHTML(KoLmafiaASH.java:110)
	at net.sourceforge.kolmafia.KoLmafiaASH.getClientHTML(KoLmafiaASH.java:92)
	at net.sourceforge.kolmafia.request.RelayRequest.handleSimple(RelayRequest.java:1476)
	at net.sourceforge.kolmafia.request.RelayRequest.run(RelayRequest.java:1504)
	at net.sourceforge.kolmafia.LocalRelayAgent.readServerResponse(LocalRelayAgent.java:420)
	at net.sourceforge.kolmafia.LocalRelayAgent.performRelay(LocalRelayAgent.java:132)
	at net.sourceforge.kolmafia.LocalRelayAgent.run(LocalRelayAgent.java:109)
	All I can tell is that I've narrowed down the problem with debug statements to this:
		Code:
	
	is_craftable: Start
Unexpected error, debug log printed.
	
		PHP:
	
	record concoctions {
	string method;
	string mix1;
	string mix2;
};
concoctions [item] crafty;
file_to_map("concoctions.txt", crafty);
boolean [item] is_craftable;
boolean [item] is_untinkerable;
void is_craftable() {
print("is_craftable: Start");
	foreach key, value in crafty {
print("is_craftable:"+key);
		is_craftable[item_name(value.mix1)] = true;
		is_craftable[item_name(value.mix2)] = true;
		if(value.method == "COMBINE" && key != $item[bitchin meatcar])
			is_untinkerable[key] = true;
	}
print("is_craftable: End");
}
	I cannot figure out why it would die there, nor why it will only die for one character! So I make some more mods to is_craftable() and get an even more bizarre output
		PHP:
	
	void is_craftable() {
print("is_craftable: Start");
int i = 0;
foreach key in crafty {
	print(key); 
	i +=1;
	if( i> 4) break;
}
print("is_craftable: Intermission");
	foreach key in crafty {
		is_craftable[item_name(crafty[key].mix1)] = true;
		is_craftable[item_name(crafty[key].mix2)] = true;
		if(crafty[key].method == "COMBINE" && key != $item[bitchin meatcar])
			is_untinkerable[key] = true;
	}
print("is_craftable: End");
}
	Output:
		Code:
	
	is_craftable: Start
4896
4872
17-alarm Saucepan
3vi1 pr0n m4nic0tti
4-d camera
is_craftable: Intermission
[COLOR="#ff0000"]Map modified within foreach (relay_OCD_dB_Manager.ash, line 296)[/COLOR]
	As odd as it is to get items 4896 and 4872, the oddest thing is that when I run this script on other characters, those items do not appear. How the heck is file_to_map("concoctions.txt", crafty) producing a different map for different characters??
Even more horrifying, 4896 and 4872 are not items!! I cannot remove them from the map when I try.
I'm pretty sure that the error happens because crafty[4896] does not have a value, but how did it get in the map?