Menu

#3202 Boycott not taking effect w/o reload

Fixed_0.12.0
closed-fixed
nobody
None
5
2022-05-01
2020-08-18
No

During the previous turn, the king demanded a tax hike, which I refused. Ft Orange threw away its cotton.

On this turn I land in Europe and sell my load of cotton with no demand for arrears.

I then reload this turn, and cotton is properly boycotted.

1 Attachments

Discussion

  • Elder Statesman

    Elder Statesman - 2020-08-18

    I see this pretty regularly, but it's never reproducable. In this case, there's a bunch of errors in the log near the end, so maybe there's a clue?

     
  • Elder Statesman

    Elder Statesman - 2020-08-18

    Same game. In the last few turns, tobacco and lumber got boycotted properly.

     
  • Mike Pope

    Mike Pope - 2020-09-13

    There are two annoying problems here. I can reproduce neither:-P.

    The one that is generating most of the warnings is a complaint about the placement of the "unit buttons", the small buttons along the bottom of the window for unit actions (starting with the hand/wait-next unit). Are you seeing those buttons reliably when there is a unit ready to move and there are no popups? And are you using classic or corner map controls? I have seen this problem regularly in the past but it is not occurring for me at present so I am struggling to make progress. Better logging was added in git.f7ca2e5. This might be causing a timing issue that leads to the boycott fail, but its a long shot.

    The other bug is the zero-sized colony problem, but I am delighted to say your saved game has provided a clue that revealed a mistake. This one might be fixed in git.be1114c , and once again, long shot but it might be breaking autosaving.

    Other than those, I am out of ideas as to why boycotts get lost. Give the next nightly a shot and see if it is still there?

     
  • Björn Gustafsson

    I think I can reproduce and I also have a fix or a work-around.
    I stumbled over this issue in one of my own games and managed to reproduce. See attachments:
    - savegame
    - log
    - instruction for howto recreate

    To recreate open the savegame and then follow the instruction exactly, do not do anything else. My experience is that if you do something slightly different - it will not reproduce or it happens way later in the game. No restores or open games.

    BTW my commandline is: --debug MENUS --user-data-directory /home/bjorne/freecol-debug/ --log-file /home/bjorne/freecol-debug//freecol.log --no-splash --no-intro -Xmx4096M -Xms2048M

    The key to my understanding of the error is a log entry which is both in the original log and in my own as well (and if I have got it all wrong, please tell me):
    (this is my entry)
    net.sf.freecol.client.control.InGameController updateHandler
    WARNING: Update of missing FCGO: marketData:34
    Sun Mar 14 21:20:18 CET 2021
    Thread: 478

    This indicates that there are pointers to objects in freeColGameObjects that does not exist. This makes the update of marketData with arrears etc to the client to fail. I.e. the client never gets the information that a specific goodsType is boycotted.
    I have tried to understand why there are pointers to objects in freeColGameObjects that does not exist, but failed. My guess is that it is the garbage collector that collects one or more of the marketData objects.

    The fix: At the ServerPlayer csRaiseTax the specific marketData for the boycotted goodsType is sent to the client. The fix is to send the whole market instead. Seems to work like a charm!

    I am at: commit 620ac64a92ba0fc5fea11cef77f48059348f2cd0

    PR at Github: https://github.com/FreeCol/freecol/pull/88

    But before trying the fix - please try to recreate using my savegame and the instruction. If it dont recreate - please tell me.
    IF you can reproduce - please try the fix/workaround.

     

    Last edit: Björn Gustafsson 2021-03-20
  • Mike Pope

    Mike Pope - 2021-04-13

    Your analysis is almost certainly correct. The "WARNING: Update of missing FCGO: marketData:34" is preceded by notification that the marketData object was AWOL, which indeed suggests a garbage collection issue.

    Likewise your fix will work. But it is a big hammer --- the main reason there are MarketData objects at all is so they can be updated independently without having to send the entire Market. Worse though, we do not know why the GC is causing problems. I want to track down this underlying cause, and think I have found a potential fail with Market.copyIn mishandling MarketData, which has been fixed in git.ff5778b.

    Kudos for the effort that went into reproducing this. I have tried following your instructions, but alas, once again, the bug did not trigger for me. If we are right about it being GC related, that alas is not a surprise. I will be working on FreeCol reasonably frequently this week, and will make sure a nightly-release is triggered soon. Once you are running that, please report further sightings of this problem. I am hopeful there will be none.

     
  • Björn Gustafsson

    I could recreate using my own instruction (above) and made two tests, one without git.ff5778b and one with it applied. It work as it should with git.ff5778b applied (and fail to boycott without it).
    Thanks!

     
    • Mike Pope

      Mike Pope - 2021-04-14

      Excellent news, I think that is enough to set this to Pending. Many thanks for your work recently, bugs like this one often go unfixed for years due to the difficulty to reproduce.

       
  • Mike Pope

    Mike Pope - 2021-04-14
    • status: open --> pending-fixed
    • Group: Current --> Fixed_trunk
     
  • Mike Pope

    Mike Pope - 2022-05-01
    • Group: Fixed_trunk --> Fixed_0.12.0
     
  • Mike Pope

    Mike Pope - 2022-05-01
    • Status: pending-fixed --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB