Bug #2371
open
gtk4: Client crash when accepting one treaty from many
Added by Marko Lindqvist about 3 hours ago.
Updated about 1 hour ago.
Description
Likely a regression with #2306; if there's diplomacy dialog open with multiple opponents, individual dialog does not close when it gets accepted, and sometimes client crashes at that point.
Files
#2306 should be reverted, and fixed properly - the actual problem is as follows:
gui_dialog_destroy() does not immediately cause call of gui_dialog_destroy_handler(), but only from gtk's main loop when it's next time entered.
gui_dialog_destroy() is first called for the last diplomacy dialog, and then for the main diplomacy dialog. This is correct order, but it still results in main diplomacy dialog being destroyed at this point.
gui_dialog_destroy_handler() is called from the gtk main loop for the last diplomacy dialog. It tries to access things that were owned by now destroyed main diplomacy dialog.
The solution is to move any access to external, potentially destroyed, dialogs from gui_dialog_destroy_handler() to happen already in gui_dialog_destroy()
- Related to Bug #2306: gtk4: Double destruction of diplomacy dialog added
Also available in: Atom
PDF