EmmyLua / IntelliJ-EmmyLua

Lua IDE/Debugger Plugin for IntelliJ IDEA
https://emmylua.github.io
Apache License 2.0
1.75k stars 294 forks source link

java.lang.Throwable: Stub ids not found for key in index = lua.index.short_name #553

Open heyilin416 opened 1 year ago

heyilin416 commented 1 year ago

Environment(环境)

name version
IDEA version [IC-231.9011.34]
EmmyLua version [1.4.3-IDEA231]
OS [ Windows 11]

What are the steps to reproduce this issue?(重现步骤?)

What happens?(出现什么问题?)

就是插件老是报错,然后就是无法类型跳转

What were you expecting to happen?(期望?)

Any logs, error output, etc?(有没有什么log, error输出?)

(If it’s long, please paste to https://ghostbin.com/ and insert the link here.) java.lang.Throwable: Stub ids not found for key in index = lua.index.short_name, file = file://D:/Workspace/legend/v1/server_runtime/gameserver/lua/ckkuafu.lua, file type = com.tang.intellij.lua.lang.LuaFileType@282e8282, indexed file type = com.tang.intellij.lua.lang.LuaFileType@282e8282 at com.intellij.openapi.diagnostic.Logger.error(Logger.java:202) at com.intellij.psi.stubs.StubProcessingHelper.retrieveStubIdList(StubProcessingHelper.java:65) at com.intellij.psi.stubs.StubIndexEx.lambda$processElements$6(StubIndexEx.java:203) at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1740) at com.intellij.psi.stubs.StubIndexEx.processElements(StubIndexEx.java:202) at com.intellij.psi.stubs.StubIndex.processElements(StubIndex.java:53) at com.intellij.psi.stubs.StubIndex.get(StubIndex.java:43) at com.intellij.psi.stubs.AbstractStubIndex.get(AbstractStubIndex.java:22) at com.tang.intellij.lua.stubs.index.LuaShortNameIndex$Companion.find(LuaShortNameIndex.kt:40) at com.tang.intellij.lua.editor.LuaSymbolNavigationContributor.getItemsByName(LuaSymbolNavigationContributor.kt:40) at com.intellij.ide.util.gotoByName.ContributorsBasedGotoByModel.processContributorForName(ContributorsBasedGotoByModel.java:219) at com.intellij.ide.util.gotoByName.ContributorsBasedGotoByModel.lambda$getElementsByName$3(ContributorsBasedGotoByModel.java:182) at com.intellij.concurrency.JobLauncherImpl.lambda$processImmediatelyIfTooFew$2(JobLauncherImpl.java:137) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.concurrency.JobLauncherImpl.lambda$processImmediatelyIfTooFew$3(JobLauncherImpl.java:133) at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:865) at com.intellij.concurrency.JobLauncherImpl.processImmediatelyIfTooFew(JobLauncherImpl.java:144) at com.intellij.concurrency.JobLauncherImpl.invokeConcurrentlyUnderProgress(JobLauncherImpl.java:44) at com.intellij.concurrency.JobLauncher.invokeConcurrentlyUnderProgress(JobLauncher.java:51) at com.intellij.ide.util.gotoByName.ContributorsBasedGotoByModel.getElementsByName(ContributorsBasedGotoByModel.java:183) at com.intellij.ide.util.gotoByName.DefaultChooseByNameItemProvider.processByNames(DefaultChooseByNameItemProvider.java:255) at com.intellij.ide.util.gotoByName.DefaultChooseByNameItemProvider.filterElements(DefaultChooseByNameItemProvider.java:117) at com.intellij.ide.util.gotoByName.DefaultChooseByNameItemProvider.lambda$filterElementsWithWeights$3(DefaultChooseByNameItemProvider.java:75) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787) at com.intellij.ide.util.gotoByName.DefaultChooseByNameItemProvider.filterElementsWithWeights(DefaultChooseByNameItemProvider.java:74) at com.intellij.ide.actions.searcheverywhere.AbstractGotoSEContributor.lambda$fetchWeightedElements$4(AbstractGotoSEContributor.java:239) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1102) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:72) at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:63) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:129) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:110) at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$1(ProgressManager.java:70) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173) at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:70) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:107) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:72) at com.intellij.ide.actions.searcheverywhere.AbstractGotoSEContributor.fetchWeightedElements(AbstractGotoSEContributor.java:265) at com.intellij.ide.actions.searcheverywhere.PSIPresentationBgRendererWrapper.fetchWeightedElements(PSIPresentationBgRendererWrapper.java:67) at com.intellij.ide.actions.searcheverywhere.MixedResultsSearcher$ContributorSearchTask.run(MixedResultsSearcher.java:183) at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:227) at com.intellij.util.ConcurrencyUtil.lambda$underThreadNameRunnable$3(ConcurrencyUtil.java:215) at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:252) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699) at java.base/java.lang.Thread.run(Thread.java:833)

Any other comments?(其它说明)

CppCXY commented 1 year ago

你确认你就是描述中的emmylua版本? 请升级到2022.3或者2023.1之后再说

heyilin416 commented 1 year ago

Environment(环境)

name version
IDEA version [IC-231.9011.34]
EmmyLua version [1.4.3-IDEA231]
OS [ Windows 11]
heyilin416 commented 1 year ago

还有升级到最新版本1.4.7-IDEA231,注解的class类定义跳转不过去;

CppCXY commented 1 year ago

1.4.7把索引砍了, 退一个版本吧

heyilin416 commented 1 year ago

退了版本,经常idea报错,报多了就自动禁用了;

heyilin416 commented 1 year ago

1.4.3-IDEA231有时间感觉分析不到位,明明有定义,得打开一下定义的文件,对应的类型与跳转才正常,不然就是any类型;

heyilin416 commented 1 year ago

为什么新版本把索引砍了?

CppCXY commented 1 year ago

目前emmylua从1.3.11到1.4.6都有可能会卡死, 1.4.7是为了不卡死才出的版本, 不过代价就是砍掉功能

CppCXY commented 1 year ago

目前作者在搞V3版本的索引, 进度什么样我不知道, 要等它下一次诈尸

heyilin416 commented 1 year ago

哦,难怪,但我觉得索引才是emmylua的核心功能,我用它就是为了能代码提示与定义搜索;

heyilin416 commented 1 year ago

行,谢谢解答,期待新版本;

CppCXY commented 1 year ago

1.4.6如果不卡死的话功能应该是能用的

CppCXY commented 1 year ago

插件商店没有, 你去git action找找

heyilin416 commented 1 year ago

那意思更新到1.4.6是索引版最稳定的了;

heyilin416 commented 1 year ago

好的,谢谢;