Skip to content
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

Division by zero in org.eclipse.swt.program.Program.getImageData #193

Closed
2 tasks done
nikita-leontiev opened this issue Mar 15, 2024 · 19 comments
Closed
2 tasks done
Labels
bug Something isn't working Windows Happens on Windows OS

Comments

@nikita-leontiev
Copy link

Let's make sure issue is not already fixed in latest builds first.

Steps to reproduce

From a fresh installation and clean workspace:

  • Create test folder with ini, doc, pdf, e.t.c. file
  • Start Eclipse
  • File > New Project > create project from test folder
  • Open project in Package Explorer

I expected: no exception.

But got: exception occurred.

Here is some relevant log output

From <workspace>/.metadata/.log

!ENTRY org.eclipse.jface 4 2 2024-03-16 00:58:12.005
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.ArithmeticException: / by zero
	at org.eclipse.swt.program.Program.getImageData(Program.java:404)
	at org.eclipse.ui.internal.misc.ExternalProgramImageDescriptor.getImageData(ExternalProgramImageDescriptor.java:68)
	at org.eclipse.jface.resource.CompositeImageDescriptor$CachedDescriptorImageDataProvider.getImageData(CompositeImageDescriptor.java:134)
	at org.eclipse.jface.resource.CompositeImageDescriptor.getZoomedImageData(CompositeImageDescriptor.java:457)
	at org.eclipse.jface.resource.CompositeImageDescriptor.drawImage(CompositeImageDescriptor.java:267)
	at org.eclipse.jdt.ui.JavaElementImageDescriptor.drawCompositeImage(JavaElementImageDescriptor.java:234)
	at org.eclipse.jface.resource.CompositeImageDescriptor.getImageData(CompositeImageDescriptor.java:375)
	at org.eclipse.swt.internal.DPIUtil.lambda$2(DPIUtil.java:428)
	at org.eclipse.swt.internal.DPIUtil.getElementAtZoom(DPIUtil.java:457)
	at org.eclipse.swt.internal.DPIUtil.validateAndGetImageDataAtZoom(DPIUtil.java:428)
	at org.eclipse.swt.graphics.Image.<init>(Image.java:716)
	at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:340)
	at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:289)
	at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:267)
	at org.eclipse.jdt.internal.ui.viewsupport.ImageDescriptorRegistry.get(ImageDescriptorRegistry.java:63)
	at org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider.getImageLabel(JavaElementImageProvider.java:114)
	at org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider.getImageLabel(JavaElementImageProvider.java:108)
	at org.eclipse.jdt.internal.ui.viewsupport.JavaUILabelProvider.getImage(JavaUILabelProvider.java:144)
	at org.eclipse.jdt.internal.ui.packageview.PackageExplorerLabelProvider.getImage(PackageExplorerLabelProvider.java:139)
	at org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.getImage(DelegatingStyledCellLabelProvider.java:198)
	at org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider.getImage(DecoratingStyledCellLabelProvider.java:171)
	at org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.update(DelegatingStyledCellLabelProvider.java:124)
	at org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider.update(DecoratingStyledCellLabelProvider.java:134)
	at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:149)
	at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:973)
	at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:131)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
	at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:1046)
	at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:426)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
	at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2111)
	at org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(AbstractTreeViewer.java:867)
	at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:845)
	at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:611)
	at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:792)
	at org.eclipse.jface.viewers.AbstractTreeViewer.handleTreeExpand(AbstractTreeViewer.java:1565)
	at org.eclipse.jface.viewers.TreeViewer.handleTreeExpand(TreeViewer.java:904)
	at org.eclipse.jface.viewers.AbstractTreeViewer$3.treeExpanded(AbstractTreeViewer.java:1577)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:136)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4274)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1090)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1075)
	at org.eclipse.swt.widgets.Tree.wmNotifyChild(Tree.java:7709)
	at org.eclipse.swt.widgets.Control.wmNotify(Control.java:5798)
	at org.eclipse.swt.widgets.Composite.wmNotify(Composite.java:1961)
	at org.eclipse.swt.widgets.Control.WM_NOTIFY(Control.java:5366)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4800)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5039)
	at org.eclipse.swt.internal.win32.OS.CallWindowProc(Native Method)
	at org.eclipse.swt.widgets.Tree.callWindowProc(Tree.java:1576)
	at org.eclipse.swt.widgets.Tree.WM_LBUTTONDOWN(Tree.java:6610)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4780)
	at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:6142)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5039)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(Native Method)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3658)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1151)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1042)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:152)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:639)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:546)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:173)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:143)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:109)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:651)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:588)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1459)

!ENTRY org.eclipse.ui.ide 4 4 2024-03-16 00:58:15.211
!MESSAGE Not properly disposed SWT resource
!STACK 0
java.lang.Error: SWT Resource was not properly disposed
	at org.eclipse.swt.graphics.Resource.initNonDisposeTracking(Resource.java:172)
	at org.eclipse.swt.graphics.Resource.<init>(Resource.java:120)
	at org.eclipse.swt.graphics.Image.<init>(Image.java:156)
	at org.eclipse.swt.graphics.Image.win32_new(Image.java:2233)
	at org.eclipse.swt.program.Program.getImageData(Program.java:400)
	at org.eclipse.ui.internal.misc.ExternalProgramImageDescriptor.getImageData(ExternalProgramImageDescriptor.java:68)
	at org.eclipse.jface.resource.CompositeImageDescriptor$CachedDescriptorImageDataProvider.getImageData(CompositeImageDescriptor.java:134)
	at org.eclipse.jface.resource.CompositeImageDescriptor.getZoomedImageData(CompositeImageDescriptor.java:457)
	at org.eclipse.jface.resource.CompositeImageDescriptor.drawImage(CompositeImageDescriptor.java:267)
	at org.eclipse.jdt.ui.JavaElementImageDescriptor.drawCompositeImage(JavaElementImageDescriptor.java:234)
	at org.eclipse.jface.resource.CompositeImageDescriptor.getImageData(CompositeImageDescriptor.java:375)
	at org.eclipse.swt.internal.DPIUtil.lambda$2(DPIUtil.java:428)
	at org.eclipse.swt.internal.DPIUtil.getElementAtZoom(DPIUtil.java:457)
	at org.eclipse.swt.internal.DPIUtil.validateAndGetImageDataAtZoom(DPIUtil.java:428)
	at org.eclipse.swt.graphics.Image.<init>(Image.java:716)
	at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:340)
	at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:289)
	at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:267)
	at org.eclipse.jdt.internal.ui.viewsupport.ImageDescriptorRegistry.get(ImageDescriptorRegistry.java:63)
	at org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider.getImageLabel(JavaElementImageProvider.java:114)
	at org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider.getImageLabel(JavaElementImageProvider.java:108)
	at org.eclipse.jdt.internal.ui.viewsupport.JavaUILabelProvider.getImage(JavaUILabelProvider.java:144)
	at org.eclipse.jdt.internal.ui.packageview.PackageExplorerLabelProvider.getImage(PackageExplorerLabelProvider.java:139)
	at org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.getImage(DelegatingStyledCellLabelProvider.java:198)
	at org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider.getImage(DecoratingStyledCellLabelProvider.java:171)
	at org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.update(DelegatingStyledCellLabelProvider.java:124)
	at org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider.update(DecoratingStyledCellLabelProvider.java:134)
	at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:149)
	at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:973)
	at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:131)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
	at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:1046)
	at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:426)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
	at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2111)
	at org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(AbstractTreeViewer.java:867)
	at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:845)
	at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:611)
	at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:792)
	at org.eclipse.jface.viewers.AbstractTreeViewer.handleTreeExpand(AbstractTreeViewer.java:1565)
	at org.eclipse.jface.viewers.TreeViewer.handleTreeExpand(TreeViewer.java:904)
	at org.eclipse.jface.viewers.AbstractTreeViewer$3.treeExpanded(AbstractTreeViewer.java:1577)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:136)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4274)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1090)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1075)
	at org.eclipse.swt.widgets.Tree.wmNotifyChild(Tree.java:7709)
	at org.eclipse.swt.widgets.Control.wmNotify(Control.java:5798)
	at org.eclipse.swt.widgets.Composite.wmNotify(Composite.java:1961)
	at org.eclipse.swt.widgets.Control.WM_NOTIFY(Control.java:5366)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4800)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5039)
	at org.eclipse.swt.internal.win32.OS.CallWindowProc(Native Method)
	at org.eclipse.swt.widgets.Tree.callWindowProc(Tree.java:1576)
	at org.eclipse.swt.widgets.Tree.WM_LBUTTONDOWN(Tree.java:6610)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4780)
	at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:6142)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5039)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(Native Method)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3658)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1151)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1042)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:152)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:639)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:546)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:173)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:143)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:109)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:651)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:588)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1459)

