Skip to content

[Win32] Shell image broken #2037

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

Open
tmssngr opened this issue Apr 17, 2025 · 27 comments
Open

[Win32] Shell image broken #2037

tmssngr opened this issue Apr 17, 2025 · 27 comments

Comments

@tmssngr
Copy link
Contributor

tmssngr commented Apr 17, 2025

Describe the bug
After having upgraded SWT from commit 1ced8a9 to 3670670 in our application it happens occasionally that the image for some shell is missing.

To Reproduce
Unfortunately, I have not yet found a way to reproduce it reliably.

Expected behavior
The set image should be used. It work without problem until at least commit 1ced8a9.

Screenshots
Image

Environment:

  1. Select the platform(s) on which the behavior is seen:
    • All OS
    • Windows
    • Linux
    • macOS
  1. Additional OS info (e.g. OS version, Linux Desktop, etc)
    Windows 11
@tmssngr
Copy link
Contributor Author

tmssngr commented Apr 22, 2025

It looks like this behavior is not fixed, but changes during runtime (an invalid image can turn into a correct one).

@tmssngr
Copy link
Contributor Author

tmssngr commented Apr 24, 2025

As this screenshot indicates, the icon is set (see hover), but does not show correctly in the status bar
Image

@tmssngr
Copy link
Contributor Author

tmssngr commented Apr 28, 2025

@HeikoKlare Could this bug be resolved with your commit 28fdeb6?

@HeikoKlare
Copy link
Contributor

To be honest, I cannot say whether that commit might have fixed it. The mentioned commit fixes a slight change in behavior that was introduced in the recent months, but without knowing which commit extractly introduced the behavior you report and without being able to properly reproduce it, it's hard to say whether it is fixed now 😟

@HeikoKlare
Copy link
Contributor

HeikoKlare commented May 13, 2025

