Menu

#3253 Immigrants list disappears after first viewing.

Fixed_0.13.0
closed
nobody
5
2022-08-13
2022-05-05
No

The first time I go to the immigration section of the Difficulty screen, it shows a list of predetermined immigrants. That list disappears when I come back to that section, until I dismiss the Difficulty screen. The next time I open the Difficulty screen, the immigrants list shows up again.

Discussion

  • Calebrw

    Calebrw - 2022-05-06

    Confirmed as of [bbf606].

    I'm not 100% sure, but I think was introduced around the time @stiangre committed [89c6b1]. I took a look at SwingGUI.java method showClientOptionsDialog() and I see refreshGuiUsingClientOptions() is the only thing new since 2020.

     

    Related

    Commit: [89c6b1]
    Commit: [bbf606]

  • Stian Grenborgen

    This is caused by:

    setLayout(null);
    

    ...in MigPanel.removeNotify.

    I would normally fix this by just removing that statement, but it was added in a commit named: "MigLayout leakage fixes" in 2013.

    In FreeColPanel, the following explanation is given:

        // We need to make sure the layout is cleared because some
        // versions of MigLayout are leaky.
    

    @mpope: Is this cleanup code still needed? If yes, then we should add a "addNotify"-method as well. This is also true for all other uses of removeNotify -- like in FreeColPanel.

     
    • Mike Pope

      Mike Pope - 2022-05-07

      Is this cleanup code still needed?

      I do not know. 2013 is a long time ago, but there has been very little change to MigLayout AFAICT. It appears to be stuck at v5.0, which is what we have been distributing since 2017. I recommend we remove the offending line and keep an eye out for memory problems in the absence of a better plan.

       
  • Stian Grenborgen

    • status: open --> pending-fixed
    • Group: Current --> Fixed_trunk
     
  • Stian Grenborgen

    Fixed. You can verify the fix using the development version:
    https://github.com/FreeCol/freecol/releases/tag/latest

     
  • Stian Grenborgen

    • status: pending-fixed --> closed
    • Group: Fixed_trunk --> Fixed_0.13.0
     

Log in to post a comment.

MongoDB Logo MongoDB