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

Client crashes at login, because of citygovenorsetting #2331

Closed
Attenfc opened this issue Aug 1, 2024 · 7 comments
Closed

Client crashes at login, because of citygovenorsetting #2331

Attenfc opened this issue Aug 1, 2024 · 7 comments
Labels
bug Something isn't working Untriaged This issue or PR needs triaging

Comments

@Attenfc
Copy link

Attenfc commented Aug 1, 2024

I made a setting in citygovenor, that now causes my client to crash every time I try to log in.

I had a city, with population 2, that only needed 1 more food to grow, so I tried different govenors.
On Prefer Gold I noticed it made a taxspecialist - when I unchecked 'allow specialists' - then my client crashed.
I might have enabled 'optimize'.

Now the freeciv client crashes every time I log in.
I am on linux/debian, so I created a new useraccount and a new client (to make sure I am free from user config, temp and cache files), but it still crashes at login.

The error message (in the terminal) is:
terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
Aborted

Expected behavior
That the client does not crash - or allow me to disable the citygovenor.

Screenshots
The crash happens immediately after login - with no time to make screenshot.

Platform and version (please complete the following information):

  • OS: Linux/Debian 12
  • Freeciv21 version: freeciv21-client 3.1-beta.1
  • Ruleset/Longturn game (if applicable): LT85 - user Akhenaten

Additional context
I guess, without insight, it could be the citysetting on the server that causes the client to crash when log in.
The client connects fine to another game.

@Attenfc Attenfc added bug Something isn't working Untriaged This issue or PR needs triaging labels Aug 1, 2024
@Attenfc
Copy link
Author

Attenfc commented Aug 1, 2024

I reproduced the crash on a local game.
A city with population 2.
Chosing govenor prefer gold, seeing a taxcollector..
When unselecting allow specialist the client crashes.
Also with govenor prefer science, seing a scientist, unselecting allow specialist, causes the client to crash.
I can reload the game, that was saved a turnbegin, and it works fine.
I guess it is the customgovenor that cannot handle the existing specialist, when not allowing them.

@blabber
Copy link
Collaborator

blabber commented Aug 1, 2024

@Attenfc, could you provide a savegame for the local game in which you could reproduce the issue?

@Attenfc
Copy link
Author

Attenfc commented Aug 1, 2024

t28_jordan.sav.gz
In two different cities I just tried to uncheck 'allow specialist' and in both cases the client crashed - regardless of the govenor (prefer gold or prefer food).

@blabber
Copy link
Collaborator

blabber commented Aug 1, 2024

I can reproduce this is issue and it seems as if you are not playing one of our official builds, right? Can you confirm that you are playing on a self compiled client from master?

If yes, please try with one of pre-built releases. Master has a bug in the caching of specialist outputs, that was introduced after we rolled out 3.1-beta.1.

blabber added a commit to blabber/freeciv21 that referenced this issue Aug 1, 2024
Discovered while debugging the following behavior: Disallowing
specialists for a governor that already has assigned specialists
crashed the client.

The cause was that in `add_specialist_output` accessing items in
`pcsoutputs` failed, as it was empty.

Closes longturn#2331.
@Attenfc
Copy link
Author

Attenfc commented Aug 1, 2024

Yes, I build from a master i cloned in may - I did not know any better.
Now I try to build from https://github.com/longturn/freeciv21/releases/download/v3.0-patch.4/Freeciv21-v3.0-patch.4.tar.gz
I assume this is what you mean with pre-built release?

@jwrober
Copy link
Collaborator

jwrober commented Aug 1, 2024

We offer pre-compiled binaries - https://longturn.readthedocs.io/en/latest/Getting/install.html. You don't have to build all the time.

@Attenfc
Copy link
Author

Attenfc commented Aug 1, 2024

My specific issue is now solved.
I built from https://github.com/longturn/freeciv21/releases/download/v3.0-patch.4/Freeciv21-v3.0-patch.4.tar.gz
and are thereby running client version freeciv21-client 3.0.940577.3-patch
which allows me to login, and I looks like I can play my turn now.

Thank you very much for the fast response and clarifications.

I must carefully reread some docs to find the actual prebuilt release binary - I always end up with a file that only has source - but it builds fine in 10 min, so I dont mind.

@Attenfc Attenfc closed this as completed Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Untriaged This issue or PR needs triaging
Projects
None yet
Development

No branches or pull requests

3 participants