earthly / earthly-intellij-plugin

Mozilla Public License 2.0
9 stars 7 forks source link

Interesting Crash #27

Closed dchw closed 3 months ago

dchw commented 10 months ago

No idea what caused this, but it happened after opening the IDE after an upgrade

IDE: GoLand 2023.3.1

image

java.lang.RuntimeException: java.util.NoSuchElementException: No value present
    at dev.earthly.plugin.language.syntax.highlighting.EarthlyHighlightingLexer.getTextMateLanguageDescriptor(EarthlyHighlightingLexer.java:52)
    at dev.earthly.plugin.language.syntax.highlighting.EarthlyHighlightingLexer.<init>(EarthlyHighlightingLexer.java:30)
    at dev.earthly.plugin.language.syntax.highlighting.EarthlySyntaxHighlighterFactory.getSyntaxHighlighter(EarthlySyntaxHighlighterFactory.java:16)
    at dev.earthly.plugin.language.syntax.highlighting.EarthlyEditorHighlighterProvider.getEditorHighlighter(EarthlyEditorHighlighterProvider.java:23)
    at com.intellij.openapi.editor.highlighter.EditorHighlighterFactoryImpl.createEditorHighlighter(EditorHighlighterFactoryImpl.kt:52)
    at com.intellij.openapi.editor.highlighter.EditorHighlighterFactoryImpl.createEditorHighlighter(EditorHighlighterFactoryImpl.kt:68)
    at com.intellij.usages.impl.SyntaxHighlighterOverEditorHighlighter.<init>(SyntaxHighlighterOverEditorHighlighter.java:36)
    at com.intellij.usages.ChunkExtractor.<init>(ChunkExtractor.java:90)
    at com.intellij.usages.ChunkExtractor$WeakFactory.lambda$getValue$0(ChunkExtractor.java:64)
    at com.intellij.util.containers.FactoryMap$1.create(FactoryMap.java:152)
    at com.intellij.util.containers.FactoryMap.get(FactoryMap.java:38)
    at com.intellij.usages.ChunkExtractor.getExtractor(ChunkExtractor.java:78)
    at com.intellij.usages.ChunkExtractor.extractChunks(ChunkExtractor.java:73)
    at com.intellij.usages.UsageInfo2UsageAdapter.computeText(UsageInfo2UsageAdapter.java:172)
    at com.intellij.usages.UsageInfo2UsageAdapter.updateCachedPresentation(UsageInfo2UsageAdapter.java:526)
    at com.intellij.find.impl.TextSearchContributor$fetchWeightedElements$1.invoke(TextSearchContributor.kt:115)
    at com.intellij.find.impl.TextSearchContributor$fetchWeightedElements$1.invoke(TextSearchContributor.kt:104)
    at com.intellij.find.impl.TextSearchContributor.fetchWeightedElements$lambda$5(TextSearchContributor.kt:104)
    at com.intellij.find.impl.FindInProjectTask.lambda$processFindInFilesUsagesInFile$10(FindInProjectTask.java:266)
    at com.intellij.find.impl.FindInProjectUtil.processSomeOccurrencesInFile(FindInProjectUtil.java:306)
    at com.intellij.find.impl.FindInProjectUtil.lambda$processUsagesInFile$4(FindInProjectUtil.java:268)
    at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:909)
    at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:65)
    at com.intellij.find.impl.FindInProjectUtil.processUsagesInFile(FindInProjectUtil.java:267)
    at com.intellij.find.impl.FindInProjectTask.processFindInFilesUsagesInFile(FindInProjectTask.java:255)
    at com.intellij.find.impl.FindInProjectTask.lambda$wrapUsageProcessor$6(FindInProjectTask.java:206)
    at com.intellij.find.impl.FindInProjectTask.lambda$findUsages$5(FindInProjectTask.java:165)
    at com.intellij.find.impl.FindInProjectTask.lambda$processFilesInScope$19(FindInProjectTask.java:401)
    at com.intellij.openapi.roots.impl.FilesScanExecutor$doProcessOnAllThreadsInReadAction$1.invoke$lambda$0(FilesScanExecutor.kt:91)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1075)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:73)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:73)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:128)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:111)
    at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:73)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:192)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:610)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:685)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:641)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:609)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:78)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:179)
    at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:73)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:108)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:73)
    at com.intellij.openapi.roots.impl.FilesScanExecutor$doProcessOnAllThreadsInReadAction$1.invoke(FilesScanExecutor.kt:90)
    at com.intellij.openapi.roots.impl.FilesScanExecutor$doProcessOnAllThreadsInReadAction$1.invoke(FilesScanExecutor.kt:83)
    at com.intellij.openapi.roots.impl.FilesScanExecutor.processOnAllThreads$lambda$2(FilesScanExecutor.kt:132)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:192)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:610)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:685)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:641)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:609)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:78)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:179)
    at com.intellij.openapi.roots.impl.FilesScanExecutor.runOnAllThreads$lambda$1(FilesScanExecutor.kt:56)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:244)
    at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:30)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:222)
    at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:218)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:210)
    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:840)
Caused by: java.util.NoSuchElementException: No value present
    at java.base/java.util.Optional.get(Optional.java:143)
    at dev.earthly.plugin.language.syntax.highlighting.EarthlyHighlightingLexer.getTextMateLanguageDescriptor(EarthlyHighlightingLexer.java:48)
    ... 69 more
idelvall commented 10 months ago

Hi @dchw, was this error consistent, or just happened once?

idelvall commented 3 months ago

closing since this is from an old version, and no more cases where reported