Wargus / stratagus

The Stratagus strategy game engine
GNU General Public License v2.0
622 stars 119 forks source link

[macOS] Regression: Black text on main menu in Wargus (Stratagus bug) #596

Closed shinra-electric closed 6 months ago

shinra-electric commented 9 months ago

This was a tricky one to track down...

When building Wargus recently I noticed the text on the main menu was black. What was odd was that older builds I had archived also had the same issue, whereas they didn't before. However, after a lot of testing I was able to replicate the issue.

584 /fix/typos 7b2d62e10098f2f310aca352de84568936a0fafb - OK - White/yellow text

583 /guichan_official_patched_0_4_0 311a68418cb48e469c84e6fc2065243360150233 - Broken build

588 /mng a1bd75ec845eb36b6a55dcc2fe1a174a21f1b395 - Broken build

589 /palette_typo 4c213cc945efc52f4e602f67fa76a09d2f19f839 - Broken build

592 /guichan_fix fb35843c7e931e96a54798bc08a40277270a684c - Build fix - Black Text

Screenshots:

584:

Screenshot 2023-12-19 at 23 45 05

592:

Screenshot 2023-12-19 at 23 46 42

So the issue that causes the black text is somewhere in between those PRs.

But the reason why this was confusing to track down was that after I opened a build with the bug, any working builds would also have black text until I deleted the Stratagus source folder. After deleting it, the older working builds reverted to white text. I assume this is related to this issue with wartool, where the rpath is not working.

Jarod42 commented 9 months ago

I updated to last guichan (0.9.0) (with some patches)... Seems I miss some regressions :-/ Unfortunately, I don't have macOS, and code works locally (on Windows). I will see if something related to font might be problematic, but unsure to found it :-/

Jarod42 commented 8 months ago

guisan (a guichan fork) has similar/worse issue... So I really bet for a bug in guichan between 0.4.0 (2005 may 11th) and guisan fork (2007 dec 22th).

zzam commented 6 months ago

The same issue happens for me on linux. I bisected it to (equals https://github.com/Wargus/stratagus/pull/585):

4d7c864520a2185794767f028a92c37c2a3158fc is the first bad commit
commit 4d7c864520a2185794767f028a92c37c2a3158fc
Author: Jarod42 <Jarod42@users.noreply.github.com>
Date:   Sun Nov 19 10:57:14 2023 +0100

    Migrate to latest Guichan.

 src/editor/editloop.cpp |   21 +-
 src/include/font.h      |    2 +-
 src/include/movie.h     |   24 +-
 src/include/video.h     |   26 +-
 src/include/widgets.h   |  205 ++++-----
 src/sound/sound.cpp     |    2 +-
 src/tolua/ui.pkg        |   72 ++--
 src/ui/botpanel.cpp     |    9 +-
 src/ui/mouse.cpp        |   10 +-
 src/ui/widgets.cpp      | 1083 ++++++++++++++++++++---------------------------
 src/video/font.cpp      |   20 +-
 src/video/graphic.cpp   |    1 -
 src/video/mng.cpp       |   20 +-
 src/video/movie.cpp     |   68 +--
 src/video/video.cpp     |    4 +-
 third-party             |    2 +-
 16 files changed, 670 insertions(+), 899 deletions(-)
Jarod42 commented 6 months ago

Should be fixed by above PR.

shinra-electric commented 6 months ago

Yes, I can confirm it's fixed.

Thanks 👍🏼