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 PHPDebugPreferencesBlock because of null server #260

Open
merks opened this issue Nov 24, 2023 · 0 comments
Open

NPE in PHPDebugPreferencesBlock because of null server #260

merks opened this issue Nov 24, 2023 · 0 comments
Labels

Comments

@merks
Copy link
Contributor

merks commented Nov 24, 2023

Describe the bug

Visiting all pages in the PHP EPP product, this error appears in the log:

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

org.eclipse.jface
Error
Fri Nov 24 09:13:58 CET 2023
Problems occurred when invoking code from plug-in: "org.eclipse.jface".

java.lang.NullPointerException: Cannot invoke "org.eclipse.php.internal.server.core.Server.getName()" because the return value of "org.eclipse.php.internal.server.core.manager.ServersManager.getDefaultServer(org.eclipse.core.resources.IProject)" is null
	at org.eclipse.php.internal.debug.ui.preferences.PHPDebugPreferencesBlock.initializeValues(PHPDebugPreferencesBlock.java:104)
	at org.eclipse.php.internal.debug.ui.preferences.PHPDebugPropertyPreferencePage.createCommonContents(PHPDebugPropertyPreferencePage.java:89)
	at org.eclipse.php.internal.debug.ui.preferences.PHPDebugPropertyPreferencePage.createProjectContents(PHPDebugPropertyPreferencePage.java:125)
	at org.eclipse.php.internal.ui.preferences.AbstractPHPPropertyPreferencePage.createContents(AbstractPHPPropertyPreferencePage.java:172)
	at org.eclipse.jface.preference.PreferencePage.createControl(PreferencePage.java:244)
	at org.eclipse.php.internal.ui.preferences.AbstractPHPPropertyPreferencePage.createControl(AbstractPHPPropertyPreferencePage.java:206)
	at org.eclipse.jface.preference.PreferenceDialog.createPageControl(PreferenceDialog.java:1434)
	at org.eclipse.jface.preference.PreferenceDialog$8.run(PreferenceDialog.java:1197)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
	at org.eclipse.jface.preference.PreferenceDialog.showPage(PreferenceDialog.java:1189)
	at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.showPage(FilteredPreferenceDialog.java:630)
	at org.eclipse.jface.preference.PreferenceDialog$5.lambda$0(PreferenceDialog.java:661)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at org.eclipse.jface.preference.PreferenceDialog$5.selectionChanged(PreferenceDialog.java:658)
	at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:821)
	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.firePostSelectionChanged(StructuredViewer.java:818)
	at org.eclipse.jface.viewers.ColumnViewer.firePostSelectionChanged(ColumnViewer.java:1070)
	at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1670)
	at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:1106)
	at org.eclipse.jface.viewers.Viewer.setSelection(Viewer.java:376)
	at org.eclipse.oomph.setup.ui.recorder.PreferenceInitializationDialog$Initializer$2$2.run(PreferenceInitializationDialog.java:427)
	at org.eclipse.oomph.ui.UIUtil$7.run(UIUtil.java:662)
	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:4046)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3662)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:166)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:368)
	at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:470)
	at org.eclipse.oomph.setup.ui.recorder.PreferenceInitializationDialog$Initializer.run(PreferenceInitializationDialog.java:383)
	at org.eclipse.oomph.ui.UIUtil$5.run(UIUtil.java:571)
	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:4046)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3662)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
	at org.eclipse.jface.window.Window.open(Window.java:799)
	at org.eclipse.oomph.setup.ui.recorder.PreferenceInitializationDialog$Initializer$2$1$2.run(PreferenceInitializationDialog.java:530)
	at org.eclipse.oomph.ui.UIUtil$5.run(UIUtil.java:571)
	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:4046)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3662)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:342)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:645)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:342)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:552)
	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:136)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	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)


Describe the eclipse environment

EPP PHP 2023-12 RC1

Describe your system

Windows 10

To Reproduce
Visit that preference page.

Expected behavior
No NPE.

@merks merks added the bug label Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant