Page 1 of 2 1 2 LastLast
Results 1 to 10 of 18

Thread: Chateau MP restore infinite loop.

  1. #1
    Senior Member VladYvhuce's Avatar
    Join Date
    Feb 2016
    Location
    Kansas
    Posts
    215

    Default Chateau MP restore infinite loop.

    I've noticed a problem with the past several versions of Mafia. When I click on the MP bar in the relay browser, instead of just restoring my MP like it used to, Mafia enters an infinite loop that tries to eat all of my adventures, so I have to hit the "Stop Now" button. Here's the CLI output from tonight, using version 17933:
    > restore mp

    Restoring MP! Currently at 2214 of 2214 HP, 10 of 1165 MP, current meat: 28860039 ... Target MP = 1165.

    [6403] Rest in your bed in the Chateau
    You gain 147 Muscularity Points
    You acquire an item: Choco-Mint patty
    You gain 160 Sarcasm

    [6403] Rest in your bed in the Chateau
    You gain 127 Muscularity Points
    You gain 160 Sarcasm

    [6403] Rest in your bed in the Chateau
    You gain 123 Muscularity Points
    You acquire an item: hot mint schnocolate
    You gain 160 Roguishness

    [6403] Rest in your bed in the Chateau
    You gain 131 Muscularity Points
    You gain 160 Roguishness

    [6403] Rest in your bed in the Chateau
    You gain 101 Muscularity Points
    You acquire an item: hot mint schnocolate
    You gain 160 Roguishness

    [6403] Rest in your bed in the Chateau
    You gain 125 Muscularity Points
    You gain 160 Sarcasm
    You gain a Moxie point!

    [6403] Rest in your bed in the Chateau
    You gain 102 Muscularity Points
    You gain 160 Roguishness

    [6403] Rest in your bed in the Chateau
    You gain 122 Muscularity Points
    You acquire an item: homeopathic mint tea
    You gain 160 Roguishness

    [6403] Rest in your bed in the Chateau
    You gain 160 Chutzpah

    [6403] Rest in your bed in the Chateau
    You gain 160 Smarm

    [6403] Rest in your bed in the Chateau
    You gain 160 Chutzpah

    [6403] Rest in your bed in the Chateau
    You gain 160 Cheek
    You gain a Moxie point!

    [6403] Rest in your bed in the Chateau
    You gain 160 Sarcasm

    [6403] Rest in your bed in the Chateau
    You gain 160 Cheek

    [6403] Rest in your bed in the Chateau
    You gain 160 Roguishness

    [6403] Rest in your bed in the Chateau
    You acquire an item: homeopathic mint tea
    You gain 160 Smarm

    [6403] Rest in your bed in the Chateau
    You gain 160 Smarm

    [6403] Rest in your bed in the Chateau
    You gain 160 Sarcasm
    You gain a Moxie point!

    [6403] Rest in your bed in the Chateau
    You acquire an item: Choco-Mint patty
    You gain 160 Sarcasm

    [6403] Rest in your bed in the Chateau
    You gain 160 Smarm

    [6403] Rest in your bed in the Chateau
    You gain 160 Roguishness

    [6403] Rest in your bed in the Chateau
    You gain 160 Chutzpah

    [6403] Rest in your bed in the Chateau
    You gain 160 Sarcasm

    [6403] Rest in your bed in the Chateau
    You gain 160 Cheek
    You gain a Moxie point!

    [6403] Rest in your bed in the Chateau
    You gain 160 Chutzpah

    [6403] Rest in your bed in the Chateau
    You gain 160 Roguishness

    [6403] Rest in your bed in the Chateau
    You gain 160 Chutzpah

    [6403] Rest in your bed in the Chateau
    You gain 160 Sarcasm

    [6403] Rest in your bed in the Chateau
    You gain 160 Chutzpah

    [6403] Rest in your bed in the Chateau
    You gain 160 Smarm
    You gain a Moxie point!

    [6403] Rest in your bed in the Chateau
    You gain 160 Cheek

    [6403] Rest in your bed in the Chateau
    You gain 160 Roguishness

    [6403] Rest in your bed in the Chateau
    You gain 160 Chutzpah

    [6403] Rest in your bed in the Chateau
    You gain 160 Sarcasm

    [6403] Rest in your bed in the Chateau
    You gain 160 Cheek

    [6403] Rest in your bed in the Chateau
    You gain 160 Sarcasm
    You gain a Moxie point!

    [6403] Rest in your bed in the Chateau
    You gain 160 Sarcasm

    [6403] Rest in your bed in the Chateau
    You gain 160 Chutzpah

    [6403] Rest in your bed in the Chateau
    You gain 160 Roguishness

    [6403] Rest in your bed in the Chateau
    You gain 160 Chutzpah

    [6403] Rest in your bed in the Chateau
    You gain 160 Roguishness

    [6403] Rest in your bed in the Chateau
    You gain 160 Chutzpah
    You gain a Moxie point!

    [6403] Rest in your bed in the Chateau
    You acquire an item: homeopathic mint tea
    You gain 160 Roguishness

    [6403] Rest in your bed in the Chateau
    You gain 160 Smarm

    [6403] Rest in your bed in the Chateau
    You gain 160 Roguishness

    [6403] Rest in your bed in the Chateau
    You gain 160 Chutzpah

    [6403] Rest in your bed in the Chateau
    You gain 160 Chutzpah

    [6403] Rest in your bed in the Chateau
    You acquire an item: Choco-Mint patty
    You gain 160 Cheek
    You gain a Moxie point!

    [6403] Rest in your bed in the Chateau
    You gain 160 Sarcasm

    [6403] Rest in your bed in the Chateau
    You gain 160 Sarcasm

    [6403] Rest in your bed in the Chateau
    You gain 160 Smarm

    [6403] Rest in your bed in the Chateau
    You gain 160 Cheek

    [6403] Rest in your bed in the Chateau
    You gain 160 Cheek

    [6403] Rest in your bed in the Chateau
    You gain 110 Sarcasm
    You gain a Moxie point!

    [6403] Rest in your bed in the Chateau
    You gain 111 Chutzpah

    [6403] Rest in your bed in the Chateau
    You gain 111 Sarcasm

    [6403] Rest in your bed in the Chateau
    You gain 110 Chutzpah

    [6403] Rest in your bed in the Chateau
    You gain 110 Sarcasm

    [6403] Rest in your bed in the Chateau
    You gain 111 Cheek

    [6403] Rest in your bed in the Chateau
    KoLmafia declares world peace.
    You gain 110 Smarm
    In KOL: VladYvhuce (#1798867)

  2. #2
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,274

    Default

    What that shows is that mafia believes it was not using adventures to rest since they were all on turn 6403. Obviously that is wrong since there's no way you could have had that many free rests. Another mistake is that mafia is not showing a gain of MP for rests after the eighth. Which is just weird.

    Since mafia thinks it is still using free rests while not gaining MP, there isn't any reason for it to stop resting.

    You say it was from last night which I'm guessing was April 2nd. Could you possibly be wrong and it was actually from April 1st? Because bad parsing caused by salad is the only answer of which I can think. Has this actually happened many times?

  3. #3

    Default

    Somehow mafia wasn't parsing api.php, which I expect was not saladified. I doubt anything can be done with this report unless it can be reproduced.

  4. #4
    Senior Member VladYvhuce's Avatar
    Join Date
    Feb 2016
    Location
    Kansas
    Posts
    215

    Default

    What that shows is that mafia believes it was not using adventures to rest since they were all on turn 6403. Obviously that is wrong since there's no way you could have had that many free rests. Another mistake is that mafia is not showing a gain of MP for rests after the eighth. Which is just weird.

    Since mafia thinks it is still using free rests while not gaining MP, there isn't any reason for it to stop resting.

    You say it was from last night which I'm guessing was April 2nd. Could you possibly be wrong and it was actually from April 1st? Because bad parsing caused by salad is the only answer of which I can think. Has this actually happened many times?
    Originally Posted by Bale View Post
    It happened before April 1st, and has happened every time I try to do it since. I hadn't changed any settings before it started, so it's s mystery to me as to what happened to get broken...

    Here's a CLI output from a few minutes ago when I just tried it again with r17938.
    > restore mp

    Restoring MP! Currently at 953 of 953 HP, 241 of 473 MP, current meat: 26671880 ... Target MP = 473.

    [6753] Rest in your bed in the Chateau
    You gain 122 Muscularity Points
    You acquire an item: homeopathic mint tea
    You gain 111 Smarm

    [6753] Rest in your bed in the Chateau
    You gain 96 Muscularity Points
    You gain 111 Sarcasm

    [6753] Rest in your bed in the Chateau
    You gain 111 Smarm

    [6753] Rest in your bed in the Chateau
    You gain 110 Smarm

    [6753] Rest in your bed in the Chateau
    You acquire an item: Choco-Mint patty
    You gain 111 Smarm

    [6753] Rest in your bed in the Chateau
    You gain 111 Sarcasm
    You gain a Moxie point!

    [6753] Rest in your bed in the Chateau
    You gain 111 Smarm

    [6753] Rest in your bed in the Chateau
    You gain 111 Roguishness

    [6753] Rest in your bed in the Chateau
    You gain 111 Smarm

    [6753] Rest in your bed in the Chateau
    You gain 110 Chutzpah

    [6753] Rest in your bed in the Chateau
    You gain 111 Sarcasm

    [6753] Rest in your bed in the Chateau
    You gain 111 Roguishness

    [6753] Rest in your bed in the Chateau
    You gain 110 Chutzpah

    [6753] Rest in your bed in the Chateau
    You gain 110 Smarm

    [6753] Rest in your bed in the Chateau
    You gain 111 Roguishness
    You gain a Moxie point!

    [6753] Rest in your bed in the Chateau
    You gain 111 Roguishness

    [6753] Rest in your bed in the Chateau
    You gain 110 Smarm

    [6753] Rest in your bed in the Chateau
    You gain 110 Chutzpah

    [6753] Rest in your bed in the Chateau
    You gain 111 Chutzpah

    [6753] Rest in your bed in the Chateau
    You acquire an item: Choco-Mint patty
    You gain 111 Roguishness

    [6753] Rest in your bed in the Chateau
    You gain 110 Cheek

    [6753] Rest in your bed in the Chateau
    You gain 111 Roguishness

    [6753] Rest in your bed in the Chateau
    You gain 111 Cheek

    [6753] Rest in your bed in the Chateau
    You gain 111 Chutzpah
    You gain a Moxie point!

    [6753] Rest in your bed in the Chateau
    You gain 110 Smarm

    [6753] Rest in your bed in the Chateau
    You gain 110 Chutzpah

    [6753] Rest in your bed in the Chateau
    You gain 111 Sarcasm

    [6753] Rest in your bed in the Chateau
    You gain 110 Sarcasm

    [6753] Rest in your bed in the Chateau
    You gain 111 Chutzpah

    [6753] Rest in your bed in the Chateau
    You gain 110 Chutzpah

    [6753] Rest in your bed in the Chateau
    You gain 111 Cheek

    [6753] Rest in your bed in the Chateau
    KoLmafia declares world peace.
    You gain 110 Chutzpah
    In KOL: VladYvhuce (#1798867)

  5. #5
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,167

    Default

    DEBUG log, please?
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  6. #6
    Senior Member VladYvhuce's Avatar
    Join Date
    Feb 2016
    Location
    Kansas
    Posts
    215

    Default

    DEBUG log, please?
    Originally Posted by Veracity View Post
    Here ya go.DEBUG_20170403.txt
    In KOL: VladYvhuce (#1798867)

  7. #7
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,167

    Default

    I extracted this sequence:

    Code:
    Requesting: https://www.kingdomofloathing.com/charpane.php
    Retrieved: https://www.kingdomofloathing.com/charpane.php
    MP 219/473
    ...
    GET /KoLmafia/sideCommand?cmd=restore+mp&pwd=xxxx HTTP/1.1
    > restore mp
    Starting recovery script: Universal_recovery.ash
    Requesting: http://zachbardon.com/mafiatools/autoupdate.php?f=recoveryScript_map_v2&act=getver
    Retrieved: http://zachbardon.com/mafiatools/autoupdate.php?f=recoveryScript_map_v2&act=getver
    <font color="#33CCCC">Restoring MP! Currently at 953 of 953 HP, 219 of 473 MP, current meat: 26671880 ... Target MP = 473.</font>
    ---
    [6785] Rest in your bed in the Chateau
    Connecting to place.php...
    Requesting: https://www.kingdomofloathing.com/place.php?whichplace=chateau&action=chateau_restbox
    Retrieved: https://www.kingdomofloathing.com/place.php?whichplace=chateau&action=chateau_restbox
    Parsing result: You gain 137 Muscularity Points
    You gain 137 Muscularity Points
    Processing result:  MP: 137
    Parsing result: You gain 111 Sarcasm
    You gain 111 Sarcasm
    Processing result:  Substats: 0 / 0 / 111
    You gain a Moxie point!
    ---
    [6785] Rest in your bed in the Chateau
    Connecting to place.php...
    Requesting: https://www.kingdomofloathing.com/place.php?whichplace=chateau&action=chateau_restbox
    Retrieved: https://www.kingdomofloathing.com/place.php?whichplace=chateau&action=chateau_restbox
    Parsing result: You gain 101 Muscularity Points
    You gain 101 Muscularity Points
    Processing result:  MP: 101
    Parsing result: You gain 110 Smarm
    You gain 110 Smarm
    Processing result:  Substats: 0 / 0 / 110
    ---
    [6785] Rest in your bed in the Chateau
    Connecting to place.php...
    Requesting: https://www.kingdomofloathing.com/place.php?whichplace=chateau&action=chateau_restbox
    Retrieved: https://www.kingdomofloathing.com/place.php?whichplace=chateau&action=chateau_restbox
    Parsing result: You gain 111 Smarm
    You gain 111 Smarm
    Processing result:  Substats: 0 / 0 / 111
    ---
    You clicked on the sidebar and it asked for "recover mp"
    You are running Universal Recovery. It would have been nice if you mentioned that.
    --> That tells us that every single request to rest in chateau was issued by the script.

    Universal recovery first says:

    Restoring MP! Currently at 953 of 953 HP, 219 of 473 MP, current meat: 26671880 ... Target MP = 473.

    That status - 219/473 - agrees with what the charpane said.

    Universal Recovery asked to rest at the chateau.

    Parsing result: You gain 137 Muscularity Points
    You gain 137 Muscularity Points
    Processing result: MP: 137

    We are now at 356/419 MP

    Universal Recovery asked to rest at the chateau.

    Parsing result: You gain 101 Muscularity Points
    You gain 101 Muscularity Points
    Processing result: MP: 101
    We are now at 457/419. Well, obviously, it pegs at 419.

    Universal Recovery asked to rest at the chateau.

    Parsing result: You gain 111 Smarm
    You gain 111 Smarm

    No more MP recovery, since you are at full.

    Universal Recovery asked to rest at the chateau.
    ad infinitum.

    From what I can tell, this is not a KoLmafia bug. The "MP restore infinite loop" occurs because Universal Recovery is repeatedly asking to restore MP when MP is at full.

    I'm going to mark this Not a Bug.

    I'll reopen it if Bale can explain what KoLmafia did wrong. I'm not seeing anything.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  8. #8

    Default

    The turncount logged for all those rests never increased, even after free rests ran out.

  9. #9
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,167

    Default

    We only increase turncount when we look at charpane.php or api.php.
    That never happened between the successive chateau rests.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  10. #10
    Senior Member VladYvhuce's Avatar
    Join Date
    Feb 2016
    Location
    Kansas
    Posts
    215

    Default

    You clicked on the sidebar and it asked for "recover mp"
    You are running Universal Recovery. It would have been nice if you mentioned that.
    --> That tells us that every single request to rest in chateau was issued by the script.
    Originally Posted by Veracity View Post
    Well, now I know that that's a Universal Recovery function, and not just a Mafia function. I've had Universal Recovery running so long, that I'd forgotten that that wasn't a regular Mafia function... Sorry 'bout that mix-up.
    In KOL: VladYvhuce (#1798867)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •