Skip to content

V5 cannot access "C/C++ Build" menu #1711

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

Closed
PerennialNovice opened this issue Feb 14, 2025 · 13 comments
Closed

V5 cannot access "C/C++ Build" menu #1711

PerennialNovice opened this issue Feb 14, 2025 · 13 comments

Comments

@PerennialNovice
Copy link

on a quite fresh install of V5 (5.0.0.20251172146) on win11 I cannot access the C/C++ Build menu

Image

tested with esp32 platform only

@jantje
Copy link
Member

jantje commented Feb 14, 2025

I tested here and it works.
Do you have a log file or can you share the project?

@uzi18
Copy link
Contributor

uzi18 commented Feb 15, 2025

This error shows sometimes on the left items - if You click on other than Sloeber one.

@jantje
Copy link
Member

jantje commented Feb 15, 2025

As I said. I tried it here and it works fine on my system (windows 11).
Some of these are part of Sloeber so they should work.
There probably is some error somewhere due to a bad config somewhere.
So I's like to see the log of a failing project as I haven't seen any yet.

@uzi18
Copy link
Contributor

uzi18 commented Feb 15, 2025

Had this on broken workspace once.

@PerennialNovice
Copy link
Author

Here's what was written to the log after I tried to access C/C++ Build:

!ENTRY org.eclipse.jface 4 2 2025-02-17 07:27:05.371
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.util.NoSuchElementException: No value present
at java.base/java.util.Optional.get(Optional.java:143)
at org.eclipse.cdt.ui.newui.AbstractPage.getIcon(AbstractPage.java:1212)
at org.eclipse.cdt.ui.newui.AbstractPage.loadTab(AbstractPage.java:1182)
at org.eclipse.cdt.ui.newui.AbstractPage.loadExtensionsSynchronized(AbstractPage.java:1143)
at org.eclipse.cdt.ui.newui.AbstractPage.createWidgets(AbstractPage.java:373)
at org.eclipse.cdt.ui.newui.AbstractPage.contentForCDT(AbstractPage.java:359)
at org.eclipse.cdt.ui.newui.AbstractPage.createContents(AbstractPage.java:256)
at org.eclipse.jface.preference.PreferencePage.createControl(PreferencePage.java:244)
at org.eclipse.jface.preference.PreferenceDialog.createPageControl(PreferenceDialog.java:1433)
at org.eclipse.jface.preference.PreferenceDialog$8.run(PreferenceDialog.java:1196)
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:1188)
at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.showPage(FilteredPreferenceDialog.java:618)
at org.eclipse.jface.preference.PreferenceDialog$5.lambda$0(PreferenceDialog.java:660)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
at org.eclipse.jface.preference.PreferenceDialog$5.selectionChanged(PreferenceDialog.java:657)
at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:820)
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:817)
at org.eclipse.jface.viewers.ColumnViewer.firePostSelectionChanged(ColumnViewer.java:1065)
at org.eclipse.jface.viewers.StructuredViewer.handlePostSelect(StructuredViewer.java:1185)
at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:84)
at org.eclipse.jface.util.OpenStrategy.firePostSelectionEvent(OpenStrategy.java:283)
at org.eclipse.jface.util.OpenStrategy$1.lambda$1(OpenStrategy.java:437)
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:4177)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3793)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
at org.eclipse.jface.window.Window.open(Window.java:799)
at io.sloeber.ui.actions.OpenPreferencesHandler.execute(OpenPreferencesHandler.java:64)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:277)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:98)
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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:299)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:233)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:174)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:165)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:485)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:204)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:444)
at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.handleWidgetSelection(AbstractContributionItem.java:442)
at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.lambda$2(AbstractContributionItem.java:464)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4404)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1173)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4202)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3790)
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:663)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:570)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:173)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:178)
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)

The project is an example sketch for the Arduino-influx library

influx_test.zip

@jantje
Copy link
Member

jantje commented Feb 17, 2025

@PerennialNovice
The log you provided contains following line
at io.sloeber.ui.actions.OpenPreferencesHandler.execute(OpenPreferencesHandler.java:64)
That line tells me this is related to the preference pages and not the project properties.
It also contains
at org.eclipse.cdt.ui.newui.AbstractPage.getIcon(AbstractPage.java:1212)
Which basically tells me a icon can be provided but is not.
As my graphical skills are limited I don't provide icons when not needed.
Getting rid of the log would be great but a quick look did not show me how I could do so.

@PerennialNovice
Copy link
Author

strange, I did open the project properties page, then navigate to the log folder, open the log, delete all and save.
Back in sloeber I then hit the "C/C++ build" menu item and copied what appeared in the log file after this action over here.

redid that now, and I get the exact same result: error message when trying to access "C/C++ build" and the exact same error log messages

@jantje
Copy link
Member

jantje commented Feb 17, 2025

I tried to reproduce here but I do not get the error.
Not when open the project properties nor when I open the preferences.
This may be related to me running from eclipse and not from a "release build"

@jantje
Copy link
Member

jantje commented Feb 18, 2025

strange, I did open the project properties page, then navigate to the log folder, open the log, delete all and save. Back in sloeber I then hit the "C/C++ build" menu item and copied what appeared in the log file after this action over here.

redid that now, and I get the exact same result: error message when trying to access "C/C++ build" and the exact same error log messages

I assume you get this error (for I don't know which reason) but still I do not se a link with the "C/C++ build" page as that is part of a a AutoBuild plugin not a sloeber plugin.
Can you share the .project, .cproject and .autoBuildProject files?

@PerennialNovice
Copy link
Author

They are included in the .zip file up there: #1711 (comment)

@jantje
Copy link
Member

jantje commented Feb 18, 2025

Can you share the .project, .cproject and .autoBuildProject files?

Thanks for providing. All seems ok.
I'll try to import the project and se whether I have the issue then.

@jantje
Copy link
Member

jantje commented Mar 6, 2025

Seems this is a release package problem.
So in debug mode the problem does not exist. When I download the build from github I get the same error.
Something is missing from the build; now I need to find out what is missing.

jantje pushed a commit that referenced this issue Mar 6, 2025
@jantje
Copy link
Member

jantje commented Mar 7, 2025

It looks like it is fixed now :-)

@jantje jantje closed this as completed Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants