denofevil / AureliaStorm

This plugin brings support for Aurelia framework to the IntelliJ platform
MIT License
35 stars 6 forks source link

IllegalStateException: hostFile.virtualFile must not be null #34

Closed brokenthorn closed 5 years ago

brokenthorn commented 5 years ago

Hi, I'd like to report a constant but not frequent exception that I get from AureliaStorm 0.8 and WebStorm 2019.1.

The exception seems to be triggered just before I clean up errors in code, like when I rename a component property and before I get to rename instances in the template bindings as well.

Exception report

java.lang.IllegalStateException: hostFile.virtualFile must not be null
    at com.github.denofevil.aurelia.FrameworkHandler.findController(FrameworkHandler.kt:41)
    at com.github.denofevil.aurelia.FrameworkHandler.addContextType(FrameworkHandler.kt:20)
    at com.intellij.lang.javascript.psi.resolve.BaseJSSymbolProcessor.<init>(BaseJSSymbolProcessor.java:144)
    at com.intellij.lang.javascript.psi.resolve.VariantsProcessor.<init>(VariantsProcessor.java:119)
    at com.intellij.lang.javascript.completion.JSReferenceCompletionUtil.calcDefaultVariants(JSReferenceCompletionUtil.java:106)
    at com.intellij.lang.javascript.completion.JSReferenceCompletionProvider.addCompletions(JSReferenceCompletionProvider.java:54)
    at com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:36)
    at com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:170)
    at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:90)
    at com.intellij.lang.javascript.completion.JSCompletionContributor.fillCompletionVariants(JSCompletionContributor.java:97)
    at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:90)
    at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:149)
    at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:142)
    at com.intellij.codeInsight.template.impl.LiveTemplateCompletionContributor$1.addCompletions(LiveTemplateCompletionContributor.java:77)
    at com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:36)
    at com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:161)
    at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:90)
    at com.intellij.codeInsight.completion.CompletionService.performCompletion(CompletionService.java:120)
    at com.intellij.codeInsight.completion.impl.CompletionServiceImpl.performCompletion(CompletionServiceImpl.java:60)
    at com.intellij.codeInsight.completion.CompletionProgressIndicator.calculateItems(CompletionProgressIndicator.java:828)
    at com.intellij.codeInsight.completion.CompletionProgressIndicator.runContributors(CompletionProgressIndicator.java:813)
    at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.lambda$null$2(CodeCompletionHandlerBase.java:280)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1166)
    at com.intellij.codeInsight.completion.AsyncCompletion.tryReadOrCancel(CompletionThreading.java:170)
    at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.lambda$doComplete$3(CodeCompletionHandlerBase.java:277)
    at com.intellij.codeInsight.completion.AsyncCompletion.lambda$null$0(CompletionThreading.java:95)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:586)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:86)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:151)
    at com.intellij.codeInsight.completion.AsyncCompletion.lambda$startThread$1(CompletionThreading.java:91)
    at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:311)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
floydpink commented 5 years ago

I ran into this issue as well - Windows 10 and WebStorm 2019.1

denofevil commented 5 years ago

I've just pushed 0.8.1 that should contain the fix for this problem