Page 2 of 2

Re: 0.4.7.1 bugfix release

Posted: Fri Sep 08, 2017 8:48 pm
by Dilvish
At your prompting now I was doing some more testing of RC2, and, well, remember that previously reported AI bug I had asked for some time to try tracking down, but then couldn't replicate and after asking about any recent sightings no one had replied so I gave up on it? Well, I just now replicated it with RC2, *sigh*.
AI_6: AI_Error: AI script error in "calculate_priorities": "Unable to find key in unordered_map."
AI_6: AI_Error: AI script error in "assign_military_fleets_to_systems": "Unable to find key in unordered_map."
It had been previously hypothesized this might be resulting from an empire that lost all its planets but had surviving fleets, which I had tried testing for, but it seems that is just part of the story-- it turns out that the surviving fleets need to specifically include a military fleet, and even then the bug does not appear unless/until that military fleet completes/ends its current mission without having been destroyed. In this case that happened 7 turns after the AI had lost all its planets.

Although the error then gets triggered twice each turn in not-obviously-related tasks (calculate_priorities, assign_military_fleets_to_systems), the actual error stems from the same bit of code that gets called from both places. My fix/workaround is essentially that if the AI has lost all planets it will not attempt to provide military backup for exploration efforts. I've confirmed that this fix/workaround solves the problem in my RC2 testcase and I have committed it now in master.

Regarding the question of whether to include this in 0.4.7.1, I am inclined to say it's not worth it at this point. Although the bug is quite visible when it does occur, it arises in a very narrow circumstance that seems to be pretty rare, and the actual impact is extremely minor-- the AI military fleet in this situation will wind up just sitting still and being a minor obstacle, but it is extremely unlikely that the AI in this situation would be able to accomplish much more even with the workaround in place. There is also a minor bit of conflict resolution that needs to be done to copy the commit from master into 0.4.7.1. If anyone is wanting to further consider this and test it out, I could post a PR to 0.4.7.1 in which I take care of that conflict resolution.

Re: 0.4.7.1 bugfix release

Posted: Sat Sep 09, 2017 11:40 am
by Morlic
I just pushed another bugfix for the AI not colonizing large/huge planets in the early game due to their supply penalty.

Not critical enough to warrant another RC but I wanted to mention it here in case another RC gets out.

Re: 0.4.7.1 bugfix release

Posted: Sat Sep 09, 2017 4:21 pm
by Dilvish
Morlic wrote:I just pushed another bugfix for the AI not colonizing large/huge planets in the early game due to their supply penalty. Not critical enough to warrant another RC but I wanted to mention it here in case another RC gets out.
I'm very glad you posted here about that commit, I try to review the commit log but sometimes a slew of commits come in at once and it's possible to miss things.

I agree that you found a bug, and that it's not critical enough for another RC. I think I've identified a deeper source for the problem that you observed, and I've opened a discussion for that; even if we have another RC I'm doubtful that I'd want to go with the approach of your commit.

Re: 0.4.7.1 bugfix release

Posted: Sun Sep 10, 2017 12:42 pm
by Vezzra
I agree with your assessments regarding both issues, that they are not serious enough to warrant another RC. So I still plan to declare the 0.4.7.1 release later today (provided no critical issues turn up in the last moment).

Re: 0.4.7.1 bugfix release

Posted: Sun Sep 10, 2017 6:45 pm
by Vezzra
0.4.7.1 has been released.

Re: 0.4.7.1 bugfix release

Posted: Sun Sep 10, 2017 11:57 pm
by Dilvish
Vezzra wrote:0.4.7.1 has been released.
Thanks much for shepherding that through; it's great to have it taken care of.

Re: 0.4.7.1 bugfix release

Posted: Mon Sep 11, 2017 5:26 pm
by Vezzra
:D