Bug - Fixed Stuck in combat and in a choice adventure at the same time

Magus_Prime

Well-known member
It's just a guess but this may have something to do with the recent refactoring and the race conditions that have come to light.

Code:
[771] The Hidden Office Building
Encounter: pygmy witch accountant
Round 0: Arbos loses initiative!
Round 1: pygmy witch accountant takes 8 damage.
You lose 12 hit points
WHAM: Running SmartStasis
Round 1: Arbos executes a macro!
Round 1: Arbos uses the rock band flyers!
Round 2: pygmy witch accountant takes 13 damage.
You lose 28 hit points
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 3-shot with Cadenza, attack with your weapon and Saucestorm.
Round 2: Arbos executes a macro!
Round 2: Arbos casts CADENZA!
Round 3: pygmy witch accountant takes 22 damage.
You gain 4 hit points
You gain 5 Mojo Points
Round 3: Arbos attacks!
Round 4: pygmy witch accountant takes 102 damage.
Round 4: pygmy witch accountant takes 11 damage.
You lose 13 hit points
Round 4: Arbos casts SAUCESTORM!
Round 5: pygmy witch accountant takes 76 damage.
Round 5: pygmy witch accountant takes 76 damage.
You acquire an item: white chocolate chips
You gain 495 Meat
You acquire an item: short calculator
You acquire an item: McClusky file (page 5)
Verifying ingredients for McClusky file (complete) (1)...
Creating McClusky file (complete) (1)...
You are currently in a fight.

[772] The Hidden Office Building
Encounter: Working Holiday
Encounter: Working Holiday
Encounter: Working Holiday

I'm going through the level 12 quest in the relay browser and, according to the gCLI I auto-created the McClusky file at the end of the last combat. As it happens the very next encounter was the non-combat to take me to the boss.

KoLMafia "thinks" I'm in a fight and I'm unable to select the choice adventure in the browser. No debug log was generated.

I'm going to shut down KoLMafia and hope I can resume things.
 
And the answer was no. I couldn't even check inventory without completing the choice adventure. Post-combat it seems that the auto-create of the McClusky file didn't complete. I have all the components but no file. Oh well.
 
I'm going through the level 12 quest in the relay browser and, according to the gCLI I auto-created the McClusky file at the end of the last combat.
Not according to the log you've posted. According to that you had started to create it but it hadn't yet been created, then you started the next encounter in the relay browser.
 
This seems like exactly the same problem I had earlier with r14772.

While auto-adventuring in the Hidden Office mafia acquired the binder from the first non-combat and the moment it got the 5th page started to create the complete McClusky file, but proceeded to the next combat before creating it. When several turns later automation finished without reaching its goal, I checked the CLI and there was the same series of events.

Code:
Verifying ingredients for McClusky file (complete) (1)...
Creating McClusky file (complete) (1)...
You are currently in a fight.
I assumed I had lagged out and the creation failed for some reason, so I did not copy the CLI at the time, but here's the session log if it helps:
Code:
[317] The Hidden Office Building
Encounter: Working Holiday
Took choice 786/2: Get boring binder clip
choice.php?whichchoice=786&option=2&pwd
You acquire an item: boring binder clip

[318] The Hidden Office Building
Encounter: pygmy witch accountant
Round 0: Hadean loses initiative!
You lose 71 hit points
Round 1: Hadean executes a macro!
Round 1: Hadean casts CURSE OF WEAKSAUCE!
You gain 13 Mana Points
You gain 15 Mana Points
You lose 70 hit points
Round 2: Hadean casts SAUCEGEYSER!
You gain 13 Mana Points
You gain 50 Mana Points
You gain 8 Mana Points
You acquire an item: bone abacus
You acquire an item: McClusky file (page 4)
You recover 7 drops of Rain

[319] The Hidden Office Building
Encounter: pygmy witch accountant
Round 0: Hadean loses initiative!
You lose 74 hit points
Round 1: Hadean executes a macro!
Round 1: Hadean casts CURSE OF WEAKSAUCE!
You gain 15 Mana Points
You gain 18 Mana Points
You lose 68 hit points
Round 2: Hadean casts SAUCEGEYSER!
You gain 10 Mana Points
You gain 50 Mana Points
You gain 8 Mana Points
You acquire an item: bone abacus
You acquire an item: McClusky file (page 5)

cast 1 Cannelloni Cocoon
You gain 125 hit points

[320] The Hidden Office Building
Encounter: pygmy witch accountant
Round 0: Hadean loses initiative!
You lose 71 hit points
Round 1: Hadean executes a macro!
Round 1: Hadean casts CURSE OF WEAKSAUCE!
You gain 12 Mana Points
You gain 16 Mana Points
You lose 67 hit points
Round 2: Hadean casts SAUCEGEYSER!
You gain 14 Mana Points
You gain 50 Mana Points
You gain 7 Mana Points
You acquire an item: adder
You acquire an item: dollop of barbecue sauce
You recover 11 bolts of lightning

cast 1 Cannelloni Cocoon
You gain 121 hit points

[321] The Hidden Office Building
Encounter: pygmy witch accountant
Round 0: Hadean loses initiative!
You lose 72 hit points
Round 1: Hadean executes a macro!
Round 1: Hadean casts CURSE OF WEAKSAUCE!
You gain 14 Mana Points
You gain 15 Mana Points
You lose 68 hit points
Round 2: Hadean casts SAUCEGEYSER!
You gain 11 Mana Points
You gain 50 Mana Points
You gain 9 Mana Points
You acquire an item: bone abacus

cast 1 Cannelloni Cocoon
You gain 118 hit points

[322] The Hidden Office Building
Encounter: Working Holiday
Took choice 786/1: Need McClusky File (complete) to fight ancient protector spirit
choice.php?pwd&whichchoice=786&option=1
Encounter: Working Holiday
Took choice 786/6: skip adventure
choice.php?pwd&whichchoice=786&option=6
 
So I just adventured too quickly? Okay.

Yes. Presumably we should protect you from that, but... I'd need to think about how we can do that. Hm.

I'm not sure this is a regression from the continuationState changes; I feel like previous behavior was just to forceContinue our way through the autoCrafting and arrive at the same place. I could be wrong though.

Or, well, the regression is that you are now "stuck" whereas previously you wouldn't have been stuck, autoCreation just would have failed.

This seems like exactly the same problem I had earlier with r14772.

While auto-adventuring

Auto-adventuring is not the same thing as relay adventuring - and was not touched at all by the recent continuationState changes. From the log you posted I see nothing that autoCreation was even attempted.
 
Last edited:
What happened to Magus happened to me as well, except I was not touching the relay browser at all. It was entirely mafia automation, so not sure how "adventured too quickly" is related.
 
Could the broken parsing of fights be related to this problem?

I'll try to remember and automate the Office Building with 14722 tomorrow to get a debug log, but I am 100% certain that the CLI printed the attempt to create a file, while the log shows sign of that at all.
 
while the log shows sign of that at all.

I presume "log shows NO sign of that at all" was intended?

FWIW not everything in the gCLI ends up in the log. I forget whether there is some equivalent of a pipe command that you need to capture everything or what. I do recall that suggestion to write everything into both places was not well received because the gCLI will render some HTML but the log does not and HTML in the logs had a negative impact on their usability for folks who parsed the logs.
 
After thinking about this a bit more...should control have been returned to the relay browser before the auto-creation of the McClusky file finished?
 
Obviously intended to type "no sign af that". :)

I have no idea what has to be in the log, roippi mentioned that autoCreation wasn't there, while it was attempted according to the gCLI. The log has my manual creation of the file after mafia aborted because it was missing.
Code:
[322] The Hidden Office Building
Encounter: Working Holiday
Took choice 786/1: Need McClusky File (complete) to fight ancient protector spirit
choice.php?pwd&whichchoice=786&option=1
Encounter: Working Holiday
Took choice 786/6: skip adventure
choice.php?pwd&whichchoice=786&option=6

Use 1 boring binder clip + 1 McClusky file (page 1) + 1 McClusky file (page 2) + 1 McClusky file (page 3) + 1 McClusky file (page 4) + 1 McClusky file (page 5)
You acquire an item: McClusky file (complete)



should control have been returned to the relay browser before the auto-creation of the McClusky file finished?
Since my case wasn't related to the browser at all, I suspect something changed after 14760 doesn't let mafia wait for the auto-creation before proceeding to the next adventure.
 
