Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion nation_check(pplayer->nation) failed #2195

Closed
jwrober opened this issue Feb 8, 2024 · 2 comments · Fixed by #2219
Closed

Assertion nation_check(pplayer->nation) failed #2195

jwrober opened this issue Feb 8, 2024 · 2 comments · Fixed by #2219
Assignees
Labels
bug Something isn't working gui This issue requires changes to the user interface

Comments

@jwrober
Copy link
Collaborator

jwrober commented Feb 8, 2024

Describe the bug
Two assertions

nation.cpp:422 - Assertion nation_check(pplayer->nation) failed
nation.cpp:466 - Assertion nullptr != pnation failed

To Reproduce
Steps to reproduce the behavior:

  1. Start a server
  2. Connect to network game
  3. Take a nation
  4. Click disconnect
  5. See error

Expected behavior
No error

Screenshots
N/A

Platform and version (please complete the following information):

  • OS: Linux
  • Freeciv21 version: 3.1-alpha.5
  • Ruleset/Longturn game (if applicable): LTT

Additional context
Not sure it matters, but came up while testing map gen recipes.

@jwrober jwrober added bug Something isn't working Untriaged This issue or PR needs triaging labels Feb 8, 2024
@blabber
Copy link
Collaborator

blabber commented Feb 17, 2024

The mention of this issue from the LTT-LTX pull request was an mistake. Please ignore, I can't remove the reference.

@lmoureaux
Copy link
Contributor

Stack trace:

#0  fc_assert_handle_failure(char const*, char const*, int, char const*, QString const&)
    (condition=0x555555b1f598 "nation_check(pplayer->nation)", file=0x555555b1eea8 "/home/louis/Personal/freeciv21/common/nation.cpp", line=422, function=0x555555b1f558 "nation_type* nation_of_player(const player*)", message=...) at /home/louis/Personal/freeciv21/utility/log.cpp:224
#1  0x000055555589ae08 in nation_of_player(player const*) (pplayer=0x555559c06aa0) at /home/louis/Personal/freeciv21/common/nation.cpp:422
#2  0x000055555570d679 in pageGame::reloadSidebarIcons() (this=0x5555562caa60) at /home/louis/Personal/freeciv21/client/page_game.cpp:238
#3  0x00005555557fcce4 in update_top_bar_diplomacy_status(bool) (notify=false) at /home/louis/Personal/freeciv21/client/views/view_nations.cpp:1045
#4  0x000055555565a888 in close_all_diplomacy_dialogs() () at /home/louis/Personal/freeciv21/client/diplodlg.cpp:978
#5  0x000055555561e0e2 in set_client_state(client_states) (newstate=C_S_DISCONNECTED) at /home/louis/Personal/freeciv21/client/client_main.cpp:804
#6  0x0000555555625f40 in close_socket_nomessage(connection*) (pc=0x555555c96a60 <client>) at /home/louis/Personal/freeciv21/client/clinet.cpp:61
#7  0x0000555555626e55 in disconnect_from_server() () at /home/louis/Personal/freeciv21/client/clinet.cpp:231
#8  0x00005555556640f4 in fc_client::slot_disconnect() (this=0x555556125db0) at /home/louis/Personal/freeciv21/client/fc_client.cpp:326

@lmoureaux lmoureaux added gui This issue requires changes to the user interface and removed Untriaged This issue or PR needs triaging labels Mar 17, 2024
@lmoureaux lmoureaux self-assigned this Mar 17, 2024
lmoureaux added a commit to lmoureaux/freeciv21 that referenced this issue Mar 17, 2024
Since it's used everywhere in the client code to determine the current
player, keeping it set to a dangling value triggers various assertions.

Closes longturn#2195.
lmoureaux added a commit that referenced this issue Mar 24, 2024
Since it's used everywhere in the client code to determine the current
player, keeping it set to a dangling value triggers various assertions.

Closes #2195.
lmoureaux added a commit that referenced this issue Mar 30, 2024
Since it's used everywhere in the client code to determine the current
player, keeping it set to a dangling value triggers various assertions.

Closes #2195.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working gui This issue requires changes to the user interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants