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

[Reference] NullPointerException in the PluginReferenceProvider #663

Closed
krunal2212 opened this issue Sep 29, 2021 · 2 comments · Fixed by #665 or #801
Closed

[Reference] NullPointerException in the PluginReferenceProvider #663

krunal2212 opened this issue Sep 29, 2021 · 2 comments · Fixed by #665 or #801
Assignees
Labels

Comments

@krunal2212
Copy link

Describe the bug (*)

A clear and concise description of what the bug is.

java.lang.NullPointerException
	at com.magento.idea.magento2plugin.reference.provider.PluginReferenceProvider.getReferencesByElement(PluginReferenceProvider.java:38)
	at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.getReferences(ReferenceProvidersRegistryImpl.java:199)
	at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.mapNotEmptyReferencesFromProviders(ReferenceProvidersRegistryImpl.java:162)
	at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.doGetReferencesFromProviders(ReferenceProvidersRegistryImpl.java:141)
	at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry.getReferencesFromProviders(ReferenceProvidersRegistry.java:43)
	at com.intellij.psi.impl.source.xml.XmlAttributeValueImpl.getReferences(XmlAttributeValueImpl.java:80)
	at com.intellij.psi.impl.SharedPsiElementImplUtil.addReferences(SharedPsiElementImplUtil.java:57)
	at com.intellij.psi.impl.SharedPsiElementImplUtil.findReferenceAt(SharedPsiElementImplUtil.java:33)
	at com.intellij.psi.impl.SharedPsiElementImplUtil.findReferenceAt(SharedPsiElementImplUtil.java:51)
	at com.intellij.psi.impl.source.tree.CompositePsiElement.findReferenceAt(CompositePsiElement.java:118)
	at com.intellij.psi.AbstractFileViewProvider.findReferenceAt(AbstractFileViewProvider.java:238)
	at com.intellij.psi.SingleRootFileViewProvider.findReferenceAt(SingleRootFileViewProvider.java:223)
	at com.intellij.psi.impl.source.PsiFileImpl.findReferenceAt(PsiFileImpl.java:528)
	at com.intellij.codeInsight.TargetElementUtilBase.findReference(TargetElementUtilBase.java:189)
	at com.intellij.codeInsight.TargetElementUtil.findReference(TargetElementUtil.java:93)
	at com.intellij.model.psi.impl.TargetsKt.fromTargetEvaluator(targets.kt:166)
	at com.intellij.model.psi.impl.TargetsKt.declarationsOrReferences(targets.kt:135)
	at com.intellij.model.psi.impl.TargetsKt.declaredReferencedData(targets.kt:40)
	at com.intellij.codeInsight.navigation.impl.GtduKt.fromTargetData(gtdu.kt:57)
	at com.intellij.codeInsight.navigation.impl.GtduKt.gotoDeclarationOrUsagesInner(gtdu.kt:53)
	at com.intellij.codeInsight.navigation.impl.GtduKt.access$gotoDeclarationOrUsagesInner(gtdu.kt:1)
	at com.intellij.codeInsight.navigation.impl.GtduKt$gotoDeclarationOrUsages$1.invoke(gtdu.kt:18)
	at com.intellij.codeInsight.navigation.impl.GtduKt$gotoDeclarationOrUsages$1.invoke(gtdu.kt)
	at com.intellij.codeInsight.navigation.impl.CommonKt.processInjectionThenHost(common.kt:15)
	at com.intellij.codeInsight.navigation.impl.GtduKt.gotoDeclarationOrUsages(gtdu.kt:18)
	at com.intellij.codeInsight.navigation.actions.GotoDeclarationOrUsageHandler2.gotoDeclarationOrUsages(GotoDeclarationOrUsageHandler2.kt:30)
	at com.intellij.codeInsight.navigation.actions.GotoDeclarationOrUsageHandler2.getCtrlMouseInfo(GotoDeclarationOrUsageHandler2.kt:35)
	at com.intellij.codeInsight.navigation.actions.GotoDeclarationAction.getCtrlMouseInfo(GotoDeclarationAction.java:94)
	at com.intellij.codeInsight.navigation.CtrlMouseHandler$TooltipProvider.doExecute(CtrlMouseHandler.java:392)
	at com.intellij.codeInsight.navigation.CtrlMouseHandler$TooltipProvider.lambda$execute$0(CtrlMouseHandler.java:370)
	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:486)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1078)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:78)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:161)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:118)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:57)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:183)
	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.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:170)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:57)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:115)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:78)
	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:407)
	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:829)

To Reproduce (*)

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior (*)

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Please complete the following information: (*)

  • OS: Windows 10 10.0
  • PhpStorm/Intellij version: 2021.2.2
  • Plugin Version: 4.1.0

Additional context

Add any other context about the problem here.

@krunal2212 krunal2212 added the bug label Sep 29, 2021
@m2-assistant
Copy link

m2-assistant bot commented Sep 29, 2021

Hi @krunal2212. Thank you for your report.
To help us process this issue please make sure that you provided sufficient information.

Please, add a comment to assign the issue: @magento I am working on this


@bohdan-harniuk
Copy link
Collaborator

bohdan-harniuk commented Sep 29, 2021

Hello, @krunal2212!

Thank you, for your report!

Why did you duplicate this issue? #664

Thanks, Bohdan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment