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 `language' failed in debug builds #6454

Closed
bunnybot opened this issue May 17, 2024 · 7 comments
Closed

Assertion `language' failed in debug builds #6454

bunnybot opened this issue May 17, 2024 · 7 comments
Assignees
Labels
bug Something isn't working internationalization Translation system, string fixes, RTL support regression This used to work...
Milestone

Comments

@bunnybot
Copy link

frankystoneMirrored from Codeberg
Created on Fri May 17 17:47:58 CEST 2024 by frankystone


Sorry for being late, but a debug build with current master won't start for me:

$:> ./widelands 
This is Widelands version 1.3~git26633 (524a53c@master) Debug
[00:00:00.000 real] INFO: Set home directory: /home/kaputtnik/.widelands
[00:00:00.000 real] INFO: Set configuration file: /home/kaputtnik/.widelands/config
[00:00:00.000 real] INFO: Widelands executable directory: /home/kaputtnik/Quellcode/widelands-repo/widelands/
[00:00:00.000 real] INFO: Adding data directory: /home/kaputtnik/Quellcode/widelands-repo/widelands/data
widelands: /home/kaputtnik/Quellcode/widelands-repo/widelands/src/third_party/tinygettext/src/dictionary_manager.cpp:107: tinygettext::Dictionary& tinygettext::DictionaryManager::get_dictionary(const tinygettext::Language&): Assertion `language' failed.
Abgebrochen (Speicherabzug geschrieben)

A release build starts without problems.

To reproduce

  1. compile a debuge build ( i used ./compile.sh -d -a -s )
  2. try to start widelands
  3. See error

Expected behavior
A debug build should run.

Version:

  • OS: arch linux
  • Widelands Version: see above
  • Enabled Add-Ons:
@bunnybot bunnybot added the bug Something isn't working label May 17, 2024
@bunnybot bunnybot added this to the v1.3 milestone May 17, 2024
@bunnybot bunnybot added internationalization Translation system, string fixes, RTL support regression This used to work... needs information This issue seems incomplete labels May 17, 2024
@bunnybot
Copy link
Author

NordfrieseMirrored from Codeberg
On Fri May 17 18:06:12 CEST 2024, Benedikt Straub (Nordfriese) wrote:


I can't reproduce. What is the language setting in your Widelands config file, and what is the output of locale?

@bunnybot
Copy link
Author

frankystoneMirrored from Codeberg
On Fri May 17 18:09:16 CEST 2024, frankystone wrote:


In the config the language is empty:

language=

Starting with version 1.2 the options says "System language".

$:> locale
LANG=de_DE.UTF-8
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE=C
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=

@bunnybot
Copy link
Author

frankystoneMirrored from Codeberg
On Fri May 17 18:18:42 CEST 2024, frankystone wrote:


If i set the language with v1.2 to German and starting current master it works. config says: language='de'
If i set "Try system language" with v1.2 current master won't run. config says: language=

@bunnybot
Copy link
Author

NordfrieseMirrored from Codeberg
On Fri May 17 18:20:10 CEST 2024, Benedikt Straub (Nordfriese) wrote:


I can reproduce the system by setting LANG=C or LANGUAGE=C before startup (with language set to try system language). Interestingly all of nds, nds_DE and nds_DE.UTF-8 work fine.

What is the value of the LANGUAGE environment variable? If I set it to a preference list such as nds:de I also get the assert.

So we should sanitize the system locale candidates we find in init_locale() and skip languages that are not known to tinygettext (with special treatment for C which we should alias to en).

@bunnybot
Copy link
Author

frankystoneMirrored from Codeberg
On Fri May 17 18:23:43 CEST 2024, frankystone wrote:


The environment variable shows LANGUAGE=de:en_GB don't know why anymore though 😄

@bunnybot bunnybot self-assigned this May 17, 2024
@bunnybot
Copy link
Author

Assigned to Nordfriese

@bunnybot
Copy link
Author

frankystoneMirrored from Codeberg
On Fri May 17 18:29:18 CEST 2024, frankystone wrote:


Don't know if it is related, but in the archlinux forums it is always recommended to use LC_ALL=C command to run the command with English environment. If feasible this should also apply to widelands: LC_ALL=C ./widelands

@bunnybot bunnybot removed the needs information This issue seems incomplete label May 17, 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 internationalization Translation system, string fixes, RTL support regression This used to work...
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant