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

[Bug] Empty PSI elements must not be passed to createDescriptor (ModuleDeclarationInModuleXmlInspection.java:67) #685

Closed
x-fran opened this issue Oct 19, 2021 · 3 comments · Fixed by #817

Comments

@x-fran
Copy link

x-fran commented Oct 19, 2021

Describe the bug (*)

A clear and concise description of what the bug is.

java.lang.Throwable: Empty PSI elements must not be passed to createDescriptor. Start: PsiElement(XML_ATTRIBUTE_VALUE), end: PsiElement(XML_ATTRIBUTE_VALUE), startContainingFile: XmlFile:module.xml
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:182)
	at com.intellij.codeInspection.ProblemDescriptorBase.<init>(ProblemDescriptorBase.java:64)
	at com.intellij.codeInspection.InspectionManagerBase.createProblemDescriptor(InspectionManagerBase.java:72)
	at com.intellij.codeInspection.InspectionManagerBase.createProblemDescriptor(InspectionManagerBase.java:60)
	at com.intellij.codeInspection.ProblemsHolder.registerProblem(ProblemsHolder.java:52)
	at com.magento.idea.magento2plugin.inspections.xml.ModuleDeclarationInModuleXmlInspection$1.visitXmlAttributeValue(ModuleDeclarationInModuleXmlInspection.java:67)
	at com.intellij.psi.impl.source.xml.XmlAttributeValueImpl.accept(XmlAttributeValueImpl.java:43)
	at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:64)
	at com.intellij.codeInspection.InspectionEngine.createVisitorAndAcceptElements(InspectionEngine.java:55)
	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.runToolOnElements(LocalInspectionsPass.java:326)
	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$4(LocalInspectionsPass.java:285)
	at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:159)
	at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:151)
	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$5(LocalInspectionsPass.java:283)
	at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:130)
	at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:119)
	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$6(LocalInspectionsPass.java:283)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:136)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1078)
	at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:92)
	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.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:104)
	at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:83)
	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.concurrency.ApplierCompleter.compute(ApplierCompleter.java:83)
	at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
	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)

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: Linux 5.11.0-37-generic
  • PhpStorm/Intellij version: 2021.2.3
  • Plugin Version: 4.1.0

Additional context

Add any other context about the problem here.

@x-fran x-fran added the bug label Oct 19, 2021
@m2-assistant
Copy link

m2-assistant bot commented Oct 19, 2021

Hi @x-fran. 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

Hello, @x-fran !

Thank you for your report!
We'll try to deliver fix in the next bug-fix release!

Thank you!

@bohdan-harniuk bohdan-harniuk changed the title Bug Report 2021/10/19 [Bug] Empty PSI elements must not be passed to createDescriptor (ModuleDeclarationInModuleXmlInspection.java:67) Nov 30, 2021
@bohdan-harniuk
Copy link
Collaborator

Hello, @x-fran !

I've successfully reproduced this bug:

Screenshot 2021-11-30 at 16 59 51

The fix will be available in the next bug-fix release (4.2.1).

Thanks, Bohdan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants