Project

General

Profile

Actions

Bug #1667

open

leave game, start new game with default ruleset sometimes gets you the previous ruleset

Added by Dean Brown 16 days ago. Updated 15 days ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
General
Target version:
-
Start date:
08/31/2025
Due date:
% Done:

0%

Estimated time:

Description

sometimes = "Load another tileset" during the 1st game, which is only an option with the Qt client, but the bug may not be in the Qt client code.

To repro -
1 install the ancients ruleset from the modpack installer
2 start Qt client
3 select ancients ruleset
4 start game
5 choose "Load another tileset" menu item and select "ancients"
6 leave game
7 start new game, leave ruleset set to "default"
8 start game, get the ancients ruleset and default tilespec

If instead you leave out step 5, you get the correct default (civ2civ3) ruleset.

Actions #1

Updated by Marko Lindqvist 16 days ago

"Ancients" tileset sets "ancients" ruleset. That's as it's supposed to work. Did you originally start with "ancients" tileset? If yes, then the bug is in "If instead you leave out step 5, you get the correct default (civ2civ3) ruleset."

Actions #2

Updated by Dean Brown 16 days ago

  • Priority changed from Normal to Low

Did not start with "ancients" tileset, so 1st game started with "ancients" ruleset and Amplio2 tileset. I noticed that "ancients" ruleset does not have a [tileset] preferred=... If it did then this may not happen.

This is pretty esoteric and likely uncommon so lowering the priority.

Actions #3

Updated by Marko Lindqvist 16 days ago

Dean Brown wrote in #note-2:

This is pretty esoteric and likely uncommon so lowering the priority.

So what kind of "fix" you are proposing (/ what is the "bug"), if you still see a reason to keep this open and not marked invalid (regardless of the priority)?

Actions #4

Updated by Dean Brown 15 days ago

The more I dig into this the more puzzled I get.

"Ancients" tileset sets "ancients" ruleset

That doesn't exactly match what I see. If I load the "Ancients" tileset while in a game with another ruleset, I get the show_tileset_error() dlog and client exits. If I set "Ancients" tileset in the local options dlog, then starting a new game with any ruleset other than "Ancients" gets the show_tileset_error() dlog. I would say 'Using the "Ancients" tileset constrains you to only using the "ancients" ruleset'.

While flailing around I was able to get the client to crash, but not reliably. Stack trace excerpts -

0   freeciv-qt                        0x000000010daf08b0 get_unit_nation_flag_sprite + 80 (tilespec.c:4485)
1   freeciv-qt                        0x000000010dae69ef fill_unit_sprite_array + 95 (tilespec.c:4574)
2   freeciv-qt                        0x000000010dae15ed fill_sprite_array + 12653 (tilespec.c:6207)
3   freeciv-qt                        0x000000010da93122 put_one_element + 242 (mapview_common.c:1375)
4   freeciv-qt                        0x000000010da9597f put_one_tile + 383 (mapview_common.c:1594)
5   freeciv-qt                        0x000000010da8e595 update_map_canvas + 3989 (mapview_common.c:1808)
6   freeciv-qt                        0x000000010da90a75 unqueue_mapview_updates + 1973 (mapview_common.c:3180)
7   freeciv-qt                        0x000000010da9d83d queue_callback + 29 (mapview_common.c:3021)
8   freeciv-qt                        0x000000010d99c50c mr_idle::idling() + 92 (mapview.cpp:180)
9   freeciv-qt                        0x000000010d9a31e4 QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (mr_idle::*)()>::call(void (mr_idle::*)(), mr_idle*, void**) + 132 (qobjectdefs_impl.h:152)

...

33  org.qt-project.QtCore             0x000000010f5f227d QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 279
34  org.qt-project.QtWidgets          0x000000010fdcb937 QDialog::exec() + 231
35  freeciv-qt                        0x000000010d940dff show_tileset_error + 751 (dialogs.cpp:4371)
36  freeciv-qt                        0x000000010dace81c tileset_error + 572 (tilespec.c:637)
37  freeciv-qt                        0x000000010dad6114 tileset_setup_extra + 356 (tilespec.c:3891)
38  freeciv-qt                        0x000000010dad3e51 tilespec_reread + 1521 (tilespec.c:1461)
39  freeciv-qt                        0x000000010d9c758c mr_menu::load_new_tileset() + 204 (menu.cpp:3664)

...

Looks like it's trying to redraw the map while the dlog is up, even though we're about to exit. Not sure I want to open a new issue for this since I can't reliably reproduce.

So bottom line - yes mark this invalid, it's a wild goose I don't want to chase.

Actions

Also available in: Atom PDF