ESP-IDF Manager: Window "broken" (IEP-1361)
Describe the bug After installing some ESP-IDF from disk, the ESP-IDF Manager windows "broke" (see screenshot). Even closing and reopening the IDE, the problem persists. I also try to uninstall and reinstall the ESP-IDE, but the issue comes back again.
To Reproduce I don't know if it's systematic. In a fresh Espressif-IDE installing, I have added IDF 4.4.4 and then 5.1. After that, the IDF Mangager appears like the screenshot.
Expected behavior The ESP-IDF Manager window still works.
Screenshots
Clicking on the Details:
java.lang.NullPointerException: Cannot invoke "String.compareTo(String)" because the return value of "com.espressif.idf.core.tools.vo.IDFToolSet.getIdfVersion()" is null at com.espressif.idf.ui.tools.manager.pages.ESPIDFMainTablePage$ColumnViewerComparator.compare(ESPIDFMainTablePage.java:521) at org.eclipse.jface.viewers.ViewerComparator.lambda$0(ViewerComparator.java:205) at java.base/java.util.TimSort.countRunAndMakeAscending(TimSort.java:360) at java.base/java.util.TimSort.sort(TimSort.java:220) at java.base/java.util.Arrays.sort(Arrays.java:1233) at org.eclipse.jface.viewers.ViewerComparator.sort(ViewerComparator.java:205) at org.eclipse.jface.viewers.StructuredViewer.getSortedChildren(StructuredViewer.java:1029) at org.eclipse.jface.viewers.ColumnViewer.getSortedChildren(ColumnViewer.java:821) at org.eclipse.jface.viewers.AbstractTableViewer.internalRefreshAll(AbstractTableViewer.java:670) at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:616) at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:608) at org.eclipse.jface.viewers.AbstractTableViewer.lambda$0(AbstractTableViewer.java:562) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1392) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1353) at org.eclipse.jface.viewers.AbstractTableViewer.inputChanged(AbstractTableViewer.java:562) at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:282) at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1636) at com.espressif.idf.ui.tools.manager.pages.ESPIDFMainTablePage.createIdfTable(ESPIDFMainTablePage.java:153) at com.espressif.idf.ui.tools.manager.pages.ESPIDFMainTablePage.createPage(ESPIDFMainTablePage.java:77) at com.espressif.idf.ui.tools.manager.ESPIDFManagerEditor.createPartControl(ESPIDFManagerEditor.java:57) at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:158) at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPartControl(CompatibilityEditor.java:96) at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:365) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58) at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:977) at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:939) at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:139) at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:386) at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:312) at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:203) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:90) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:59) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:42) at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:132) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:991) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:658) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:762) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:727) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:711) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.lambda$0(PartServiceImpl.java:105) at org.eclipse.e4.ui.services.internal.events.UIEventHandler.lambda$0(UIEventHandler.java:38) at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:183) at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:133) at org.eclipse.swt.widgets.Display.syncExec(Display.java:4814) at org.eclipse.e4.ui.workbench.swt.DisplayUISynchronize.syncExec(DisplayUISynchronize.java:34) at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38) at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:206) at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:201) at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151) at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:131) at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:73) at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:44) at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:55) at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:424) at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElementGen(ElementContainerImpl.java:168) at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:187) at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:654) at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:618) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:796) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:401) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1271) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3228) at org.eclipse.ui.internal.WorkbenchPage.lambda$11(WorkbenchPage.java:3118) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3116) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3086) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3069) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:345) at com.espressif.idf.ui.tools.ManageEspIdfVersionsHandler$1.run(ManageEspIdfVersionsHandler.java:53) 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:4058) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3676) 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.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.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) 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) at org.eclipse.equinox.launcher.Main.main(Main.java:1454)
Espressif-IDE Product Information: Version: 3.1.0 Build id: 20241007-0706
Eclipse Error log:
Hi @FabITA1 , for some reason, the ESP-IDF version was set to null, which caused this issue.
Could you delete the tool_set_config.json file from your workspace, then re-launch the ESP-IDF Manager and add the ESP-IDF version by selecting the "Using an existing ESP-IDF option..."
/Users/myusername/myworkspacename/tool_set_config.json
Please note that Espressif-IDE 3.1.0 only supports ESP-IDF 5.0 and higher. In your case, I see you’re using ESP-IDF 4.4.4. If you plan to use ESP-IDF 4.4.4, please use Espressif-IDE 2.12.1.
Hi @kolipakakondal, many thanks for your help. This solve my problem Thank you also for your reminder about the compatibility IDE - IDF.
@kolipakakondal Sorry...... I re-open the ticket. I have now installed the IDF 5.1 from disk, previous cloned with git clone --branch v5.1 --single-branch https://github.com/espressif/esp-idf.git
After a succefull installation: " Install tools completed. Writing to the configuration file Tool installation has been successfully completed. To utilize specific tools, please use "Set Active" button " The problem appears again!
I noted that the tool_set_config.json have a strange id number on the IDF 5.1 section (attached file) tool_set_config.json
Hi @alirana01 Could you please look into this?
@FabITA1 I agree was an issue on v3.0 for plugin in the mean time I can recommend a workaround to keep you going, while I try to investigate this further
The file you shared tool_set_config.json is fine in terms of the id number. The issue however is in the envVars for the later ESP-IDF version 5.1 that you have installed. You can try to update the json file and add the "ESP_IDF_VERSION" : "5.1" manually to it as show in the image below to the envVars and also in the "idfVersion": "5.1" to the main object. Then please restart the IDE in the same workspace and set the required idf version to active.
Hi @alirana01 thanks for your reply. I followed your suggestion by adding the missing line, but the issue persists. For now, I installed only the 5.3.1 what I need at the moment.
I am having a similar issue. I deleted the .json file and the Manager now opens properly. However, the ESP-IDF version field is not populated .
I am also seeing this same issue. I have been using various IDF versions above 5.0 with no issue, but as soon as I install IDF 5.3 or higher this issue appears: all the IDF versions that were already showing in the ESP-IDF Manager disappear, and the value of IDF_PATH appears to default to esp_idf_master, which breaks my builds as they expect 5.2.2 or less.
The reason this issue appeared in the first place was that I installed IDF master in order to compile for the ESP32-P4.
I can still compile from the command line; it is only Eclipse + Espressif Plugin which are broken.
To add to my previous comment, with only IDF 5.1.2 and IDF 5.2.2 in the IDF manager they were showing normally. I then closed my project and exited from Eclipse, then restarted Eclipse. It presented a warning as shown below, seemingly indicating it was looking for a file esp_idf.json.json (which does not exist) rather than tool_set_config.json (which does exist in the workspace).
It appears the plugin has incorrectly named the config file, cannot find it, then uses esp_idf_master as the default, which messes everything up.
If I say 'use old path' at this point then all is good, the IDF manager functions as expected. Now, if I install IDF 5.3 as well, then installation proceeds normally, but when complete the IDF manager is blank. If I close the manager tab at this point and reopen I will get the broken manager screen as is the subject of this issue.
Comparing the files before and after I see there are now two entries for IDF 5.2.2 and an entry for IDF 5.3. See attached files.
tool_set_config-broken.json tool_set_config-working.json
The only way I have found to recover is to replace the broken tool_set_config.json in the workspace. This allows the IDF manager to function correctly, but of course I do not have IDF 5.3 available, so I cannot reasonably develop for the ESP32-P4 (every time I habitually hit build in the IDE it clobbers my build directory, so I need to fullclean and build from the cli.
I managed to construct a working toot_set_config.json file which allows me to build for ESP32-S3 with IDF 5.2.2, or for ESP32-P4 with IDF 5.3, in both cases within Eclipse, and with ESP-IDF Manager functional. See attached.
The only real difference I noticed was that the working file specifies "idfVersion": "5.3" and "ESP_IDF_VERSION": "5.3" whereas the broken file does not. That may or may not be relevant, I did not test it further once I had a working solution.
This problem may be related to Unable to install ESP-IDF 5.3.2 via ESP-IDF Manager in Elclipse (IEP-1395)
Where idf_tools.py does not export the path to the ESP-IDF virtual python environment.
This problem may be related to Unable to install ESP-IDF 5.3.2 via ESP-IDF Manager in Elclipse (IEP-1395)
Where idf_tools.py does not export the path to the ESP-IDF virtual python environment.
Perhaps, although even in the presence of this error in the Eclipse IDE I am able to use the CLI to fullclean/reconfigure/build without issue, so I don't see any sign of a configuration error at that level.
Since I have worked out how to manually edit the tool_set_config.json to give me a working setup it has been working perfectly for me in either CLI or Eclipse. Refer my earlier comment: https://github.com/espressif/idf-eclipse-plugin/issues/1075#issuecomment-2547432694
So from my point of view this is a simple failure by the Espressif plugin during construction of the tools_config.json.