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 #911885
Qt: delete race condition when exiting if the gotodlg was shown
100%
Description
SIGSEV when exiting if the gotodlg was ever shown. This was caused by the gotodlg class destructor and the global cleanup thread deleting the same 'working' map tile. This proposed fix minimizes the 'working' tile exposure that is held by the gotodlg class.
History
#1
Updated by Marko Lindqvist over 1 year ago
Which branches are affected?
#2
Updated by John Robertson over 1 year ago
Any Qt branch that caches the 'working' tile (not sure when that was introduced); I haven't checked the S3_0 or S2_6 branches yet. I have mainly been working on a unit-stack-count for the map view (see Feature #911906: Qt - in the map view, display the unit stack count). I have the Qt platform working and need to implement the two GTK and the one SDL platforms. I'll work on this in conjunction with the unit-stack-count feature.
#3
Updated by Marko Lindqvist over 1 year ago
Should the destructor have direct 'working' tile cleanup at all. Shouldn't dialog always get closed before destruction, and that closing to free the 'working' tile?
#4
Updated by Marko Lindqvist over 1 year ago
- Status changed from New to In Progress
John Robertson wrote:
the gotodlg class destructor and the global cleanup thread deleting the same 'working' map tile.
There's no multiple threads in play in here, and it's not double free that it's trying to do.
Rather it seems that city hash has already been freed ( idex_free() ) when the destructor is called, causing lookup for the city on tile to crash. We free city hash as part of our explicit cleanup, before global destructors run.
#5
Updated by Marko Lindqvist over 1 year ago
There's also a related (I think the proper fix for one will fix also the other) bug that gotodlg is not popped down at all when leaving the game.
#6
Updated by Marko Lindqvist over 1 year ago
- File 0020-Qt-Popdown-gotodlg-when-leaving-the-game.patch 0020-Qt-Popdown-gotodlg-when-leaving-the-game.patch added
- Status changed from In Progress to Resolved
- Sprint/Milestone set to 2.6.4
Here's my proposal for the fix.
#7
Updated by John Robertson over 1 year ago
Yes, I think your fix is better.
#8
Updated by Marko Lindqvist over 1 year ago
- Status changed from Resolved to Closed
- Assignee set to Marko Lindqvist