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

java.lang.AssertionError: null #153

Closed
mesour opened this issue Feb 19, 2021 · 3 comments
Closed

java.lang.AssertionError: null #153

mesour opened this issue Feb 19, 2021 · 3 comments
Labels
bug EAP This is being considered for the next EAP version HIGH PRIORITY

Comments

@mesour
Copy link
Collaborator

mesour commented Feb 19, 2021

Error indexing:file:///private/var/www/public_html/feedtrack/backend/app/FrontModule/templates/questionair/question/parent/answer/defaultAnswer.latte

java.lang.AssertionError: null
at com.jantvrdik.intellij.latte.indexes.stubs.types.LattePhpVariableStubType.intern(LattePhpVariableStubType.java:74)
at com.jantvrdik.intellij.latte.indexes.stubs.types.LattePhpVariableStubType.createStub(LattePhpVariableStubType.java:69)
at com.jantvrdik.intellij.latte.indexes.stubs.types.LattePhpVariableStubType.createStub(LattePhpVariableStubType.java:26)
at com.intellij.psi.stubs.LightStubBuilder.createStub(LightStubBuilder.java:133)
at com.intellij.psi.stubs.LightStubBuilder.buildStubTree(LightStubBuilder.java:81)
at com.intellij.psi.stubs.LightStubBuilder.buildStubTree(LightStubBuilder.java:53)
at com.intellij.psi.stubs.StubTreeBuilder.buildStubTree(StubTreeBuilder.java:122)
at com.intellij.psi.stubs.StubUpdatingIndex$1.computeValue(StubUpdatingIndex.java:172)
at com.intellij.psi.stubs.StubUpdatingIndex$1.computeValue(StubUpdatingIndex.java:150)
at com.intellij.psi.stubs.StubUpdatingIndex$1.computeValue(StubUpdatingIndex.java:117)
at com.intellij.util.indexing.SingleEntryIndexer.map(SingleEntryIndexer.java:30)
at com.intellij.util.indexing.SingleEntryIndexer.map(SingleEntryIndexer.java:19)
at com.intellij.util.indexing.impl.MapReduceIndex.mapByIndexer(MapReduceIndex.java:291)
at com.intellij.util.indexing.impl.MapReduceIndex.mapInput(MapReduceIndex.java:283)
at com.intellij.util.indexing.impl.storage.VfsAwareMapReduceIndex.mapInput(VfsAwareMapReduceIndex.java:168)
at com.intellij.util.indexing.impl.storage.VfsAwareMapReduceIndex.mapInput(VfsAwareMapReduceIndex.java:46)
at com.intellij.util.indexing.impl.MapReduceIndex.mapInputAndPrepareUpdate(MapReduceIndex.java:226)
at com.intellij.psi.stubs.StubUpdatingIndex$MyIndex.mapInputAndPrepareUpdate(StubUpdatingIndex.java:448)
at com.intellij.psi.stubs.StubUpdatingIndex$MyIndex.mapInputAndPrepareUpdate(StubUpdatingIndex.java:408)
at com.intellij.indexing.shared.platform.impl.MergedInvertedIndex.updateBaseIndex(MergedInvertedIndex.java:328)
at com.intellij.indexing.shared.platform.impl.MergedInvertedIndex.mapInputAndPrepareUpdate(MergedInvertedIndex.java:116)
at com.intellij.indexing.shared.platform.impl.MergedInvertedIndex.mapInputAndPrepareUpdate(MergedInvertedIndex.java:38)
at com.intellij.util.indexing.FileBasedIndexImpl.lambda$indexUnsavedDocument$12(FileBasedIndexImpl.java:1027)
at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.freezeFileTypeTemporarilyIn(FileTypeManagerImpl.java:555)
at com.intellij.util.indexing.FileBasedIndexImpl.indexUnsavedDocument(FileBasedIndexImpl.java:999)
at com.intellij.util.indexing.RegisteredIndexes$DocumentUpdateTask.doProcess(RegisteredIndexes.java:181)
at com.intellij.util.indexing.RegisteredIndexes$DocumentUpdateTask.doProcess(RegisteredIndexes.java:172)
at com.intellij.util.indexing.UpdateTask.process(UpdateTask.java:64)
at com.intellij.util.indexing.UpdateTask.processAll(UpdateTask.java:33)
at com.intellij.util.indexing.FileBasedIndexImpl.lambda$indexUnsavedDocuments$11(FileBasedIndexImpl.java:955)
at com.intellij.util.indexing.StorageBufferingHandler.runUpdate(StorageBufferingHandler.java:33)
at com.intellij.util.indexing.FileBasedIndexImpl.indexUnsavedDocuments(FileBasedIndexImpl.java:955)
at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:730)
at com.intellij.psi.stubs.StubIndexImpl.getContainingIds(StubIndexImpl.java:465)
at com.intellij.psi.stubs.StubIndexImpl.processElements(StubIndexImpl.java:298)
at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:105)
at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:93)
at com.jetbrains.php.PhpIndexImpl.getByName(PhpIndexImpl.java:926)
at com.jetbrains.php.PhpIndexImpl.getByFQN(PhpIndexImpl.java:901)
at com.jetbrains.php.PhpIndexImpl.getClassesByFQNInternal(PhpIndexImpl.java:976)
at com.jetbrains.php.PhpIndexImpl.getAnyByFQN(PhpIndexImpl.java:1013)
at com.jantvrdik.intellij.latte.utils.LattePhpUtil.getClassesByFQN(LattePhpUtil.java:163)
at com.jantvrdik.intellij.latte.utils.LattePhpType.getPhpClasses(LattePhpType.java:249)
at com.jantvrdik.intellij.latte.utils.LattePhpType.getPhpClasses(LattePhpType.java:243)
at com.jantvrdik.intellij.latte.reference.references.LattePhpVariableReference.multiResolve(LattePhpVariableReference.java:48)
at com.jantvrdik.intellij.latte.reference.references.LattePhpVariableReference.resolve(LattePhpVariableReference.java:84)
at com.intellij.codeInsight.TargetElementUtilBase.getReferencedElement(TargetElementUtilBase.java:177)
at com.intellij.codeInsight.TargetElementUtilBase.doGetReferenceOrReferencedElement(TargetElementUtilBase.java:165)
at com.intellij.codeInsight.TargetElementUtilBase.getReferenceOrReferencedElement(TargetElementUtilBase.java:204)
at com.intellij.codeInsight.TargetElementUtilBase.getReferencedElement(TargetElementUtilBase.java:248)
at com.intellij.codeInsight.TargetElementUtilBase.doFindTargetElement(TargetElementUtilBase.java:227)
at com.intellij.codeInsight.TargetElementUtilBase.findTargetElement(TargetElementUtilBase.java:295)
at com.intellij.codeInsight.TargetElementUtil.findTargetElement(TargetElementUtil.java:147)
at com.intellij.model.psi.impl.TargetsKt.fromTargetEvaluator(targets.kt:175)
at com.intellij.model.psi.impl.TargetsKt.declarationsOrReferences(targets.kt:136)
at com.intellij.model.psi.impl.TargetsKt.declaredReferencedData(targets.kt:43)
at com.intellij.model.psi.impl.TargetsKt.targetSymbols(targets.kt:24)
at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.getTargetSymbols(IdentifierHighlighterPass.java:233)
at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.highlightReferencesAndDeclarations(IdentifierHighlighterPass.java:225)
at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.doCollectInformation(IdentifierHighlighterPass.java:85)
at com.intellij.codeInsight.highlighting.BackgroundHighlighter.lambda$updateHighlighted$1(BackgroundHighlighter.java:147)
at com.intellij.codeInsight.highlighting.BackgroundHighlightingUtil.lambda$lookForInjectedFileInOtherThread$0(BackgroundHighlightingUtil.java:55)
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:468)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1137)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:76)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:152)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:113)
at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:59)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:59)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:110)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:76)
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:408)
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:834)

@Jigsik
Copy link

Jigsik commented Mar 12, 2021

For me, this exception is thrown when calling methods with name stored in a variable.

Example of file, which throws exception:

{varType App\Model\Invoice\Invoice $data}
{varType string $getter}

{block content}
	{var $value = $data->$getter()}
{/block}

For this case, the problem is "$" after "->".

@jvitasek
Copy link

jvitasek commented Apr 13, 2021

+1

@Jigsik got the same error, also in a Latte file while calling a method name stored in a variable.

@mesour mesour added the EAP This is being considered for the next EAP version label May 20, 2021
@mesour
Copy link
Collaborator Author

mesour commented Jun 1, 2021

Solved in 1.1.3-RC1 - How to install EAP - https://github.com/nette-intellij/intellij-latte#testing-eap-versions

1.1.3 is released. In 1-2 business days will be available for download from plugins.jetbrains.com.

@mesour mesour closed this as completed Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug EAP This is being considered for the next EAP version HIGH PRIORITY
Projects
None yet
Development

No branches or pull requests

3 participants