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

Gibberish around some text in curses build #39361

Closed
Jookia opened this issue Apr 8, 2020 · 7 comments
Closed

Gibberish around some text in curses build #39361

Jookia opened this issue Apr 8, 2020 · 7 comments

Comments

@Jookia
Copy link
Contributor

Jookia commented Apr 8, 2020

Describe the bug

On master in the curses build some text is appended or prepended with junk like '-BM-(', '-bTP', '~b-T-~T', 'M-BM-'. Line wraps seem to include garbage too include ampersands. These additional characters cause text to overflow to the next line in some windows in the game like the inventory.

Steps To Reproduce

Start the game and go to the 'new game' menu. It should have some garbage if your terminal is narrow enough for it to line wrap. Otherwise enter the game itself and look at the UI.

Expected behavior

I expect the text to look something like the graphics version where there isn't this extra text that looks like escape codes.

Screenshots

2020-04-08-202401_1280x1024_scrot

Versions and configuration


20:40:19.038 : Starting log.
20:40:19.039 INFO : Cataclysm DDA version 0.D-13905-g7afe3c1b8a
20:40:21.908 WARNING : opendir [/home/jookia/.cataclysm-dda/mods/] failed with "No such file or directory".
20:41:04.558 WARNING : opendir [/home/jookia/.cataclysm-dda/save/Lenexa/mods] failed with "No such file or directory".
20:42:12.707 : GAME REPORT:

  • OS: Linux
    • OS Version: Distributor ID: Debian; Description: Debian GNU/Linux 10 (buster); Release: 10; Codename: buster;
  • Game Version: 0.D-13905-g7afe3c1b8a [32-bit]
  • Graphics Version: Curses
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    C.R.I.T Expansion Mod [crt_expansion],
    DinoMod [DinoMod],
    Graphical Overmap [Graphical_Overmap],
    Stats Through Skills [StatsThroughSkills]
    ]

20:42:24.411 : Log shutdown.

Additional context

Compiler is arm-linux-gnueabihf-gcc-8, extra build flags are -fsigned-char

Describe the bug

On master in the curses build some text is appended or prepended with junk like '-BM-(', '-bTP', '~b-T-~T', 'M-BM-'. Line wraps seem to include garbage too include ampersands. These additional characters cause text to overflow to the next line in some windows in the game like the inventory.

Steps To Reproduce

Start the game and go to the 'new game' menu. It should have some garbage if your terminal is narrow enough for it to line wrap. Otherwise enter the game itself and look at the UI.

Expected behavior

I expect the text to look something like the graphics version where there isn't this extra text that looks like escape codes.

Screenshots

2020-04-08-202401_1280x1024_scrot

Versions and configuration


20:40:19.038 : Starting log.
20:40:19.039 INFO : Cataclysm DDA version 0.D-13905-g7afe3c1b8a
20:40:21.908 WARNING : opendir [/home/jookia/.cataclysm-dda/mods/] failed with "No such file or directory".
20:41:04.558 WARNING : opendir [/home/jookia/.cataclysm-dda/save/Lenexa/mods] failed with "No such file or directory".
20:42:12.707 : GAME REPORT:

  • OS: Linux
    • OS Version: Distributor ID: Debian; Description: Debian GNU/Linux 10 (buster); Release: 10; Codename: buster;
  • Game Version: 0.D-13905-g7afe3c1b8a [32-bit]
  • Graphics Version: Curses
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    C.R.I.T Expansion Mod [crt_expansion],
    DinoMod [DinoMod],
    Graphical Overmap [Graphical_Overmap],
    Stats Through Skills [StatsThroughSkills]
    ]

20:42:24.411 : Log shutdown.

Additional context

Compiler is arm-linux-gnueabihf-gcc-8, built with '-fsigned-char' to avoid the build breaking.

@ZhilkinSerg
Copy link
Contributor

Please try compiling with LOCALIZE=1 and see if it will display Unicode characters properly.

@jbytheway
Copy link
Contributor

It looks like might be related to the terminal escapes used to change colour. What terminal are you running in? Do other things which use colour work fine? What about other curses apps?

@ZhilkinSerg
Copy link
Contributor

It looks like might be related to the terminal escapes used to change colour. What terminal are you running in? Do other things which use colour work fine? What about other curses apps?

I am pretty sure it is because of the following in the Makefile:

  ifeq ($(LOCALIZE),1)
    NCURSES_PREFIX = ncursesw
  else
    NCURSES_PREFIX = ncurses
  endif

@Jookia
Copy link
Contributor Author

Jookia commented Apr 8, 2020 via email

@anothersimulacrum
Copy link
Member

We had someone yesterday who had this problem when compiling with CMake, but not with Make on the discord.

@Jookia
Copy link
Contributor Author

Jookia commented Apr 9, 2020 via email

@Jookia
Copy link
Contributor Author

Jookia commented Apr 9, 2020

I worked around it and can confirm that's the bug. Closing and moving discussion there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants