Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 24

Thread: Mafia randomly thinking I'm naked

  1. #11
    Senior Member
    Join Date
    Apr 2006
    Posts
    144

    Default

    I'll remember to include the adventure count in the future, no problem.
    I noticed it happen w/ the besneaky mood, and I agree, maybe changing to it was the cause. I swap between default and besneaky many many times a day, especially while ascending. So I'm not sure what to make of that.

  2. #12
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,572

    Default

    I'll remember to include the adventure count in the future, no problem.
    I noticed it happen w/ the besneaky mood, and I agree, maybe changing to it was the cause. I swap between default and besneaky many many times a day, especially while ascending. So I'm not sure what to make of that.
    Originally Posted by Terrabull View Post
    Thanks. I think about this and look at code but I'm getting nowhere.
    Well, thank you.
    Originally Posted by Veracity View Post

  3. #13
    Senior Member
    Join Date
    Apr 2006
    Posts
    144

    Default

    Happened again, this time w/o moods. I noticed it BEFORE I adventured, but I can't stop it once it strips me.
    I beat the Goblin King, auto-sold my meat stacks, then changed my equipment to something more reasonable. Then Mafia decided I was TOO reasonable apparently, and said everything was off.
    I clicked onto the counsel to get my new quest, clicked on the Friars copse, then went to my campsite for the buff, and that's when I realized I was naked. Happens right after adventure 27. Unfortunately, there isn't much there.
    Attached Files
    A bumcheekcity page I can be proud of!

  4. #14
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    12,491

    Default

    Do you run Guide?

  5. #15
    Senior Member
    Join Date
    Apr 2006
    Posts
    144

    Default

    It is installed, but was not running anytime today.

    Edit: Speaking of Relay Browser stuff. I have Chit running, and that's how I noticed I was naked while mucking around in the GUI. I looked at the left, saw all the boxes were empty, then went to my inventory page and saw my equipment. Then I confirmed mafia thought I was naked and went to adventure to trigger the disrobing.
    Last edited by Terrabull; 02-05-2020 at 06:32 AM.

  6. #16
    Senior Member
    Join Date
    Apr 2006
    Posts
    144

    Default

    Got stripped again, this time after going to the Boxing Daycare. Again, noticed it in Chit, all my stuff is still equipped right now. Went to Mafia and re-equipped the stuff in there. Adventure 676

    Was not running Guide today.

    Should I run anything to make the logs more detailed?
    Attached Files

  7. #17
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,572

    Default

    Not sure what else you could log. Thank you.

    My only hypothesis is that it is a threading issue related to the relay browser and/or relay scripts. So not running Chit or Guide might eliminate the problem. But I can also understand that running without those is more of a problem than nakedness.

  8. #18
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    12,491

    Default

    Let's try an experiment. Somehow, this is happening:

    Save outfit checkpoint
    Do NPC purchase
    api.php comes back with current equipment
    --> it disagrees with our current model of equipment (naked) and we update current model to agree with KoL
    Restore outfit checkpoint
    --> which is apparently naked, so we remove all equipment.

    Now, there are definitely threading issues:

    SpecialOutfit.implicitPoints is a static class field
    SpecialOutfit.explicitPoints is a static class field
    as are
    SpecialOutfit.implicitOutfit
    SpecialOutfit.markedCheckpoint
    EquipmentRequest.shouldSavePreviousOutfit

    Studying the code, those last three provide complexity but serve no purpose that I can discern.

    The stack of "explicitPoints" is pushed and popped by script commands.
    The stack of "implicitPoints" is pushed and popped in numerous places all over KoLmafia to handle restoring equipment when called code - recovery, NPC purchases, whatever - might change gear - reduce MP cost of skills, wear an outfit to visit NPC store or lower purchase cost, and so on.

    To be thread safe, we'd need to synchronize all those push/action/pop code blocks.

    But what is so puzzling is that your session logs don't show any indication of extra stuff (from other threads) that would push or pop checkpoints - and how would you get an empty checkpoint?

    I am going to submit a change that removes all usage of:

    SpecialOutfit.implicitOutfit
    SpecialOutfit.markedCheckpoint
    EquipmentRequest.shouldSavePreviousOutfit

    since, as I said, I cannot see how it is doing anything at all useful and it complicates the code.

    I'm also considering adding a debugging property which will log creating and restoring checkpoints and specially calling out when the checkpoint is empty. Whatever happened just before creating an empty checkpoint would be something to look at. What would really be necessary to understand this is a DEBUG log, not a session log, but that is super cumbersome for something which happens so rarely - especially if you run Guide.

    Revision 19730 simplifies the code by removing apparently unnecessary complexity.
    Lets see how KoLmafia runs without that code.

  9. #19
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    12,491

    Default

    Revision 19731 prints a stack trace to the DEBUG log if we create an implicit checkpoint with no equipment.
    It also prints "Created an empty implicit checkpoint" to the gCLI and session log.

  10. #20
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,572

    Default

    Thank you.

Posting Permissions

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