How could I resolve a non-working Eclipse indexer?

528 views Asked by At

My Eclipse C indexer does not work, in the .metadata/.log file it writes an entry:

!ENTRY org.eclipse.cdt.core 1 0 2022-10-24 16:46:02.674 !MESSAGE Indexed 'eio_valto' (0 sources, 0 headers) in 0,008 sec: 0 declarations; 0 references; 0 unresolved inclusions; 0 syntax errors; 0 unresolved names (0%)

In the indexer settings "Index source and header files opened in editor" is ticked, so it should find at least one file, which is opened in my editor.

How could I resolve this?

This is a C project, which I created with File --> New --> C/C++ Project, and I use and external Makefile to build. It is the same as in all my other project, but the others work fine, only this does not.

Thanks in advance!

The entire log:

!SESSION 2022-10-24 16:16:41.372 -----------------------------------------------
eclipse.buildId=4.7.3.M20180330-0640
java.version=1.8.0_172
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=hu_HU
Framework arguments:  -product org.eclipse.epp.package.cpp.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.cpp.product

!ENTRY org.eclipse.jface 2 0 2022-10-24 16:16:51.319
!MESSAGE Keybinding conflicts occurred.  They may interfere with normal accelerator operation.
!SUBENTRY 1 org.eclipse.jface 2 0 2022-10-24 16:16:51.319
!MESSAGE A conflict occurred for ALT+CTRL+T:
Binding(ALT+CTRL+T,
    ParameterizedCommand(Command(org.eclipse.search.ui.performTextSearchWorkspace,Find Text in Workspace,
        Searches the files in the workspace for specific text.,
        Category(org.eclipse.search.ui.category.search,Search,Search command category,true),
        org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@407b41e6,
        ,,true),null),
    org.eclipse.ui.defaultAcceleratorConfiguration,
    org.eclipse.ui.contexts.window,hu,,system)
Binding(ALT+CTRL+T,
    ParameterizedCommand(Command(org.eclipse.tm.terminal.connector.local.command.launch,Open Local Terminal on Selection,
        ,
        Category(org.eclipse.tm.terminal.view.ui.commands.category,Terminal Commands,null,true),
        org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@3291d9c2,
        ,,true),null),
    org.eclipse.ui.defaultAcceleratorConfiguration,
    org.eclipse.ui.contexts.window,,,system)

!ENTRY org.eclipse.egit.ui 2 0 2022-10-24 16:17:03.170
!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
user global configuration and to define the default location to store repositories: 'C:\Users\mester.adam'. If this is
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
EGit might behave differently since they see different configuration options.
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.

!ENTRY org.eclipse.epp.logging.aeri.ide 2 17 2022-10-24 16:17:07.658
!MESSAGE Server ‘org.eclipse.epp.logging.aeri.ide.server’ failed with exception: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $. ; version: 2.0.7.v20170906-1327
!STACK 0
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:224)
    at com.google.gson.Gson.fromJson(Gson.java:887)
    at com.google.gson.Gson.fromJson(Gson.java:852)
    at com.google.gson.Gson.fromJson(Gson.java:801)
    at org.eclipse.epp.internal.logging.aeri.ide.server.json.Json.deserialize(Json.java:91)
    at org.eclipse.epp.internal.logging.aeri.ide.server.mars.IO.refreshConfiguration(IO.java:66)
    at org.eclipse.epp.internal.logging.aeri.ide.server.mars.ServerConnection.startUp(ServerConnection.java:124)
    at com.google.common.util.concurrent.AbstractIdleService$DelegateService$1.run(AbstractIdleService.java:62)
    at com.google.common.util.concurrent.Callables$4.run(Callables.java:122)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
    at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:385)
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:213)
    ... 9 more

!ENTRY org.eclipse.launchbar.core 2 0 2022-10-24 16:17:08.381
!MESSAGE Enablement expression is missing for descriptor type org.eclipse.cdt.debug.core.coreBuildDescriptorType

!ENTRY org.eclipse.launchbar.core 2 0 2022-10-24 16:17:08.399
!MESSAGE Enablement expression is missing for config provider for org.eclipse.cdt.debug.core.coreBuildDescriptorType

!ENTRY org.eclipse.launchbar.core 2 0 2022-10-24 16:17:08.413
!MESSAGE Enablement expression is missing for config provider for org.eclipse.cdt.debug.core.coreBuildDescriptorType

!ENTRY org.eclipse.cdt.core 1 0 2022-10-24 16:19:33.058
!MESSAGE Indexed 'eio_valto' (0 sources, 0 headers) in 0,145 sec: 0 declarations; 0 references; 0 unresolved inclusions; 0 syntax errors; 0 unresolved names (0%)

!ENTRY org.eclipse.cdt.core 1 0 2022-10-24 16:37:01.920
!MESSAGE Indexed 'eio_valto' (0 sources, 0 headers) in 0,127 sec: 0 declarations; 0 references; 0 unresolved inclusions; 0 syntax errors; 0 unresolved names (0%)

!ENTRY org.eclipse.cdt.core 1 0 2022-10-24 16:37:53.391
!MESSAGE Indexed 'eio_valto' (0 sources, 0 headers) in 0,103 sec: 0 declarations; 0 references; 0 unresolved inclusions; 0 syntax errors; 0 unresolved names (0%)
1

There are 1 answers

1
Ádám Mester On

I have tried the followings:

  • rebuild index
  • close and reopen project, and then rebuild index
  • refresh project, and then rebuild index
  • delete the project and reimport it into the workspace

None of them helped.

Finally: I have deleted the project and created a new project with my files, but I had to create and re-configure all my build configurations. Now it works fine, the indexer too, but it is strange, because the workspace settings are the same, and I have set the project settings to the same too. So I don't accept my method as a solution, it is just a workaround. But now, I can't reproduce the issue, so I really don't know, how to find the proper solution for this problem.