Last edited:
Double post, but the last few comments made me go back to 14760 log. The autocreation is present there:
Code:
[318] The Hidden Apartment Building
Encounter: pygmy witch accountant
Round 0: Hadean loses initiative!
You lose 78 hit points
Round 1: Hadean executes a macro!
Round 1: Hadean casts CURSE OF WEAKSAUCE!
You lose 74 hit points
Round 2: Hadean casts SAUCEGEYSER!
You lose 68 hit points
Round 3: Hadean casts SAUCEGEYSER!
Round 4: Hadean wins the fight!
You gain 50 Mana Points
You gain 7 Mana Points
You acquire an item: bone abacus
You acquire an item: adder
You acquire an item: McClusky file (page 5)

Use 1 boring binder clip + 1 McClusky file (page 1) + 1 McClusky file (page 2) + 1 McClusky file (page 3) + 1 McClusky file (page 4) + 1 McClusky file (page 5)
You acquire an item: McClusky file (complete)
You gain 31 Beefiness
You gain 61 Magicalness
You gain a Mysticality point!
You gain 32 Smarm
You swallow 30 dB of Thunder

cast 1 Cannelloni Cocoon
You gain 199 hit pointsr

Today's 14722:
Code:
[319] The Hidden Office Building
Encounter: pygmy witch accountant
Round 0: Hadean loses initiative!
You lose 74 hit points
Round 1: Hadean executes a macro!
Round 1: Hadean casts CURSE OF WEAKSAUCE!
You gain 15 Mana Points
You gain 18 Mana Points
You lose 68 hit points
Round 2: Hadean casts SAUCEGEYSER!
You gain 10 Mana Points
You gain 50 Mana Points
You gain 8 Mana Points
You acquire an item: bone abacus
You acquire an item: McClusky file (page 5)

cast 1 Cannelloni Cocoon
You gain 125 hit points
 
We won't do autocreation if we think the fight is not over. Same issue as other "fight not finishing correctly" bug.
 
I suspect something changed after 14760 doesn't let mafia wait for the auto-creation before proceeding to the next adventure.

I suspect you are wrong. Auto adventuring does not use the relay combat thread. Or any thread other than the one that processing is done in:

Code:
		case ItemPool.MCCLUSKY_FILE_PAGE5:
			ResultProcessor.autoCreate( ItemPool.MCCLUSKY_FILE );
			break;

Code:
	public static void autoCreate( final int itemId )
	{
		if ( ResultProcessor.autoCrafting || !Preferences.getBoolean( "autoCraft" ) )
		{
			return;
		}

		ConcoctionDatabase.refreshConcoctionsNow();
		CreateItemRequest creator = CreateItemRequest.getInstance( itemId );

		// getQuantityPossible() should take meat paste or
		// Knoll Sign into account

		int possible = creator.getQuantityPossible();

		if ( possible > 0 )
		{
			// Make as many as you can
			ResultProcessor.autoCrafting = true;
			creator.setQuantityNeeded( possible );
			RequestThread.postRequest( creator );
			ResultProcessor.autoCrafting = false;
		}
	}

So I maintain that -if- autocreation was attempted for you, it would have worked properly, so autocreation was therefore not attempted. You either have autoCraft set to false or recent broken parsing caused autocrafting not to fire. Either way, separate issue from the one reported by the OP.
 
My first guess was that parsing was the reason for this and that changed after 14760, didn't it?

If the OP was using a post-760 build, it's not a separate issue.

1) r14760 did not touch parsing. Parsing was broken by 14772.

2) I just demonstrated that -if- autocrafting is to fire during auto adventuring, it will work as it always has. Therefore autocrafting simply never happened for you (because of broken parsing, which is now fixed again), and your assertion that you are "100% certain that the CLI printed the attempt to create a file" is false.

Either show me a gCLI log of autocrafting firing-but-then-failing during auto-adventuring or stop asserting that your issue had anything to do with the OP's.
 
Last edited:
0) I don't want to fight! You guys do an awesome job, sorry if I may sound a bit annoying sometimes. <3

1) I never said 14760 touched parsing - I said a build after did. Hence the use of the word "after" in all those posts.

2) I will automate the Hidden Office with 14772 tomorrow, since I have not saved the gCLI output from this morning. With a debug log.
 
Automated the hidden office with 14772 as promised, autocreation failed once again.

gCLI output (the autocreation attempt is printed on the second turn):
Code:
Request 1 of 5 (HiddenCity: The Hidden Office Building) in progress...

