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.
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]
This is caused by:
...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:
@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.
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.
Fixed. You can verify the fix using the development version:
https://github.com/FreeCol/freecol/releases/tag/latest