Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException in IntelliJ IDEA #378

Closed
faseidl opened this issue Mar 26, 2022 · 3 comments
Closed

NullPointerException in IntelliJ IDEA #378

faseidl opened this issue Mar 26, 2022 · 3 comments

Comments

@faseidl
Copy link

faseidl commented Mar 26, 2022

plugin version: 0.106.2021.2

Description

IDEA version:

IntelliJ IDEA 2021.2.4 (Ultimate Edition)
Build #IU-212.5712.43, built on December 21, 2021
Runtime version: 11.0.13+8-b1504.49 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.2.1
GC: ParNew, ConcurrentMarkSweep
Memory: 2333M
Cores: 8
Non-Bundled Plugins: com.github.oowekyala.javacc (1.8), Statistic (4.1.10), net.ashald.envfile (3.2.2), reasonml (0.106-2021.2), org.jetbrains.kotlin (212-1.6.10-release-923-IJ5457.46)
Kotlin: 212-1.6.10-release-923-IJ5457.46

Issue

The plug-in seems to function properly, but periodically throws the following NPE which is reported in the IDE's event log:

java.lang.NullPointerException
	at com.reason.lang.core.psi.impl.PsiMacroBody.getMacroTextRange(PsiMacroBody.java:43)
	at com.reason.ide.js.JsInjector.getLanguagesToInject(JsInjector.java:17)
	at com.intellij.psi.impl.source.tree.injected.InjectedLanguageManagerImpl$PsiManagerRegisteredInjectorsAdapter.getLanguagesToInject(InjectedLanguageManagerImpl.java:481)
	at com.intellij.psi.impl.source.tree.injected.InjectedLanguageManagerImpl.processInPlaceInjectorsFor(InjectedLanguageManagerImpl.java:447)
	at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.probeElementsUp(InjectedLanguageUtilBase.java:248)
	at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.enumerate(InjectedLanguageUtilBase.java:178)
	at com.intellij.psi.impl.source.tree.injected.InjectedLanguageManagerImpl.enumerateEx(InjectedLanguageManagerImpl.java:331)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.queryLineMarkersForInjected(LineMarkersPass.java:214)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.queryProviders(LineMarkersPass.java:176)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.lambda$doCollectInformation$3(LineMarkersPass.java:90)
	at com.intellij.codeInsight.daemon.impl.Divider.divideInsideAndOutsideInOneRoot(Divider.java:81)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.doCollectInformation(LineMarkersPass.java:77)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:56)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:414)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1078)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:407)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:705)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:647)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:63)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:406)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:382)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:174)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:183)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:380)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:188)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
@giraud
Copy link
Owner

giraud commented Mar 27, 2022

Do you know what code generate that NPE ? Do you have a minimal example you can share ?

@giraud
Copy link
Owner

giraud commented Mar 30, 2022

EDIT: I was looking at the wrong version.

giraud added a commit that referenced this issue Mar 31, 2022
@giraud
Copy link
Owner

giraud commented May 2, 2022

fixed in 0.106.1

@giraud giraud closed this as completed May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants