Cataclysm-dda: Color manager generates erroneous colors

Created on 12 Jan 2016  路  5Comments  路  Source: CleverRaven/Cataclysm-DDA

debug.log contains a lot of stuff like this:

11:51:18.788 : couldn't parse color: c_cyan_cyan_cyan
11:51:18.788 : couldn't parse color: c_ltcyan_cyan_white
11:51:18.788 : couldn't parse color: c_magenta_cyan_red
11:51:18.788 : couldn't parse color: c_magenta_cyan_white
11:51:18.788 : couldn't parse color: c_magenta_cyan_green
11:51:18.788 : couldn't parse color: c_magenta_cyan_yellow
11:51:18.788 : couldn't parse color: c_magenta_cyan_magenta

It became obvious after landing of #14593.

(S2 - Confirmed) <Bug> [C++]

Most helpful comment

Yes, it still happens.

Steps to reproduce:
1) compile or download the recent version of application;
2) remove .\config\debug.log if it exists;
3) run the game;
4) it's ok just to close the application right after loading of main menu;
5) review freshly created file .\config\debug.log;

Got this:

0:49:51.189 : Starting log.
0:49:52.834 : couldn't parse color: c_black_red
0:49:52.834 : couldn't parse color: h_blue_red
0:49:52.834 : couldn't parse color: h_blue_white
0:49:52.834 : couldn't parse color: h_blue_green
...

All 5 comments

The color_manager::finalize() code iterates over all possibilities of
color+hilight combinations, the majority of which don't exist, e.g.
c_black_red, c_magenta_cyan_white, creating a huge amount of
errors in the log.

See https://github.com/CleverRaven/Cataclysm-DDA/blob/9002859222d72f8492a211f0859ec19bf9583217/src/color.cpp#L81

Should we suppress this debug message?

No, we need to fix the underlying issue.

Is this still happening? People have worked on the color manager since.

Yes, it still happens.

Steps to reproduce:
1) compile or download the recent version of application;
2) remove .\config\debug.log if it exists;
3) run the game;
4) it's ok just to close the application right after loading of main menu;
5) review freshly created file .\config\debug.log;

Got this:

0:49:51.189 : Starting log.
0:49:52.834 : couldn't parse color: c_black_red
0:49:52.834 : couldn't parse color: h_blue_red
0:49:52.834 : couldn't parse color: h_blue_white
0:49:52.834 : couldn't parse color: h_blue_green
...
Was this page helpful?
0 / 5 - 0 ratings