[315] The Hidden Office Building
Encounter: Working Holiday
You acquire an item: boring binder clip

Request 2 of 5 (HiddenCity: The Hidden Office Building) in progress...

[316] The Hidden Office Building
Encounter: pygmy witch accountant
Strategy: D:\Nano\Kingdom Of Loathing\ccs\Rain Sauce.ccs [default]
Round 0: Hadean loses initiative!
You lose 74 hit points
Round 1: Hadean executes a macro!
Round 1: Hadean casts CURSE OF WEAKSAUCE!
You gain 6 hit points
You gain 3 Mana Points
You gain 22 Mana Points
You lose 70 hit points
Round 2: Hadean casts SAUCEGEYSER!
You gain 6 hit points
You gain 3 Mana Points
You lose 67 hit points
Round 3: Hadean casts SAUCEGEYSER!
You gain 5 hit points
You gain 3 Mana Points
You acquire an item: brass gear
You gain 34 Mana Points
You gain 9 Mana Points
You gain 332 Meat
You acquire an item: hot ashes
You acquire an item: McClusky file (page 5)
Verifying ingredients for McClusky file (complete) (1)...
Creating McClusky file (complete) (1)...
You are currently in a fight.
You gain 6 Soulsauce
You swallow 30 dB of Thunder
You can now equip a duct tape fedora (and possibly other things).

Casting Cannelloni Cocoon 1 times...
You gain 177 hit points
Cannelloni Cocoon was successfully cast.

Request 3 of 5 (HiddenCity: The Hidden Office Building) in progress...
(Romantic Monster window begin counter expired)

[317] The Hidden Office Building
Encounter: pygmy witch accountant
Strategy: D:\Nano\Kingdom Of Loathing\ccs\Rain Sauce.ccs [default]
Round 0: Hadean loses initiative!
You lose 68 hit points
Round 1: Hadean executes a macro!
Round 1: Hadean casts CURSE OF WEAKSAUCE!
You gain 5 hit points
You gain 4 Mana Points
You gain 11 Mana Points
You lose 65 hit points
Round 2: Hadean casts SAUCEGEYSER!
You gain 6 hit points
You gain 3 Mana Points
You lose 59 hit points
Round 3: Hadean casts SAUCEGEYSER!
You gain 5 hit points
You gain 3 Mana Points
You lose 56 hit points
Round 4: Hadean casts SAUCESTORM!
You gain 21 Mana Points
You gain 8 Mana Points
You gain 256 Meat
You acquire an item: shaker of dry rub
You gain 7 Soulsauce

Request 4 of 5 (HiddenCity: The Hidden Office Building) in progress...
(Romantic Monster window begin counter expired)

[318] The Hidden Office Building
Encounter: pygmy witch accountant
Strategy: D:\Nano\Kingdom Of Loathing\ccs\Rain Sauce.ccs [default]
Round 0: Hadean loses initiative!
You lose 70 hit points
Round 1: Hadean executes a macro!
Round 1: Hadean casts CURSE OF WEAKSAUCE!
You gain 6 hit points
You gain 4 Mana Points
You gain 13 Mana Points
You lose 65 hit points
Round 2: Hadean casts SAUCEGEYSER!
You gain 5 hit points
You gain 4 Mana Points
You gain 12 Mana Points
You lose 62 hit points
Round 3: Hadean casts SAUCEGEYSER!
You gain 5 hit points
You gain 3 Mana Points
You lose 54 hit points
Round 4: Hadean casts SAUCESTORM!
You acquire an item: magicalness-in-a-can
You gain 21 Mana Points
You gain 9 Mana Points
You gain 288 Meat
You gain 6 Soulsauce
You recover 7 drops of Rain

Casting Cannelloni Cocoon 1 times...
You gain 219 hit points
Cannelloni Cocoon was successfully cast.

Request 5 of 5 (HiddenCity: The Hidden Office Building) in progress...

[319] The Hidden Office Building
Encounter: pygmy witch accountant
Strategy: D:\Nano\Kingdom Of Loathing\ccs\Rain Sauce.ccs [default]
Round 0: Hadean loses initiative!
You lose 71 hit points
Round 1: Hadean executes a macro!
Round 1: Hadean casts CURSE OF WEAKSAUCE!
You gain 6 hit points
You gain 3 Mana Points
You gain 17 Mana Points
You lose 69 hit points
Round 2: Hadean casts SAUCEGEYSER!
You gain 5 hit points
You gain 4 Mana Points
You lose 60 hit points
Round 3: Hadean casts SAUCEGEYSER!
You gain 5 hit points
You gain 3 Mana Points
You lose 59 hit points
Round 4: Hadean casts SAUCESTORM!
You gain 17 Mana Points
You acquire an item: ice-cold Sir Schlitz
You gain 21 Mana Points
You gain 9 Mana Points
You gain 309 Meat
You gain 5 Soulsauce

Conditions not satisfied after 5 adventures.
You ran out of restores.

Debug and session log, if they are any help:
 

Attachments

I changed my practice a bit and got the binder clip and 4 McClusky files. I then automated the Apartment building.

gCLI:

Code:
Request 1 of 5 (HiddenCity: The Hidden Apartment Building) in progress...

[600] The Hidden Apartment Building
Encounter: pygmy witch accountant
Strategy: veracity [default]
Round 0: Veracity wins initiative!
Round 1: Veracity executes a macro!
Round 1: Veracity casts POCKET CRUMBS!
Round 2: pygmy witch accountant drops 47 attack power.
Round 2: pygmy witch accountant drops 45 defense.
Round 2: Hobo Grrl jumps out of the Buddy Bjorn and dances around your opponent's feet, burning he with his cigar (16 damage) and yanking at his shoelaces (or whatever he has).
Round 2: pygmy witch accountant takes 16 damage.
Round 2: pygmy witch accountant drops 5 attack power.
Round 2: pygmy witch accountant drops 3 defense.
Round 2: Veracity attacks!
Round 3: pygmy witch accountant takes 194 damage.
Round 3: Veracity attacks!
Round 4: pygmy witch accountant takes 185 damage.
Round 4: Veracity wins the fight!
After Battle: Hobo Grrl surveys the scene from your back, and gains 1 Experience.
You gain 301 Meat
You acquire an item: bone abacus
You acquire an item: adder
You acquire an item: short calculator
You acquire an item: pygmy adder oil
You acquire an item: McClusky file (page 5)
Verifying ingredients for McClusky file (complete) (1)...
Creating McClusky file (complete) (1)...
You acquire an item: McClusky file (complete)
Successfully created McClusky file (complete) (1)
After Battle: Raven 'Raven' Ravengrrl draws an adorable chibi version of your opponent. It comes to life and does an adorable little dance, which makes both of you smile. (+7 Stats)
You gain 19 Strengthliness
You gain 30 Wizardliness
You gain 49 Sarcasm

Session log:

Code:
[600] The Hidden Apartment Building
Encounter: pygmy witch accountant
Round 0: Veracity wins initiative!
Round 1: Veracity executes a macro!
Round 1: Veracity casts POCKET CRUMBS!
Round 2: pygmy witch accountant drops 47 attack power.
Round 2: pygmy witch accountant drops 45 defense.
Round 2: Hobo Grrl jumps out of the Buddy Bjorn and dances around your opponent's feet, burning he with his cigar (16 damage) and yanking at his shoelaces (or whatever he has).
Round 2: pygmy witch accountant takes 16 damage.
Round 2: pygmy witch accountant drops 5 attack power.
Round 2: pygmy witch accountant drops 3 defense.
Round 2: Veracity attacks!
Round 3: pygmy witch accountant takes 194 damage.
Round 3: Veracity attacks!
Round 4: pygmy witch accountant takes 185 damage.
Round 4: Veracity wins the fight!
After Battle: Hobo Grrl surveys the scene from your back, and gains 1 Experience.
You gain 301 Meat
You acquire an item: bone abacus
You acquire an item: adder
You acquire an item: short calculator
You acquire an item: pygmy adder oil
You acquire an item: McClusky file (page 5)

Use 1 boring binder clip + 1 McClusky file (page 1) + 1 McClusky file (page 2) + 1 McClusky file (page 3) + 1 McClusky file (page 4) + 1 McClusky file (page 5)
You acquire an item: McClusky file (complete)
After Battle: Raven 'Raven' Ravengrrl draws an adorable chibi version of your opponent. It comes to life and does an adorable little dance, which makes both of you smile. (+7 Stats)
You gain 19 Strengthliness
You gain 30 Wizardliness
You gain 49 Sarcasm
Auto-creation worked exactly as expected.
 
Back
Top