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

NPE in PDEModelUtility.java:415 #1404

Open
jukzi opened this issue Sep 10, 2024 · 7 comments
Open

NPE in PDEModelUtility.java:415 #1404

jukzi opened this issue Sep 10, 2024 · 7 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@jukzi
Copy link
Contributor

jukzi commented Sep 10, 2024

eclipse.buildId=4.34.0.I20240908-1800
java.version=21.0.2
java.vendor=Eclipse Adoptium
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Command-line arguments:  -os win32 -ws win32 -arch x86_64

org.eclipse.ui
Error
Tue Sep 10 11:47:22 CEST 2024
Unhandled event loop exception

java.lang.NullPointerException: Cannot invoke "org.eclipse.pde.internal.ui.editor.context.InputContextManager.findContext(org.eclipse.core.resources.IResource)" because the return value of "org.eclipse.pde.internal.ui.editor.PDEFormEditor.getContextManager()" is null
	at org.eclipse.pde.internal.ui.util.PDEModelUtility.lambda$1(PDEModelUtility.java:415)
	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)

As far as i remember the last action i did before the error was logged: Close like 90 editors by "Close Others" from the editor tab context menu.

As far as i see in the code org.eclipse.pde.internal.ui.editor.PDEFormEditor.dispose() is the only thing that makes contextManager = null.

@opcoach
Copy link
Contributor

opcoach commented Sep 24, 2024

May be we could consider this issue as a Good First issue

@opcoach opcoach added the good first issue Good for newcomers label Sep 24, 2024
@slvo-loading
Copy link

I'm working on this

@HannesWell
Copy link
Member

I'm working on this

Great. You are one of the students from CodeDays, aren't you?

Much success on this task and don't hesitate to ask for help if you need any.

@slvo-loading
Copy link

slvo-loading commented Nov 2, 2024

Hi @jukzi ,

I tried to reproduce the issue in both the most recent public release (2024.09) of Eclipse and in the development version. I opened 90 Eclipse project files and used “Close Others”. I didn’t get any kind of error. I also let it sit for a bit, and still didn’t get an error.

Based on this, I’m wondering if this is still a problem for you or if it was fixed somehow?

If this is still an issue for you, could you give us more details such as log files, specifics on the type of editors you opened, etc.

I’d be especially interested in a complete minimal reproduction.

Thank you 👍

@jukzi
Copy link
Contributor Author

jukzi commented Nov 4, 2024

I don't have more information then already provided. Such race conditions may be hard to reproduce.

@LudoLogical
Copy link

Hi all, I'm one of the Consulting Software Engineers on the general mentor team at CodeDay Labs/Init and have worked with @slvo-loading extensively on this issue. Given that @jukzi (thank you for the quick response on such an old issue, by the way!) cannot easily identify a minimal set of reproduction steps for this bug and believes it might be a "race condition," I would like to suggest that the good first issue tag be removed so as not to potentially mislead future first-time contributors. It might also be worth putting work on this on the backburner until more information comes to light concerning the potential root cause and the possibility space can be collapsed somewhat. Cheers!

@jukzi
Copy link
Contributor Author

jukzi commented Nov 5, 2024

hint: this type of errors can often be solved by thinking about what could have gone wrong. An intermediate step may involve adding a check at an earlier point of time or extending errormessage/logging to get missing information.

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

No branches or pull requests

5 participants