triplea
triplea copied to clipboard
Sections of display shown at the wrong places; some areas are just white
Reproduction Steps
- Start any game
- Play for a while (in Napoleonic Empires it happens during the first turn)
Attach a Save Game
When I save the game and reload it, the error is gone. I need to play for a while, and the error comes back.
Engine Version: current head (2.6.x)
It also happens with PR #9944 applied
@RaiNova Did you experience this only for map Napoleonic Empires? Moving the map view or playing further steps resolve this display issue?
It happens in all games I played. Moving the window doesn‘t help. Playing on leads to worse results. Save, exit und restart helps for a while … then it comes againGesendet mit der GMX Mail AppAm 31.03.22 um 21:49 schrieb frigoref
Von: "frigoref" ***@***.***>Datum: 31. März 2022An: "triplea-game/triplea" ***@***.***>Cc: "Raimund Neumann" ***@***.***>,"Mention" ***@***.***>Betreff: Re: [triplea-game/triplea] Sections of display shown at the wrong places; some areas are just white (Issue #10056)
@RaiNova Did you experience this only for map Napoleonic Empires? Moving the map view or playing further steps resolve this display issue?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
This is quite bad to still be seeing this problem. Git Bisecting this issue might be one of the only ways to find out when this problem started happening, but I hate to think how time consuming that bisection task would be...
We may want to try downgrading any kind of UI libraries. It's maybe equally likely the problem is in a graphics dependency (eg: substance) or is in the TripleA code.
@RaiNova , try switching the Look & Feel please in case this is specific to one. 'metal' is a good one to try as that is the most bare-bones.
@DanVanAtta Are you sure the whole image splitting - which I guess is related to this bug - is still necessary? Can a PC in 2022 not handle a single large background image?
@DanVanAtta I'm seeing this fairly consistently with the current 2.5.x release and have installed a few recent 2.6 nightlies (1471 for example). I'm a developer by day, although not in java, so I'm pretty familiar with git and git bisect, if you give me guidance on what system packages to check (should I try different java versions), I can try bisecting backwards. Since I saw it on 2.5.x also, I'm pretty sure it's been happening long before 2.6 betas. I usually run from the windows packages so if it's easy to checkout out a commit sha and build it, I can try bisecting as far back as I can.
Thanks and I really appreciate you and all the developers work on this project. It's quite nice to play when you don't have family or friends nearby who are into this game.
@jrafanie what platform are you on? If on Linux, what version of Java?
In the original screenshot on this bug, I see it's affecting the messagebox and not just the map, which suggests it's not a TripleA bug (since we use standard Java Swing API for messageboxes and don't draw them ourselves).
So I would also suggest updating graphics card drivers.
@asvitkine Thanks for replying! I'm on windows 11, AMD 5700x CPU with AMD Radeon 6700xt with the latest drivers.
It seems to think the window is in a different location so it draws the same data multiple times. I see it happen on the menu system where I have to figure out how to save when the menu shows "save" multiple times so I can save, exit the app and reload. I see it in the right side pane where it shows the purchased units to place/country IPC count/units, etc. That right side pane will often show white where as other UI elements show "game UI elements" redrawn over the existing in the wrong place.
I can't tell if it's a map issue, a UI problem, or possibly both. I do see it happen even with the metal UI theme (after also seeing it with other themes) with the World War II v3, World War II Revised, World War II Classic (blitz edition), World War II v5 1942, and possibly others. Sometimes it happens within a few minutes and other times, it can take 2-3 turns. I swear it happens if I move or resize the "purchase" or "battle" dialog boxes.
I have two monitors with different screen resolutions, 1440p and 1080p, connected and I've tried playing with just on one of those to see if that was related but that didn't seem prevent it.
Would it be helpful to record the different ways I see the improper drawing?
What could I do to debug it? The debug console in the app doesn't really show anything.
Is there anything specific in the java swing API we're using here that I could try searching on github for? I wonder if there's something I can disable in swing to help debug/diagnose what I'm seeing.
Thanks!
For example, this is what I see. I even had it happen on the dashboard page even before picking a game type.
Later tonight I'm going to try two things, one at a time.
- I didn't have tripleA listed in windows 11 in system -> display -> graphics, so I'll see if any of the options fix it.
- I'll try the
J2D_D3D=false
env var or-Dsun.java2d.d3d=false
inProgram File\TripleA\TripleA.vmoptions
This second idea comes from https://stackoverflow.com/questions/22737535/swing-rendering-appears-broken-in-jdk-1-8-correct-in-jdk-1-7 and https://www.reddit.com/r/learnjava/comments/u0u8u4/graphical_glitchesdisplay_problemsscreen/
If either workaround resolve it, I'll see if I can try older/newer graphic drivers.
EDIT: The only solution seems to be disabling d3d in the vmoptions. Updating or downgrading AMD 6700xt drivers or telling windows to treat the application differently didn't seem to help
If either workaround resolve it, I'll see if I can try older/newer graphic drivers.
To give a quick update, I was able to recreate the issue with "system -> display -> graphic" options, so that didn't prevent it. I can't tell if it's less likely to occur but it did happen. On the other hand, I played many rounds with -Dsun.java2d.d3d=false
and it didn't happen.
FYI, other issues seem to call this problem screen tearing or overdraw:
https://github.com/hneemann/Digital/issues/227 https://github.com/richardwilkes/gcs/issues/387
From the second link:
From what I can tell the bug seems then be connected to the 3D rendering and activating two different widgets, like Dropdown menus, which are almost always bugged, and tooltip will instantly produces the tearing. I can't find where I read it but it might have something to do with repaint(). But as it only appeared now after my reinstall it feels like it might not be a software problem. But I don't know...
I will test more with -Dsun.java2d.d3d=false in Program File\TripleA\TripleA.vmoptions
to see if that is a viable workaround. If that works, I will verify I can still easily recreate the screen tearing without it, then try first DDU my 6700xt drivers and reinstall, then test again, then if still happening, try fiddling with directx to see if there are updates or something reported as wrong in terms of hardware acceleration.
FYI, just providing an update, my issues with screen tearing/overdraw seem to be resolved with -Dsun.java2d.d3d=false
in Program Files\TripleA\TripleA.vmoptions
. Perhaps it's a buggy implementation of direct3d in AMD drivers but I've been through multiple versions of 6700xt drivers and multiple nightly builds of tripleA and the only thing that seems to resolve it is disabling d3d. If anyone runs into this problem, try that as a solution.
If there's more debugging information I can provide, let me know. For now, I'll continue using this in my vmoptions file:
-Xss1250K
-Dsun.java2d.d3d=false