-
Notifications
You must be signed in to change notification settings - Fork 80
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
Move workbench running check in ColorManager to prevent SWT errors when headless #1487
base: master
Are you sure you want to change the base?
Conversation
…en headless This change adjusts the check added for Eclipze bugzilla 546205 ticket. The check for running workbench is now done at the start of ColorManager.initializeDefaults(), to prevent the creation of an SWT Display object when in headless mode. See: https://bugs.eclipse.org/bugs//show_bug.cgi?id=546205 Fixes: eclipse-pde#1486
@iloveeclipse who would be interested in merging this? |
Me, but I can't merge alone, we are before RC2 build. @HannesWell : the patch is pretty straightforward. Do we want it in 4.34 RC2? |
We are not in a rush, we have patched our own 4.30 platform. |
We are not alone :) |
Test Results 285 files 285 suites 46m 11s ⏱️ Results for commit 7665c9e. |
It is, but I wonder if use-cases exist where an SWT Display exists but the workbench is not running? Maybe a customized SWT application that does not use the Eclipse Workbench? Since the situation is not 100% clear for me and the issue exists for five years now and you are the first one to complain, I'm not confident that we should add this fix at literally the last possibility. |
Just some thoughts here:
Regarding
You can collect all threads and then check for each one if there is a Display, but ...
I think the better way would be to get rid of static initializer as it can cause other problems as well and only is used for deprecated fields that could have been removed in these 5 years already ;-) As an intermediate solution, it is probably much easier to use |
This change refers to: https://bugs.eclipse.org/bugs//show_bug.cgi?id=546205#c4 The block we are moving was introduced due to that.
So far we ran only into this issue.
I've checked, that works for us too. Do you prefer this change:
We can wait until after the code freeze, that is not an issue. Still though, it would be good to know what change you prefer / will accept, so that we know how to patch on our end. |
This change adjusts the check added for Eclipze bugzilla 546205 ticket. The check for running workbench is now done at the start of ColorManager.initializeDefaults(), to prevent the creation of an SWT Display object when in headless mode.
See: https://bugs.eclipse.org/bugs//show_bug.cgi?id=546205
Fixes: #1486