tomblachut / svelte-intellij

Svelte components in WebStorm and friends
MIT License
482 stars 38 forks source link

IDE Fatal Error #214

Closed manyoussef closed 1 year ago

manyoussef commented 3 years ago
java.lang.AssertionError
    at com.intellij.lang.javascript.psi.impl.JSParameterImpl.getUseScope(JSParameterImpl.java:268)
    at com.intellij.psi.impl.search.PsiSearchHelperImpl.getUseScope(PsiSearchHelperImpl.java:76)
    at com.intellij.psi.search.searches.ReferencesSearch$SearchParameters.getEffectiveSearchScope(ReferencesSearch.java:112)
    at dev.blachut.svelte.lang.codeInsight.SvelteReferencesSearch.processQuery(SvelteReferencesSearch.kt:19)
    at dev.blachut.svelte.lang.codeInsight.SvelteReferencesSearch.processQuery(SvelteReferencesSearch.kt:12)
    at com.intellij.openapi.application.QueryExecutorBase.execute(QueryExecutorBase.java:77)
    at com.intellij.util.ExecutorsQuery.processResults(ExecutorsQuery.java:28)
    at com.intellij.util.AbstractQuery.doProcessResults(AbstractQuery.java:91)
    at com.intellij.util.AbstractQuery.delegateProcessResults(AbstractQuery.java:108)
    at com.intellij.util.MergeQuery.processResults(MergeQuery.java:22)
    at com.intellij.util.AbstractQuery.doProcessResults(AbstractQuery.java:91)
    at com.intellij.util.AbstractQuery.delegateProcessResults(AbstractQuery.java:108)
    at com.intellij.util.UniqueResultsQuery.processResults(UniqueResultsQuery.java:39)
    at com.intellij.util.AbstractQuery.doProcessResults(AbstractQuery.java:91)
    at com.intellij.util.AbstractQuery.forEach(AbstractQuery.java:83)
    at com.intellij.util.AbstractQuery.findAll(AbstractQuery.java:28)
    at com.intellij.find.findUsages.FindUsagesHandlerBase.findReferencesToHighlight(FindUsagesHandlerBase.java:114)
    at com.intellij.codeInsight.highlighting.HighlightUsagesKt.getPsiUsageRanges(highlightUsages.kt:85)
    at com.intellij.codeInsight.highlighting.HighlightUsagesKt.getUsageRanges(highlightUsages.kt:56)
    at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.lambda$highlightTargetUsages$0(IdentifierHighlighterPass.java:199)
    at com.intellij.util.AstLoadingFilter.lambda$toComputable$2(AstLoadingFilter.java:174)
    at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:132)
    at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:116)
    at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.highlightTargetUsages(IdentifierHighlighterPass.java:198)
    at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.highlightReferencesAndDeclarations(IdentifierHighlighterPass.java:174)
    at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.doCollectInformation(IdentifierHighlighterPass.java:92)
    at com.intellij.codeInsight.highlighting.BackgroundHighlighter.lambda$updateHighlighted$1(BackgroundHighlighter.java:147)
    at com.intellij.codeInsight.highlighting.BackgroundHighlightingUtil.lambda$lookForInjectedFileInOtherThread$0(BackgroundHighlightingUtil.java:55)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.insideReadAction(NonBlockingReadActionImpl.java:521)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$attemptComputation$3(NonBlockingReadActionImpl.java:468)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1096)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:79)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:157)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:119)
    at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:57)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:688)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:634)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:64)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
    at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:57)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:116)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:79)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.attemptComputation(NonBlockingReadActionImpl.java:486)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$transferToBgThread$1(NonBlockingReadActionImpl.java:408)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
    at java.base/java.lang.Thread.run(Thread.java:834)
tomblachut commented 3 years ago

Hello, which versions of plugin & IDE are you using?

itsjimbo commented 3 years ago

also happening on latest web storm

WebStorm 2021.1.1
Build #WS-211.7142.46, built on April 30, 2021
Registry: eslint.additional.file.extensions=svelte
Non-Bundled Plugins: 
dev.blachut.svelte.lang (0.18.0.203)
tomblachut commented 3 years ago

One more thing, could you attach example file that triggers this error?

anewton1998 commented 3 years ago

I'm getting the same thing on IntelliJ IDEA 2021.1 (Ultimate Edition) Build #IU-211.6693.111, built on April 6, 2021 Licensed to Andrew Newton Subscription is active until December 5, 2021. Runtime version: 11.0.10+9-b1341.35 amd64 VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o. Linux 5.8.0-53-generic GC: G1 Young Generation, G1 Old Generation Memory: 2048M Cores: 8 Registry: eslint.additional.file.extensions=svelte Non-Bundled Plugins: IdeaVIM (0.66), dev.blachut.svelte.lang (0.18.0.203), org.jetbrains.kotlin (211-1.5.0-release-759-IJ6693.72), io.ktor.intellij.plugin (1.5.1-obsolete) Kotlin: 211-1.5.0-release-759-IJ6693.72 Current Desktop: ubuntu:GNOME

I don't with page caused the error because it didn't seem to cause any problems. I just looked down and saw the IDE warning.

robsch commented 3 years ago

My guess is that it has something to do with reactive declared variables in components. Because sometimes they are red in the editor. If I then modify the code they get the default color again. Example that I just have had: A reactive variable declaration $: x = ....; and one usage in an await {#await x} which where both in color red. After commenting out the await statement and then undoing this, the variable has got its default color.

tomblachut commented 3 years ago

@robsch Thanks, this is very valuable. I'll investigate

tomblachut commented 1 year ago

This issue was solved some time ago, apologies for not closing it here.