Stub ids not found for key in index

Answered

I've received this exception from a user:

java.lang.Throwable: Stub ids not found for key in index = nl.hannahsten.texifyidea.commands, file = file:///Users/compux72/Developer/resume/scripts/scheme.py, file type = com.jetbrains.python.PythonFileType@1879f2ad, indexed file type = com.jetbrains.python.PythonFileType@1879f2ad
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:182)
	at com.intellij.psi.stubs.StubProcessingHelper.retrieveStubIdList(StubProcessingHelper.java:65)
	at com.intellij.psi.stubs.StubIndexEx.lambda$processElements$6(StubIndexEx.java:180)
	at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705)
	at com.intellij.psi.stubs.StubIndexEx.processElements(StubIndexEx.java:179)
	at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:99)
	at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:87)
	at nl.hannahsten.texifyidea.index.IndexUtilBase.getItemsByName(IndexUtilBase.kt:141)

 

Our code at that line is

StubIndex.getElements(indexKey, name, project, scope, elementClass)

 

so it appears to me that the indexKey is not present in the stub indices. However, I have no idea how this could happen?

It doesn't happen very often, there is only a few reports from the last half year.

0
2 comments

Hi,

It seems to be a product issue similar to https://youtrack.jetbrains.com/issue/KTIJ-7670. It might be also related to https://youtrack.jetbrains.com/issue/IDEA-266391.

If the affected versions are newer than 2021.1.1, could you please file an issue on YouTrack and provide more information (e.g., what versions are affected if you have such information)?

If the errors are reported only from PyCharm in your case, I suggest reporting them on: https://youtrack.jetbrains.com/issues/PY

If there are multiple products affected, please report on: https://youtrack.jetbrains.com/issues/IDEA

Thank you in advance.

1

Thanks for your answer!

That first issue sounds similar, though I recall when I searched for this exception I also found it reported against some other plugins, so it wouldn't surprise me if the Kotlin plugin is affected also.

On the other hand, now I searched again it does appear that it can be caused by plugin bugs, e.g. https://github.com/magento/magento2-phpstorm-plugin/pull/814

I think I'll leave it in the middle, unless more reports come up it's not worth spending so much time on right now.

The version reported was IntelliJ IDEA 2022.1.4 (build IU-221.6008.13). Most reports I've seen were from early last year though.

0

Please sign in to leave a comment.