-
Notifications
You must be signed in to change notification settings - Fork 155
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
e4: FinishedJobs instance is never injected into ProgressServiceImpl for progress dialogs #1887
Comments
@selundqma there a no active maintainers for e4. Can you provide a test & bugfix? |
Hi @jukzi ! Sure, the fix I proposed in the initial text should do the trick. I would have to see how to provide a test for it. Any idea what to think about there? Then.. do I have to become a Commiter in this project to be able to fork, pull, create PR and submit? |
Please see https://github.com/eclipse-platform/.github/blob/main/CONTRIBUTING.md |
…platform#1887 The "finishedJobs" variable isn´t injected, thus is always null, when used from a progress dialog. Since the @optional field in combination with @Inject only refers to already created instances of FinishedJobs. But, this does not happen in this flow. Fixes eclipse-platform#1887
…platform#1887 The "finishedJobs" variable isn´t injected, thus is always null, when used from a progress dialog. Since the @optional field in combination with @Inject only refers to already created instances of FinishedJobs. But, this does not happen in this flow. Fixes eclipse-platform#1887
My progress monitor dialog throws a NPE when cancelling a sub job in the details view (the red button). I have traced the issue down to the ProgressServiceImpl class where the finishedJobs variable isn´t injected, thus is always null. I tried to download the code from GitHub and use it instead of the plugin in Eclipse 2024-03 (4.31) and by removing the row with
@Optional
, it suddenly worked just fine.Stack trace:
java.lang.NullPointerException: Cannot invoke "org.eclipse.e4.ui.progress.internal.FinishedJobs.isKept(org.eclipse.e4.ui.progress.internal.JobTreeElement)" because "this.finishedJobs" is null
at org.eclipse.e4.ui.progress.internal.ProgressInfoItem.cancelOrRemove(ProgressInfoItem.java:308)
at org.eclipse.e4.ui.progress.internal.ProgressInfoItem$1.widgetSelected(ProgressInfoItem.java:229)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:252)
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.Display.runDeferredEvents(Display.java:4072)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
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.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:165)
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:651)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:588)
at org.eclipse.equinox.launcher.Main.run(Main.java:1459)
at org.eclipse.equinox.launcher.Main.main(Main.java:1432)
I also tried to add a ProgressView to my application to get the jobs listed there. And that works just fine. Probably due to the correctly injected FinishedJobs instance in the view´s createPartControl method (which doesn´t use the
@Optional
annotation.The text was updated successfully, but these errors were encountered: