-
Notifications
You must be signed in to change notification settings - Fork 295
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
[0.49.15] Unit display general tab rendering blank when new unit selected. #4876
Comments
UPDATE |
UPDATE |
I've tried with the saved game and new games and I can't generate the same result. |
I'd guess this is due to some UI scale calculation or something, so it might not repro unless you have the same resolution and layout of desktop. @SimonLandmine can you provide the screen resolution and layout for all screens that make up your desktop? Not just resolution for each screen, but also orientation, relative position, and virtual desktop size (if you have multiple monitors)? |
I've been able to reproduce this on Windows 11 with Java 11. I've actually spend a few days trying to debug it. It's weird though, because I can capture the text being set on the JLabel for the general panel when selecting a new unit in the move phase - and have proven there is nothing wrong with the fonts, size, etc. I even, in my debugger put code in to override the text going into the general panel so that it says, "Hello World" and It still shows blank when selecting a new unit. (if you hit the mouse 4 button to hide the panel and then reshow it - it then displays.) I had a theory that there was some setting in the boardview scaling that "hid" text when zooming all the way out, but confirmed that has nothing to do with the mech display general tab. This almost seems like a Java Swing bug. But I'm not convinced because it is SOMEHOW linked to boardview scaling - but could it be memory? or concurrency related. I even tried putting in debug code to force repaint, redraw the panel, and lable and still had the same blank result until hiding and unhiding the dialog, or scaling the map in 2 clicks and then selecting a new unit - at which time the general panel is then displayed correctly. I created a game with 1 board, 5 units and was able to reproduce the issue. My next step was to see if somehow the z-layer setting on the JLabel was somehow rendering behind the background... |
I could reproduce this with docked and undocked layouts. I am using a single monitor - I haven't tried with a multi-monitor setup. I'm using default jvm settings and memory settings. |
Yes - I can get it to occur consistently when the map is zoomed all the way out at the two most zoomed out levels. I wonder if its a Java 11 vs Java 17 issue. Can you get this issue to occur when you only allocate 4G ram for Megamek? |
zoom out the game board to max level and I it get it with 8G |
I did find a code change that fixes this issue on my machine - but I need to do some more testing with it because I can't 100% explain why the change works. But I do have a theory. |
Sorry @Sleet01, was away from the home machine, although it looks like @HoneySkull may have a possible fix. Monitor specs are ... |
#4876 Fix Unit Display General tab rendered blank when switching units.
0.49.15 standalone MM
Windows 10
Java11
Each time it is my turn to move (or when I switch which mech I wish to move), the 'general' tab of the unit display becomes completely blank (see screenshot). This is the case whether the display is docked or floating.
Using 'switch location' will force a refresh, as does 'switch view', but selecting a different mech to use will cause the error again.
Savegame: user 'SimonLandmine'
Woodland_2023-11-06_03-49.sav.gz
The text was updated successfully, but these errors were encountered: