HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...
Bug #830553
closedQt client may crash when setting a rally point and the city is lost
0%
Description
Steps to reproduce:
- In the Qt client, start setting a rally point, select an empty size 1 city near a border
- With another instance to wipe the city with the other player (or remove it in edit mode)
- In the first client, click anywhere on the map
The Qt client crashes because it tries to access the position of a city that has been freed (https://github.com/freeciv/freeciv/blob/master/client/gui-qt/mapctrl.cpp#L269).
Qt client's rally points were first seen in 2.6. A proper fix will also require changes to the common code. I'll come up with a minimal patch for this branch.
In 3.0 and later it should be fixed together with the transition to server-side rally points (#822927).
Files
Related issues
Updated by Louis Moureaux almost 4 years ago
- Related to Feature #822927: Rally points for cities added
Updated by Louis Moureaux almost 4 years ago
In 3.0 and later it should be fixed together with the transition to server-side rally points (#822927).
Just realized that server-side RP didn't make it to 3.0. Hopefully a patch similar to the one for 2.6 can be used.
Updated by Jacob Nevins over 3 years ago
- Sprint/Milestone changed from 2.6.1 to 2.6.2
Updated by Louis Moureaux over 3 years ago
- File 0001-Fix-crashes-in-Qt-client-side-rally-points.patch 0001-Fix-crashes-in-Qt-client-side-rally-points.patch added
Patch for 2.6 and 3.0
Updated by Jacob Nevins over 3 years ago
(Patch contains strings, so we want it on S2_6 by end of Thursday to meet 2.6.2 string freeze.)
Updated by Chippo Elder over 3 years ago
So how do you go about testing this patch from one machine?
I started a server, set minplayers to 2 and aifill to 0. Started two qt clients. The first one connects to the server no problem. The second one won't, and the server's console says:
2: Connection request from chippo from chippo-Aspire-V3-731 2: c3 has client version 2.6.1+ 2: Client rejected: c3 from chippo-Aspire-V3-731 (connection incomplete). 2: chippo was rejected: Duplicate login name [chippo-Aspire-V3-731]. 2: Lost connection: c3 from chippo-Aspire-V3-731 (rejected).
What? It can't be using my ip address as my unique key! It must be ip-addr/src-port.
So, what do you do? How can I test this patch with only one machine?
Updated by Chippo Elder over 3 years ago
Oops. Already resolved. This idiot here, overuses 'chippo' for machines, logins, people, everything.
I just had to change the username and all's going fine.
Updated by Chippo Elder over 3 years ago
- File rally-city.sav.bz2 rally-city.sav.bz2 added
- File rally-city.png rally-city.png added
I can't replicate the original problem.
The attached savegame is for 2 human players, 'chip' and 'chop'. If you connect with chop, you'll see that the Settler [l tgt="unit" id=116 name="Settlers" /] has a rally point on the city [l tgt="city" id=118 name="Lakam Ja'" /] for it's Go-To to [l tgt="city" id=115 name="Yax Mutal" /].
Connected as chip, you'll see have a Centurion standing next to Lakam Ja'. Press Turn done a few times in each client, destroying the city with your Centurion. A turn or two later, check out the Settler's orders. They look fine. See attached screenshot.
This is all 2.6.1+ (modified 7c30e20232), gui-qt client (unpatched).
Updated by Jacob Nevins over 3 years ago
- Status changed from New to Resolved
- Assignee set to Jacob Nevins
I can't replicate the original problem. [...]
I think the problem is before that point -- specifically when a city goes away while the user is still selecting a rally point for its future units.
Once a city has made a unit and given it goto orders, as in this case, the city's rally point is irrelevant to it.
I can replicate trouble from your savegame:- As chip: Multiplayer / Set/unset rally point
- As chip: click on Lakam Ja'
- As chop: destroy Lakam Ja'
- As chip: click somewhere on the map
(It didn't crash for me, but it said "Tile (70, 17) set as rally point from city @�f���." so clearly it was unhappy. Louis' patch fixed the issue.)
Updated by Jacob Nevins over 3 years ago
...so I plan to commit the patch to S2_6/S3_0 soon.
(Louis said on IRC that the originally reported crash is already fixed on master; there is another crash fixed by this patch that causes an assertion failure on master, apparently. That probably wants another ticket.)
Updated by Louis Moureaux over 3 years ago
Jacob Nevins wrote:
...so I plan to commit the patch to S2_6/S3_0 soon.
(Louis said on IRC that the originally reported crash is already fixed on master; there is another crash fixed by this patch that causes an assertion failure on master, apparently. That probably wants another ticket.)
-> #858746
Updated by Jacob Nevins over 3 years ago
- Related to Bug #858746: Setting a rally point out of the map crashes the Qt client added
Updated by Jacob Nevins over 3 years ago
- Status changed from Resolved to Closed