Tested under this environment:

  • Windows 7 x64
  • Eclipse IDE/Platform version Version: 2024-03 (4.31.0) Build id: 20240307-1437

Community

  • I understand reporting an issue to this OSS project does not mandate anyone to fix it. Other contributors may consider the issue, or not, at their own convenience. The most efficient way to get it fixed is that I fix it myself and contribute it back as a good quality patch to the project.
@nikita-leontiev nikita-leontiev added the bug Something isn't working label Mar 15, 2024
@akurtakov akurtakov added the Windows Happens on Windows OS label Mar 16, 2024
@HeikoKlare
Copy link
Contributor

This is a regression from eclipse-platform/eclipse.platform.swt#409.

The reason will probably be that Display.getCurrent().getPrimaryMonitor().getZoom() returns zero, see here. There is some code affecting the monitor zoom value indicating a change between Windows 7 and 8. I have to admit that I have no Windows 7 device available anymore to reproduce and test the behavior.

@nikita-leontiev To identify potential other reasons than the OS version, can you give some information about your monitor setup? Do you use multiple monitors, probably with different scaling settings?

@lshanmug
Copy link
Member

@deepika-u Can you please take a look?

@nikita-leontiev
Copy link
Author

I have one monitor.

@HeikoKlare
Copy link
Contributor

Since Windows 7 is EOL and I have already seen other places in SWT code where Windows-7-specifics have been removed, I am not sure whether this can/should be addressed.

@laeubi
Copy link
Contributor

laeubi commented Mar 28, 2024

Then it should throw SWTException("Win 7 no longer supported") or throw a meaningful AssertionError but not a random ArithmeticException / NullPointerException / YouRunIntoSomethingWeThoughtShouldActuallyNeverHappensException.

@HeikoKlare
Copy link
Contributor

Then it should throw SWTException("Win 7 no longer supported") or throw a meaningful AssertionError but not a random ArithmeticException / NullPointerException / YouRunIntoSomethingWeThoughtShouldActuallyNeverHappensException.

Agreed. That needs to be fixed where the problem is caused, i.e., in Monitor.getZoom(). This issue can actually be seen as a regression from eclipse-platform/eclipse.platform.swt#370, where the zoom handling for Windows 8 and below has been removed.

@laeubi
Copy link
Contributor

laeubi commented Mar 28, 2024

Just instead of completely remove and lock out users, one can probably just assume a Zoom level of 1? Just an idea and could then be just Math.max( zoom , 1) what looks useful anyways (are there Zoom setting < 100% possible?).

@HeikoKlare
Copy link
Contributor

On the one hand, it is easy to solve the issue for user of outdated environments with that proposal. On the other hand, it will make it more difficult to find regressions because of having some fallback logic that always applies and not only in the cases it is supposed to be used for (outdated OS). So to implement that fallback "properly", we would need to apply it only when it is accepted to have zoom value of "0", which is kind of equivalent to partly reverting eclipse-platform/eclipse.platform.swt#370 and introducing Windows 7/8-specific functionality.

I think there are good arguments for both. My (rather personal) opinion is that we should not invest (and risk undetected regressions) because of supporting EOL operating systems in any way. I would even be in favor of adding a validation for outdated OS on startup and requiring users to specify some flag if they want to start the application on an operating system that is not supported on the framework anymore,so make it very explicit that the application can fail because of an unsupported environment.

@laeubi
Copy link
Contributor

laeubi commented Mar 28, 2024

Given that the Deutsche Bahn is approaching for a Windows 3.11 Adminstrator it seems a bit harsh for me to simply cut of Windows 7 / 8 users with just the gain to save a zero check :-)

Maybe one can emit a warning in case to find regressions, but the risk (complete failure) seems rather high even in that case compared to a degraded functionality (e.g. incorrect zoom value).

@HeikoKlare
Copy link
Contributor

Sorry for moving to such a "general" discussion, probably that's better placed somewhere else. In particular, that is not about saving a zero check, but about the general question whether code should be written to support environments that are actually unsupported. It is rather about expectation management: there seem to be people expecting recent Eclipse/SWT to properly run on an outdated system. If some company decides to run EOL environments that is fine, but then they should not expect newest Eclipse/SWT to run on them.

For this particular issue, it would be fine for me to have that fallback, maybe combined with some warning to find regressions. Still I would like to have that general discussion about expectation management at some other placeand maybe the option to only run on unsupported systems by explicitly adding some flag.

@laeubi
Copy link
Contributor

laeubi commented Mar 28, 2024

Yes this is a quite wider topic, but it does not only affect Eclipse (as an IDE) but any SWT based products, so these products will obviously get the complains from the users even though they often can't control it.

So if it is possible to at least use SWT for example with degraded function (say zoom not working properly) is maybe better than consist of an EOL of a product (what somehow is a management decision) users are not always in control, so if it is just that Zoom adjustments no longer work reliable, then that would defiantly be something we should try to retain.

Adding all kinds of flags on the other side seem not very valuable to me, the "flag" is already running on Windows < 11 so maybe that's more of an option to find out what windows version is used and the see if there are people that maintan these codepath or not.

@akurtakov
Copy link
Member

SWT is so low on people working on it that efforts to support "unsupported" OSes by their own producers is just time lost.
Personally, I would not lose time on anything like that. Of course, if it's important for someone/some company - they are more than welcome to jump in and start doing the maintenance work.

@HeikoKlare
Copy link
Contributor

Yes this is a quite wider topic, but it does not only affect Eclipse (as an IDE) but any SWT based products, so these products will obviously get the complains from the users even though they often can't control it.

Exactly, it affects every product based on SWT as a library. But I disagree with the implication of the statement about products getting complains from user. If you base your product on some library or framework and a new version of the library/framework changes its requirements, you as a product provider have to decide whether you want to use the new version of it and adapt the system requirements of your product accordingly or whether you want to stick to an older version to have rather "relaxed" requirements. I do not see anything special for SWT here, expect for not having an explicit definition of the system requirements for using SWT (which is basically what I would propose to add).
Implicitly, we already have this definition, as there are commits that have removed support for Windows 8 and below, just like for the code we are discussing in this issue: eclipse-platform/eclipse.platform.swt@3cc6898

Adding all kinds of flags on the other side seem not very valuable to me, the "flag" is already running on Windows < 11 so maybe that's more of an option to find out what windows version is used and the see if there are people that maintan these codepath or not.

Let me phrase the proposal differently:

  • Explicitly define system requirements for SWT, such that it is obvious which OS version is supported by the current version of SWT. That avoids discussion like this happening after someone has decided to remove support for some outdated OS version without making that public.
  • Check that system requirements are met when running SWT.
  • Either print some warnings, show some warning dialog, or even throw an error (that may be deactivated by a flag) when system requirements are not met, just to make it obvious for users that they are using something that may not operate as expected.

Coming back to this issue: If there are complains about removing support for Windows 7/8 (in this special case), I'd propose to submit a PR revert the according commit: eclipse-platform/eclipse.platform.swt@3cc6898

@HeikoKlare
Copy link
Contributor

@AntipodTX
Copy link

Hello everyone.
I apologize for intruding into the discussion as a "on Windows 7 developer with two monitors" )
For me, it is not a "support or not support Windows 7" question
It is about that I, like a regular developer, just opened "Help" -> "Check for updates" in my Eclipse, and it silently received this update with no warning, and then i started to see this error every 5 seconds, and now it is mostly impossible to work (
By the luck, i found this thread and now i know from it that the new version does not support my setup, but if this update does not support my system, imo i should not receive it, right? And now in the current situation, anyone on an outdated system, who presses this "update" button, will be punished.

@merks
Copy link
Contributor

merks commented Mar 29, 2024

@AntipodTX

For what it's worth, perhaps you can successfully roll back to the previous installation profile from before the update:

image

You can also disable automatic updates to avoid them:

image

@AntipodTX
Copy link

@merks It is clear, thank you. Now i know from this thread that i need to do it.

@TheRealAyCe
Copy link

Win7 user here.

Thank you for acknowledging and discussing the bug in detail.

I believe you should not drop support for OSes in this way. The fact is that Eclipse still works fine other than this breaking bug. As long as "support" means "handle strange values gracefully with a single line of code", I do not see the problem. Once "support" means "rewrite this whole feature", just don't enable that feature on outdated OSes. Don't confuse those 2 situations please.

And, under no circumstances, should you ship updates to users that will BREAK an existing installation. That is just rude. Just leave us on an older version of Eclipse if you have to. How should I, a mere user, know that I should not have updated? After all, Eclipse is very insistent on this ("the installation does not satisfy the criteria blablabla" on every start).

(now I have to figure out how to roll back - Eclipse is not very easy to use in that regard in my experience so far)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Windows Happens on Windows OS
Projects
None yet
Development

No branches or pull requests

9 participants