Familiar Feeder

slyz

Developer
[size=+1]New version: Familiar Feeder 0.63 beta[/size]
Temporary fix for the new fullness.txt and inebriety.txt data files. I guess I'll tweak the code a bit to use proxy field and speed-up slightly when you have a GGG/Hobo.

I'm going to try adding gggFullness and hoboFullness tracking to Mafia, like we currently do with the Slimeling. I hope it will make people start checking out this script and maybe give some advice on how to make it more user-friendly.
 

roippi

Developer
The recent changes to charpane parsing seem to have done something to FF. Some percentage of the time after I hit "feed", it will load the charpane in the main window instead of refreshing the FF page. Oddly it doesn't happen 100% of the time, but it's probably more than 50%.

I haven't had time to debug further, sorry.
 

xKiv

Active member
I got that too. I have charpane relay script, maybe there's some problem with that too (like that was part of the problem with the batch_close() issue)?
Or maybe things that trigger charpane reload make it steal the focus (there would probably be some kind of race condition)?

(ETA: except I am noticing it with the daily deeds relay script, not the feeder which I only use rarely)
 

slyz

Developer
I'm seeing it too, I'll try to try to track this down.

In other news, v0.7 beta now uses knoll_available() instead of in_muscle_sign() to decide if meatcrafting takes a turn, and the script now uses proxy info instead of loading food/booze data files for data.
 

roippi

Developer
Weird.. I'm getting a stack overflow with the latest version. I don't think any recent changes to mafia are the cause, but I could be wrong. Brain is not fully functional today.

debug log attached if it helps.
 

Attachments

  • DEBUG_20110728.txt
    86.4 KB · Views: 27

Alhifar

Member
The overflow seems to be when it's trying to get the value of "autoSatisfyWithStash"; specifically while it's checking if the key is a global property. Is there something different with autoSatisfyWithStash compared to other properties somehow?
 

slyz

Developer
It looks like get_ingredients() is the culprit. Line 950 of ConcoctionDatabase.getAvailableIngredients()
is:
PHP:
Preferences.getBoolean( "autoSatisfyWithCloset" )
which is a strange place to generate a StackOverflowError.

Preferences.java hasn't changed since r8924!
 

roippi

Developer
Yeah. Like I said, weird. I haven't narrowed it down to anything yet, but I did manage to get a slightly different stack trace than the one before..

Code:
Unexpected error, debug log printed.
class java.lang.StackOverflowError: null
java.lang.StackOverflowError
	at net.sourceforge.kolmafia.persistence.ItemDatabase.getCanonicalName(ItemDatabase.java:1275)
	at net.sourceforge.kolmafia.persistence.ItemDatabase.getItemId(ItemDatabase.java:1230)
	at net.sourceforge.kolmafia.persistence.ItemDatabase.getItemId(ItemDatabase.java:1216)
	at net.sourceforge.kolmafia.persistence.ItemFinder.getFirstMatchingItem(ItemFinder.java:381)
	at net.sourceforge.kolmafia.persistence.ItemFinder.getFirstMatchingItem(ItemFinder.java:351)
	at net.sourceforge.kolmafia.textui.DataTypes.parseItemValue(DataTypes.java:288)
	at net.sourceforge.kolmafia.textui.RuntimeLibrary.get_ingredients(RuntimeLibrary.java:2891)
	at sun.reflect.GeneratedMethodAccessor38.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:126)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:166)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:104)
	at net.sourceforge.kolmafia.textui.parsetree.Operator.applyTo(Operator.java:392)
	at net.sourceforge.kolmafia.textui.parsetree.Expression.execute(Expression.java:221)
	at net.sourceforge.kolmafia.textui.parsetree.Conditional.execute(Conditional.java:78)
	at net.sourceforge.kolmafia.textui.parsetree.If.execute(If.java:67)
	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.Operator.applyTo(Operator.java:392)
	at net.sourceforge.kolmafia.textui.parsetree.Expression.execute(Expression.java:221)

...repeat ad infinitum

I wonder if it's choking on a specific item that's in my inventory? I did just break the prism so... hm. Changing all autoSatisfy options to false doesn't help.
 

Theraze

Active member
If it's checking ingredient items, you might want to throw in a check that there are multiple ingredients, sort of like:
Code:
&& count(get_ingredients(i)) > 1

Before I added this to EatDrink, it liked to get into infinite loops turning flat dough into wads of dough and back again...
 

slyz

Developer
I was looking for instances of get_ingredients() too see if one of them could cause an infinite loop: even though I added a "currently_considering" map to prevent infinite recursion, I found this comment I wrote before get_cost() (which doesn't use "currently_considering"):
PHP:
// the only circular concoctions are clovers, dough, and the charrrms.
// clovers have no autosell value, and shouldn't be fed, dough is an NPC item
// and charrrms can't be fed (Mafia doesn't have a power for them)

Charrrms now do have a power :)

Now, if I run the script with a charrrm bracelet and one of the charrrms in my inventory, I can reproduce this.
 
Last edited:

slyz

Developer
Familiar Feeder 0.9 beta

Remove the Clip Art items from the concoctions map. If you have the items, you can still feed them, or put them on the "to keep" list.
 

eggman

New member
Getting this error, running the latest daily build as of 4:00 pm EST

Function 'to_item( item )' undefined. This script may require a more recent version of KoLmafia and/or its supporting scripts. (relay_FamiliarFeeder.ash, line 396)
 

slyz

Developer
Apparently I had fixed this locally some time ago and never uploaded the fix. I wonder if I should be sad because no one noticed the problem for so long, or if I should be glad because someone did end up noticing it :)
 

roippi

Developer
I went through a bunch of scripts when that change happened to mafia and fixed it locally, too. I use the script, don't be sad :p
 
Top