@tmssngr Can you please reevaluate with latest master state? We are not able to reproduce the issue.
There was another issue with the program icon used for the shell (#2139), but the issue was introduced after the problematic state you refer to. When doing the fix, we also did not experience your issue.

For a reproduction, please also report all relevant configuration (monitor setups, zoom, SWT configuration like autoscale etc.). It's likely that this is somehow related to specific autoscale settings and monitor zooms, but hard to analyze without knowing about the actual settings.

@fedejeanne
Copy link
Contributor

fedejeanne commented May 13, 2025

There was another issue with the program icon used for the shell (#2139), but the issue was introduced after the problematic state you refer to.

I just added a Workaround to #2139. In there, I mention if the window is not minimized then the issue does not occur. You could try that @tmssngr and see if that's also the case for you (i.e. in this issue). I assume we're all talking about the exact same issue, it's just tricky to nail it down.

@tmssngr
Copy link
Contributor Author

tmssngr commented May 13, 2025

I was not able to reliably reproduce the problem. After having switched to SWT commit b8dd804, I suggest to close this ticket for now and will reopen it if the problem occurs again.

@tmssngr tmssngr closed this as completed May 13, 2025
@fedejeanne
Copy link
Contributor

Hm, ok. I see that you used a commit that does not contain my fix for #2139 (b227750) so it might be indeed some other issue.

I'm fine with closing this issue until the problem is reproducible.

@HeikoKlare
Copy link
Contributor

This issue was there before the issue fixed with #2139 was introduced, so rather unlikely that the fix affected this PR. Still, there were so many changes to images that it might just have a been a "bad" development state in which the original issue occurred.

@tmssngr
Copy link
Contributor Author

tmssngr commented May 13, 2025

Right now the Windows taskbar shows no icon while the shell's left top and the Alt-Tab popup does. Hence I reopen.

Image
Is there anything I can debug to understand this problem?

@tmssngr tmssngr reopened this May 13, 2025
@HeikoKlare
Copy link
Contributor

First thing I would do is to collect all information on how to reproduce so that we can easily start debugging, i.e, the version of SWT, all zoom- and auto-scale-related settings, the workflow to achieve that result, ...

@tmssngr
Copy link
Contributor Author

tmssngr commented May 13, 2025

IIRC, I wrote that the problem is not reproducible reliably. Is there some assertion which can be added when setting the image to the shell?

@HannesWell
Copy link
Member

HannesWell commented May 13, 2025

I also see some missing icons at the Eclipse item in the Windows toolbar and IIRC also for the shell.
Currently it doesn't happen, but I'll keep an eye on it. My settings are:
Win10, 4K-Monitors at 175% zoom, swt.autoScale=quarter and swt.autoScale.method=SMOOTH.

@merks
Copy link
Contributor

merks commented May 13, 2025

I’ve seen this too but it comes and goes and is currently gone. My main monitor is at 100%.

@HeikoKlare
Copy link
Contributor

Do you know whether that might have been #2139 or is/was it something different?

Is there some assertion which can be added when setting the image to the shell?

I have to admit if all shell images (shell itself, application switch preview, taskbar etc.) are retrieved from the same image instance set at the same place. If that's the case, it is probably set via Decorations#setImages() where you could place an assertion.
If this behavior is a regression, it might be because of any of the changes to the Image class or because of a change to the according method in the Decorations class (#1879).

@tmssngr
Copy link
Contributor Author

tmssngr commented May 14, 2025

It definitely is a regression. It must have been introduced between 1ced8a9 (good) and 3670670 (bad). Sorry, I don't have a smaller range.

@Phillipus
Copy link
Contributor

@tmssngr Is the version of SWT with this issue in the latest version of SmartGit Preview? Does it occur in the main SG Shell or a child Shell? Any more clues (screen resolution, scaling?)

@tmssngr
Copy link
Contributor Author

tmssngr commented May 14, 2025

The latest SmartGit 25.1 preview build is based on b8dd804. The problem did not occur with the SWT build used in SmartGit 24.1. I have seen it for top level shells on Windows. My Windows machines use 150% and 175% zoom.

@HeikoKlare
Copy link
Contributor

The latest SmartGit 25.1 preview build is based on b8dd804.

Note that the mentioned commit is affected by #2139.
And note that throughout a development cycle, there may always be commits that introduce a regression (which is usually fixed short after). That's why it's so important to know about the state used when an issue was faced and, in best case, to retest on the current master state.
And for all potentiall HiDPI-related issues, it's important to know the auto-scale settings, the monitor configuration (how many monitors at which zooms and which of the is primary).

@tmssngr
Copy link
Contributor Author

tmssngr commented May 14, 2025

I just have one monitor here. So you suggest this bug might be fixed by updating to latest master?

@HeikoKlare
Copy link
Contributor

It might. The version you refer to definitely contained a bug regarding program icons (as documented in the referenced issue). Whether or nor that's the cause for the behavior you have faced is hard to say.

@HeikoKlare
Copy link
Contributor

I've heavily tested against this issue on latest master state:

  • Two monitors with changing zoom values: different on startup, changed at runtime, low difference and high difference (e.g. 125/200), with changes on both primary and secondary monitor
  • Monitor-specific scaling enabled and disabled, i.e., once with swt.autoScale=integer200 (default without monitor-specific scaling) and with swt.autoScale=quarter (default with monitor-specific scaling)

I was not able to produce a broken shell image in any of the use cases.

@merks
Copy link
Contributor

merks commented May 16, 2025

I've also not seen this in days...

@tmssngr
Copy link
Contributor Author

tmssngr commented May 16, 2025

So cherry-picking d12ad69 would be sufficient to get the fix? After the regressions I had the last 3 times I've upgraded SWT, I'm somewhat reluctant to update to the most bleeding edge state.

@HeikoKlare
Copy link
Contributor

So cherry-picking d12ad69 would be sufficient to get the fix?

It will resolve #2139. Since there is no reproduction for your exact issue, it's hard to say whether it fixes your issue.

After the regressions I had the last 3 times I've upgraded SWT, I'm somewhat reluctant to update to the most bleeding edge state.

To be honest, I really don't like such "passive aggresive" formulations. Which regressions do you refer to? Note that you seem to have always updated to development states, so there may of course be issues in such states. We have just reached M3, so the current master state will be (almost) equal to what the next release contains.

@tmssngr
Copy link
Contributor Author

tmssngr commented May 17, 2025

I'm cherry-picking d12ad69 and will report after a couple of daily usage whether the missing app icons still appear.

@tmssngr
Copy link
Contributor Author

tmssngr commented May 23, 2025

Unfortunately, having cherry-picked d12ad69 did not fix the broken shell image problem for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants