soolar / sl_ascend

An ascension script for kolmafia
11 stars 5 forks source link

Stack Overflow error in sl_util #304

Closed Phate4569 closed 5 years ago

Phate4569 commented 5 years ago

Again, latest script. SC/Opossum in TCRS

I am getting a Stack Overflow Error;

Post Adventure done, beep.
Turn(137): Starting with 9 left at Level: 8
Encounter: -20.0 Exp Bonus: 17.85
Meat Drop: 135.0 Item Drop: 210.81534080237807
HP: 271/346, MP: 76/219
Tummy: 0/15 Liver: 15/15 Spleen: 0/15
ML: 45 control: 9
Delay between adventures... beep boop... 
Countdown: 1 second...
Waiting completed.
Stack overflow during ASH script: (sl_util.ash, line 5939)

Here is the line in sl_util:

if(!file_to_map("sl_ascend_items.txt", itemdata))

Phate4569 commented 5 years ago

Another...

Turns played: 137 current adventures: 9 Current Ascension: Two Crazy Random Summer hpAutoRecovery => -1 hpAutoRecoveryTarget => -1 mpAutoRecovery => -1 mpAutoRecoveryTarget => -1 manaBurningTrigger => -1 manaBurningThreshold => -1 Unexpected error, debug log printed. Script execution aborted (java.lang.StackOverflowError): (sl_util.ash, line 5939)

Phate4569 commented 5 years ago

Commented out everything except the return line in the previously mentioned section. Now ANOTHER Stack Overflow error:

This is version: 0 Mafia: 19474
This is day 1.
Turns played: 137 current adventures: 9
Current Ascension: Two Crazy Random Summer
hpAutoRecovery => -1
hpAutoRecoveryTarget => -1
mpAutoRecovery => -1
mpAutoRecoveryTarget => -1
manaBurningTrigger => -1
manaBurningThreshold => -1
Stack overflow during ASH script: (sl_util.ash, line 5967)

I commented out this section too, now it seems to work fine.

jaspercb commented 5 years ago

The infinite recursion isn't coming from file_to_map, it's coming from the "how do we craft X?" logic recursing infinitely on (I'm going to assume) the new IOTM's firewood. See c1805f72d756765e3e22205ee6be6dcd4e1c20d9

If updating doesn't fix, try printf debugging what item it's recursing on.

Phate4569 commented 5 years ago

Interesting. Ok. Now that I know how to merge into my fork and run off that I can do that tomorrow.

Phate4569 commented 5 years ago

Closing. I haven't tried the knapsack since this since I prefer the EPIC "used beer" in path as Adv + PvP > Adv