robocode-dev / tank-royale

Git repository for Robocode Tank Royale
Apache License 2.0
122 stars 23 forks source link

GUI: Unreadable Server Log on NixOS #77

Closed SirStone closed 6 months ago

SirStone commented 7 months ago

Describe the bug Dunno if this is only on my machine but when I open the server logs in the GUI I see white characters on a light grey background, making the all logs not readable if not highlighted or copied somewhere else.

To Reproduce open the GUI, run a server and open "Show Server Log"

Screenshots Screenshot from 2023-11-12 15-39-44

Desktop (please complete the following information): Apple Inc. MacBookPro9,2 NixOS 23.05 GNOME Version 44.2 Windowing System Wayland Kernel Version 6.1.61

Java info: openjdk version "21" 2023-09-19 OpenJDK Runtime Environment Zulu21.28+85-CA (build 21+35) OpenJDK 64-Bit Server VM Zulu21.28+85-CA (build 21+35, mixed mode, sharing)

Additional context I want emphasize that this could be really caused by my desktop. I don't even want to push on this, I don't really need to se these logs right now.

flemming-n-larsen commented 7 months ago

It seems like it is the background color that is wrong and not the text color. The background color should have been dark grey. I am using a JEditorTextPane with HTML content and CSS stylesheets. I bet the background color needs to be set as a style.

flemming-n-larsen commented 7 months ago

@SirStone

I made some fixes for the Server Log, which I have verified on Windows and Ubuntu/Linux.

You can try out this beta version: https://robocode.dev/tankroyale/files/robocode-tankroyale-gui-0.21.2-beta.jar

If it works, I will make a new release containing this fix. 🙂👍

SirStone commented 7 months ago

Nope, and looking for the version from the GUI I've found out that even the "About" page is white over light gray background image

flemming-n-larsen commented 7 months ago

Thank you for the follow-up. I will see if setting the background as well might fix the issue, so I will upload another version soon. This issue is weird, as it works for, e.g. Ubuntu/Linux and the WSL running on Ubuntu with an X server. But this is no excuse for the bug. It needs to be fixed. 😉

flemming-n-larsen commented 7 months ago

@SirStone Okay. I have now made another version, where I set the background colors for the Server console (and bot console) + about box. Here is an updated version containing this fix: https://robocode.dev/tankroyale/files/robocode-tankroyale-gui-0.21.2-beta-2.jar

If this does not work, I need to use an entirely other solution to make it work.

SirStone commented 7 months ago

Now I see the "about" page fixed but the console is still messed up, but differently, the green part is not my highlighting, it came out like this on it's own. image

flemming-n-larsen commented 7 months ago

Thank you for the follow-up. Okay. So at least some progress with the about box. I did set the text color to black in this case. With the bot console, both the background color of the panel and the CSS have been set to dark grey. So it is strange it does not work on your system.

I will try something else later.

flemming-n-larsen commented 7 months ago

@SirStone I have now installed NixOS 23.05 (on VirtualBox) and installed the Open JDK (nixos.openjdk17-bootstrap). This is a snapshot from the server console. I get the green markings like you, but I do get the correct background color:

image

I will try to use the Zulu version as well, which I expect to cause the issue.

flemming-n-larsen commented 7 months ago

I have now removed the Open JDK and now use the Zulu Java vendor (nixos.zulu) instead.

Here I see the same issue with the background color missing. So the issue exists when using the Zulu version of Java. I will see if I can fix it when I am able to see it on my local machine. 🙂

flemming-n-larsen commented 7 months ago

@SirStone A fix is available with the new release 0.22.0.

I have rewritten to code behind both the Bot Console and Server Console, which improves the performance, and fixes lots of other issues. I tested it on NixOS, and it seems to work. 😊

SirStone commented 7 months ago

yes! It works! Screenshot from 2023-12-04 22-51-39

Thanks Larsen, you're the best! (and destroy the rest!) :P

flemming-n-larsen commented 7 months ago

yes! It works! Thanks Larsen, you're the best! (and destroy the rest!) :P

Haha... Thank you for the feedback 👍😊

SirStone commented 6 months ago

mmm I need to reopen this. I can't say if I noticed this after the updates or was already present before. Looks like the bug affecting the logs and others components is affecting the popups. Here some screenshots:

mouse over TPS

mouse over TPS

mouse over the bot

Screenshot from 2023-12-24 11-56-21

flemming-n-larsen commented 6 months ago

@SirStone This is a new issue. The old one #77 has been fixed, but you definitely discovered a new one. Hence, I have created #81 to cover the new one, and I close this one.