NationalSecurityAgency / ghidra

Ghidra is a software reverse engineering (SRE) framework
https://www.nsa.gov/ghidra
Apache License 2.0
51.49k stars 5.86k forks source link

GUI icons not rendering correctly on Ubuntu 22.04 #4400

Closed JSquared-dev closed 2 years ago

JSquared-dev commented 2 years ago

Describe the bug Many GUI icons will sporadically render with the incorrect icon, making GUI navigation more difficult.

To Reproduce Steps to reproduce the behavior:

  1. Create a new Ubuntu 22.04 VM
  2. Update all packages to latest
  3. Install openjdk 11 and Ghidra
  4. Run Ghidra and open any binary in the code browser
  5. See some icons will sporadically be incorrect.

Expected behavior The icons to render with the correct images.

Screenshots IconBugExample1 IconBugExample2

Environment (please complete the following information):

Additional context This appears to be very sporadic and non-deterministic. Some times the GUI will fully refresh upon opening a file and the icons will look fine, but other times it will get stuck with (presumably cached) incorrect icons on buttons and other UI controls.

I've also tried running Ghidra with the latest openjdk-17 packages in Ubuntu 22.04 and it suffers from similar issues.

Some icons will be fixed in certain circumstances. For example, if the Decompiler view title bar buttons render incorrectly when the code browser opens; navigating to a new function, thereby triggering the Decompiler view to update, will typically refresh these icons and they will be fixed. But this does not impact other icons which will stay broken for the duration that ghidra is running.

dev747368 commented 2 years ago

I've been running Ghidra on Ubuntu 22.04 for a bit and haven't seen this, both as a normal install and a wsl2 VM.

Do you have the ability to try other linux distro's on your setup? What kind of VM host are you using?

ryanmkurtz commented 2 years ago

Did you change any Ubuntu settings from the default, such as scaling?

JSquared-dev commented 2 years ago

I'm using VMWare Workstation, but have also seen this issue in VirtualBox. Both across multiple different devices.

Interestingly, rolling back to 20.04 seems to make the issue disappear, at least in the 10 or so test runs I've done. Haven't got extensive usage to confirm it's completely gone, as it's not always prominent or apparent in the same location each time.

I've not changed any ubuntu settings from defaults. However, I have tested with Workstation's auto size feature enabled and disabled and the issue persists regardless of this setting.

ryanmkurtz commented 2 years ago

I've been trying to reproduce this but cannot. Even if I could, it's likely a platform-related issue and there wouldn't be any code fix we could add to Ghidra for it. Because there is no action for us to take at this time, I am going to close it. We can reopen it later if new information comes in.

emteere commented 1 year ago

There was another user with a similar environment and issue VMWARE using Ubuntu 22.04 They were able to fix the issue by setting VMARGS=-Dsun.java2d.opengl=true in the /support/launch.properties file.

Most likely related to VMWare rendering acceleration.

ivhacks commented 7 months ago

Thank you so much.

If there's still interest in reproducing, here's my setup: VMWare Workstation 16 Pro 16.2.5 build-20904516 Windows 11 Pro 23H2 22631.3296 Host Ubuntu 22.04.4 Guest, pretty much fresh install, containing: OpenJDK 21.0.2 2024-01-16 Ghidra 11.0.1