concordion / idea-concordion-support

Concordion support IntelliJ Idea plugin https://plugins.jetbrains.com/plugin/7978
Other
13 stars 8 forks source link

NPE related to ConcordionVariableInMdUsageSearcher #16

Closed vgheo closed 6 years ago

vgheo commented 6 years ago

I get many instances of this error in the IDEA log

null
java.lang.NullPointerException
                at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil.probeElementsUp(InjectedLanguageUtil.java:329)
                at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil.enumerate(InjectedLanguageUtil.java:146)
                at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil.enumerate(InjectedLanguageUtil.java:119)
                at org.concordion.plugin.idea.ConcordionInjectionUtils.findElementInHostWithManyInjections(ConcordionInjectionUtils.java:25)
                at org.concordion.plugin.idea.variables.ConcordionVariableInMdUsageSearcher.createUsage(ConcordionVariableInMdUsageSearcher.java:34)
                at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
                at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
                at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
                at java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1812)
                at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
                at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498)
                at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
                at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
                at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
                at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
                at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
                at org.concordion.plugin.idea.variables.ConcordionVariableUsageSearcher.findDeclaration(ConcordionVariableUsageSearcher.java:35)
                at org.concordion.plugin.idea.reference.ConcordionVariableReference.resolve(ConcordionVariableReference.java:21)
                at com.intellij.codeInsight.TargetElementUtil.b(TargetElementUtil.java:391)
                at com.intellij.codeInsight.TargetElementUtil.a(TargetElementUtil.java:368)
                at com.intellij.codeInsight.TargetElementUtil.a(TargetElementUtil.java:238)
                at com.intellij.codeInsight.TargetElementUtil.findTargetElement(TargetElementUtil.java:210)
                at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.doCollectInformation(IdentifierHighlighterPass.java:102)
                at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)
                at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.d(PassExecutorService.java:438)
                at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1153)
                at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.b(PassExecutorService.java:431)
                at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:556)
                at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:501)
                at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
                at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:430)
                at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.c(PassExecutorService.java:406)
                at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:142)
                at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:242)
                at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:404)
                at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:165)
                at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
                at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
                at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
                at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
idegtiarenko commented 6 years ago

Can you please add details as for:

vgheo commented 6 years ago

I do not how to get more specific information on this plugin.

idegtiarenko commented 6 years ago

I was unable to reproduce it, however I replaced deprecated component with newer one, could you please check if this build have problem fixed: https://www.dropbox.com/s/87afnsh80i25gfw/idea-concordion-support-0.12.0-issue-16-SNAPSHOT.jar?dl=0

vgheo commented 6 years ago

Hi,

Thanks for the fix. I cannot test it though, as my corporation's firewall is blocking access to dropbox. Could you please make it available on the jetbrains update site ? Best regards Vlad

idegtiarenko commented 6 years ago

I will do so, once have confirmation that approach fixes the problem as I was unable to reproduce that

On Dec 18, 2017 08:46, "vgheo" notifications@github.com wrote:

Hi,

Thanks for the fix. I cannot test it though, as my corporation's firewall is blocking access to dropbox. Could you please make it available on the jetbrains update site ? Best regards Vlad

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/concordion/idea-concordion-support/issues/16#issuecomment-352349001, or mute the thread https://github.com/notifications/unsubscribe-auth/ABRSkOfTT5K3wKjgerOjL7DfvGHoDCCxks5tBhg9gaJpZM4Q3sNX .

vgheo commented 6 years ago

I'm not sure I can help, as I only use IDEA/Concordion at work, where we have a very constrained environment - in particular - IDEA plugins can only be installed from the jetbrains repo.

nigelcharman commented 6 years ago

Can we email you the binary, or is there some other way we can get it to you to try at work?

vgheo commented 6 years ago

I've sent the approval request - I'll wait. An alternative would be to build it from sources. Could you give me some hints for this ?

idegtiarenko commented 6 years ago

Yes, sure, please try:

git clone https://github.com/concordion/idea-concordion-support.git
cd idea-concordion-support
git checkout issue_16
./gradlew clean assemble

idea-concordion-support/build/distributions should contain artifact that could be installed as idea plugin from disk.

idegtiarenko commented 6 years ago

Any updates there?

idegtiarenko commented 6 years ago

No feedback received, existing fix released as part of 0.12