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

Cannot invoke "org.eclipse.pde.core.plugin.ModelEntry.getWorkspaceModels()" because "swtEntries" is null #238

Closed
fbertini opened this issue Jul 27, 2022 · 9 comments · Fixed by #240
Assignees
Labels
regression Regression defect
Milestone

Comments

@fbertini
Copy link

fbertini commented Jul 27, 2022

Hello everyone,

I have installed the latest Eclipse IDE version (today it is eclipse-jee-2022-06-R-win32-x86_64.zip) and I always get the following error hovering the mouse on the RUN/debug button on the toolbar.

Cannot invoke "org.eclipse.pde.core.plugin.ModelEntry.getWorkspaceModels()" because "swtEntries" is null

Notice that this is happening only when I am working on a JUnit4 class.

PDE Version 4.24

References: Eclipse Bugzilla

@iloveeclipse
Copy link
Member

@fbertini : please attach here Eclipse error log (you can find it under ./metadata/.log).

@fbertini
Copy link
Author

Please find attached log file as requested.
log.zip

Thank you!

@iloveeclipse
Copy link
Member

!ENTRY org.eclipse.core.jobs 4 2 2022-07-27 08:27:29.045
!MESSAGE An internal error occurred during: "Compute launch button tooltip".
!STACK 0
java.lang.NullPointerException: Cannot invoke "org.eclipse.pde.core.plugin.ModelEntry.getWorkspaceModels()" because "swtEntries" is null
	at org.eclipse.pde.internal.launching.launcher.LauncherUtils.requiresUI(LauncherUtils.java:331)
	at org.eclipse.pde.ui.launcher.JUnitWorkbenchLaunchShortcut.createLaunchConfiguration(JUnitWorkbenchLaunchShortcut.java:59)
	at org.eclipse.jdt.junit.launcher.JUnitLaunchShortcut.findExistingLaunchConfigurations(JUnitLaunchShortcut.java:590)
	at org.eclipse.jdt.junit.launcher.JUnitLaunchShortcut.getLaunchConfigurations(JUnitLaunchShortcut.java:558)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.getLaunchConfigurations(LaunchShortcutExtension.java:496)
	at org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager.getParticipatingLaunchConfigurations(LaunchingResourceManager.java:489)
	at org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager.getLabel(LaunchingResourceManager.java:326)
	at org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager.computeLabels(LaunchingResourceManager.java:246)
	at org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager$1$1.run(LaunchingResourceManager.java:144)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

@iloveeclipse
Copy link
Member

@HannesWell : looks like regression from commit d0a6e0f / #110

@HannesWell
Copy link
Member

Thanks for the report.
Andrey you are right, I forgot to handle the null Case.

I can fix this in two weeks when back from vacation (only have my phone available).

If any of you want to fix it earlier, it should be sufficient to pull up
ModelEntry swtEntries = PluginRegistry.findEntry("org.eclipse.swt"); //$NON-NLS-1$ as first expression in the if-block and to return false if it is null. I can review it.

@iloveeclipse
Copy link
Member

Thanks Hannes, see #240

@iloveeclipse iloveeclipse self-assigned this Jul 27, 2022
@iloveeclipse iloveeclipse added the regression Regression defect label Jul 27, 2022
@iloveeclipse iloveeclipse added this to the 4.25 M2 milestone Jul 27, 2022
iloveeclipse added a commit to iloveeclipse/eclipse.pde.ui that referenced this issue Jul 27, 2022
@fbertini
Copy link
Author

fbertini commented Aug 8, 2022

Hello guys, I received the update to m2e PDE - Maven Integration for Eclipse Plugin Development version 1.17.
Was this fix supposed to be included into this version? Or is it something to be released in a new release higher than 4.24?

@HannesWell
Copy link
Member

The version of Eclipse you mentioned should include version 1.20 of m2e PDE, which is more recent than 1.17.

Nevertheless this fix in Eclipse PDE (which is referenced by M2E-PDE) will be relesed with Eclipse 2022-09 or 4.25 in September.

@vogella
Copy link
Contributor

vogella commented Aug 9, 2022

i-build (daily build) can be found here: https://download.eclipse.org/eclipse/downloads/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Regression defect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants