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

Eclipse having problem with dark theme on newer Windows 11 24H2 #1546

Closed
provision95 opened this issue Oct 21, 2024 · 6 comments · Fixed by #1547
Closed

Eclipse having problem with dark theme on newer Windows 11 24H2 #1546

provision95 opened this issue Oct 21, 2024 · 6 comments · Fixed by #1547

Comments

@provision95
Copy link

provision95 commented Oct 21, 2024

Describe the bug
Eclipse shows errors, stating that Not properly disposed SWT resource and having problems with css. I believe due to this dark theme does not work properly now on newest Windows.

To Reproduce
Update to Windows 11 24H2 (OSBuild 26100.2033)
Open Eclipse(latest).
Use Dark Mode.

Expected behavior
Expected a proper working dark theme, as it used to be.

Screenshots
If applicable, add screenshots to help explain your problem.
image
image
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)
  • Window 11 Pro 24H2 (OSBuild 26100.2033)
  • Eclipse IDE for Enterprise Java and Web Developers (includes Incubating components)
    Version: 2024-09 (4.33.0)
    Build id: 20240905-0614
  1. JRE/JDK version
    org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_23.0.0.v20240919-1706\jre

Version since
Eclipse or SWT version since when the behavior is seen [e.g. 4.23]
4.33.0

Workaround (or) Additional context
Add any other context about the problem here.
Any known workarounds for the problem?

Did not find any other than using default white theme.

@BeckerWdf
Copy link
Contributor

Eclipse shows errors, stating that Not properly disposed SWT resource and having problems with css.

Can you pls. provided these errors (from the error log for example).

Expected a proper working dark theme, as it used to be.
So what exactly is wrong on the screenshot? The light context menu?

@Phillipus
Copy link
Contributor

Phillipus commented Oct 21, 2024

I can see light context menus, scroll bars and drop-downs.

Perhaps files like this one need to be updated?

Eclipse shows errors, stating that Not properly disposed SWT resource

Probably not related.

@HeikoKlare
Copy link
Contributor

It looks to me as if those parts are not properly themed that also require a workbench restart to be adapted when changing themes. This is how it looks like when changing from light to dark theme without restart, which is similar (except for the title and menu bar):
{EFD31F29-9C16-4CBF-9670-230F25BB3D88}

It would be interesting to see what is in the error log entry for /css/dark.css.

@Phillipus
Copy link
Contributor

It looks to me as if those parts are not properly themed that also require a workbench restart

And a workbench restart will re-initiate the native code calls.

@sratz
Copy link
Member

sratz commented Oct 21, 2024

uxtheme.dll has indeed changed again in 24H2 (OSBuild 26100.2033) and we need to update the validation in

/* Win11 builds from 22621 */
if ((functionPtr[0x15] == 0xBA) && // mov edx,
(*(const DWORD*)(functionPtr + 0x16) == 0xA91E)) // 0A91Eh
{
return TRUE;
}

@provision95
Copy link
Author

Eclipse shows errors, stating that Not properly disposed SWT resource and having problems with css.

Can you pls. provided these errors (from the error log for example).

Expected a proper working dark theme, as it used to be.
So what exactly is wrong on the screenshot? The light context menu?

eclipse.buildId=4.33.0.20240905-0613
java.version=23
java.vendor=Eclipse Adoptium
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product

org.eclipse.ui.ide
Error
Mon Oct 21 18:02:33 KST 2024
Not properly disposed SWT resource

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:251)
	at org.eclipse.oomph.setup.ui.synchronizer.SynchronizerDialog$Choice.<init>(SynchronizerDialog.java:1251)
	at org.eclipse.oomph.setup.ui.synchronizer.SynchronizerDialog$Choice$SyncSkip.<init>(SynchronizerDialog.java:1489)
	at org.eclipse.oomph.setup.ui.synchronizer.SynchronizerDialog$RemoteColumnManager.<init>(SynchronizerDialog.java:1870)
	at org.eclipse.oomph.setup.ui.synchronizer.SynchronizerDialog.createUI(SynchronizerDialog.java:329)
	at org.eclipse.oomph.ui.OomphDialog.createDialogArea(OomphDialog.java:213)
	at org.eclipse.jface.dialogs.TitleAreaDialog.createContents(TitleAreaDialog.java:166)
	at org.eclipse.oomph.ui.OomphDialog.createContents(OomphDialog.java:186)
	at org.eclipse.jface.window.Window.create(Window.java:431)
	at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1092)
	at org.eclipse.jface.window.Window.open(Window.java:788)
	at org.eclipse.oomph.setup.ui.recorder.RecorderManager$4.run(RecorderManager.java:668)
	at org.eclipse.oomph.ui.UIUtil$7.run(UIUtil.java:693)
	at org.eclipse.ui.internal.PendingSyncExec.run(PendingSyncExec.java:68)
	at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:166)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:132)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4099)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3715)
	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:153)
	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.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:668)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:605)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1481)

CSS one:

java.io.FileNotFoundException: /css/dark.css
	at org.eclipse.osgi.storage.url.bundleentry.Handler.findBundleEntry(Handler.java:55)
	at org.eclipse.osgi.storage.url.BundleResourceHandler.openConnection(BundleResourceHandler.java:186)
	at java.base/java.net.URL.openConnection(URL.java:1258)
	at org.eclipse.osgi.storage.url.BundleURLConverter.resolve(BundleURLConverter.java:64)
	at org.eclipse.core.runtime.FileLocator.resolve(FileLocator.java:301)
	at org.eclipse.core.internal.runtime.PlatformURLConverter.resolve(PlatformURLConverter.java:53)
	at org.eclipse.core.runtime.FileLocator.resolve(FileLocator.java:301)
	at org.eclipse.e4.ui.css.swt.internal.theme.ThemeEngine.setTheme(ThemeEngine.java:467)
	at org.eclipse.e4.ui.css.swt.internal.theme.ThemeEngine.setTheme(ThemeEngine.java:435)
	at org.eclipse.ui.internal.dialogs.ViewsPreferencePage.performOk(ViewsPreferencePage.java:330)
	at org.eclipse.jface.preference.PreferencePage.performApply(PreferencePage.java:457)
	at org.eclipse.jface.preference.PreferencePage.lambda$1(PreferencePage.java:289)
	at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:84)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:265)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4326)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1174)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4124)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3712)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
	at org.eclipse.jface.window.Window.open(Window.java:799)
	at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:64)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:581)
	at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:415)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4326)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1174)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4124)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3712)
	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:153)
	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.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:668)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:605)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1481)

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