nette-intellij / intellij-latte

Latte plugin for IntelliJ IDEA platform
MIT License
113 stars 22 forks source link

Error while indexing #174

Open mabar opened 3 years ago

mabar commented 3 years ago

Describe the bug

I just ran into following exception. After reindexing everything is fine and it was probably just one time error. Submiting just for case I am not the only one.

Error while indexing path\to\SolutionRequest.latte
To reindex this file IDEA has to be restarted

java.lang.AssertionError: Reentrant indexing
    at com.intellij.util.indexing.FileBasedIndexImpl.markFileIndexed(FileBasedIndexImpl.java:1566)
    at com.intellij.util.indexing.FileBasedIndexImpl.updateSingleIndex(FileBasedIndexImpl.java:1487)
    at com.intellij.util.indexing.FileBasedIndexImpl.scheduleFileForIndexing(FileBasedIndexImpl.java:1734)
    at com.intellij.util.indexing.events.ChangedFilesCollector.lambda$processFilesToUpdateInReadAction$4(ChangedFilesCollector.java:258)
    at com.intellij.util.indexing.events.ChangedFilesCollector.lambda$processFilesInReadAction$5(ChangedFilesCollector.java:280)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:688)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:634)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:64)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeNonCancelableSection(CoreProgressManager.java:218)
    at com.intellij.util.indexing.events.ChangedFilesCollector.lambda$processFilesInReadAction$6(ChangedFilesCollector.java:279)
    at com.intellij.util.ConcurrencyUtil.withLock(ConcurrencyUtil.java:234)
    at com.intellij.util.indexing.events.ChangedFilesCollector.lambda$processFilesInReadAction$7(ChangedFilesCollector.java:277)
    at com.intellij.util.indexing.events.VfsEventsMerger.processChanges(VfsEventsMerger.java:100)
    at com.intellij.util.indexing.events.ChangedFilesCollector.processFilesInReadAction(ChangedFilesCollector.java:276)
    at com.intellij.util.indexing.events.ChangedFilesCollector.processFilesToUpdateInReadAction(ChangedFilesCollector.java:251)
    at com.intellij.util.indexing.events.ChangedFilesCollector.ensureUpToDate(ChangedFilesCollector.java:212)
    at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:716)
    at com.intellij.util.indexing.FileBasedIndexEx.processAllKeys(FileBasedIndexEx.java:127)
    at com.intellij.util.indexing.FileBasedIndexEx.processAllKeys(FileBasedIndexEx.java:119)
    at com.intellij.util.indexing.FileBasedIndexEx.getAllKeys(FileBasedIndexEx.java:113)
    at com.jantvrdik.intellij.latte.config.LatteFileConfiguration.initializeFromFileIndex(LatteFileConfiguration.java:105)
    at com.jantvrdik.intellij.latte.config.LatteFileConfiguration.initialize(LatteFileConfiguration.java:83)
    at com.jantvrdik.intellij.latte.config.LatteFileConfiguration.<init>(LatteFileConfiguration.java:58)
    at com.jantvrdik.intellij.latte.config.LatteFileConfiguration.getInstance(LatteFileConfiguration.java:70)
    at com.jantvrdik.intellij.latte.config.LatteConfiguration.getFileConfiguration(LatteConfiguration.java:284)
    at com.jantvrdik.intellij.latte.config.LatteConfiguration.getTags(LatteConfiguration.java:205)
    at com.jantvrdik.intellij.latte.config.LatteConfiguration.getTags(LatteConfiguration.java:191)
    at com.jantvrdik.intellij.latte.config.LatteConfiguration.getTag(LatteConfiguration.java:73)
    at com.jantvrdik.intellij.latte.parser.LatteParserUtil.getTag(LatteParserUtil.java:183)
    at com.jantvrdik.intellij.latte.parser.LatteParserUtil.checkPairMacro(LatteParserUtil.java:31)
    at com.jantvrdik.intellij.latte.parser.LatteParser.macro_1_0(LatteParser.java:371)
    at com.jantvrdik.intellij.latte.parser.LatteParser.macro_1(LatteParser.java:360)
    at com.jantvrdik.intellij.latte.parser.LatteParser.macro(LatteParser.java:349)
    at com.jantvrdik.intellij.latte.parser.LatteParser.structureToken(LatteParser.java:2287)
    at com.jantvrdik.intellij.latte.parser.LatteParser.root_0_0(LatteParser.java:2268)
    at com.jantvrdik.intellij.latte.parser.LatteParser.root_0(LatteParser.java:2257)
    at com.jantvrdik.intellij.latte.parser.LatteParser.root(LatteParser.java:2246)
    at com.jantvrdik.intellij.latte.parser.LatteParser.parse_root_(LatteParser.java:35)
    at com.jantvrdik.intellij.latte.parser.LatteParser.parse_root_(LatteParser.java:31)
    at com.jantvrdik.intellij.latte.parser.LatteParser.parseLight(LatteParser.java:26)
    at com.jantvrdik.intellij.latte.parser.LatteElementTypes$1.parseContentsLight(LatteElementTypes.java:27)
    at com.intellij.psi.impl.source.tree.FileElement.getLighterAST(FileElement.java:65)
    at com.intellij.util.indexing.FileContentImpl.getLighterAST(FileContentImpl.java:60)
    at com.intellij.psi.stubs.StubTreeBuilder.buildStubTree(StubTreeBuilder.java:140)
    at com.intellij.psi.stubs.StubUpdatingIndex$1.computeValue(StubUpdatingIndex.java:165)
    at com.intellij.psi.stubs.StubUpdatingIndex$1.computeValue(StubUpdatingIndex.java:142)
    at com.intellij.psi.stubs.StubUpdatingIndex$1.computeValue(StubUpdatingIndex.java:109)
    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:315)
    at com.intellij.util.indexing.impl.MapReduceIndex.mapInput(MapReduceIndex.java:305)
    at com.intellij.util.indexing.impl.storage.VfsAwareMapReduceIndex.mapInput(VfsAwareMapReduceIndex.java:168)
    at com.intellij.util.indexing.impl.storage.VfsAwareMapReduceIndex.mapInput(VfsAwareMapReduceIndex.java:39)
    at com.intellij.util.indexing.impl.MapReduceIndex.mapInputAndPrepareUpdate(MapReduceIndex.java:255)
    at com.intellij.psi.stubs.StubUpdatingIndexStorage.mapInputAndPrepareUpdate(StubUpdatingIndexStorage.java:60)
    at com.intellij.psi.stubs.StubUpdatingIndexStorage.mapInputAndPrepareUpdate(StubUpdatingIndexStorage.java:19)
    at com.intellij.indexing.composite.CompositeInvertedIndexBase.updateBaseIndex(CompositeInvertedIndexBase.java:232)
    at com.intellij.indexing.composite.CompositeInvertedIndexBase.mapInputAndPrepareUpdate(CompositeInvertedIndexBase.java:55)
    at com.intellij.indexing.composite.CompositeInvertedIndexBase.mapInputAndPrepareUpdate(CompositeInvertedIndexBase.java:26)
    at com.intellij.util.indexing.FileBasedIndexImpl.updateSingleIndex(FileBasedIndexImpl.java:1492)
    at com.intellij.util.indexing.FileBasedIndexImpl.lambda$doIndexFileContent$23(FileBasedIndexImpl.java:1374)
    at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.freezeFileTypeTemporarilyIn(FileTypeManagerImpl.java:577)
    at com.intellij.util.indexing.FileBasedIndexImpl.doIndexFileContent(FileBasedIndexImpl.java:1344)
    at com.intellij.util.indexing.FileBasedIndexImpl.indexFileContent(FileBasedIndexImpl.java:1298)
    at com.intellij.util.indexing.contentQueue.IndexUpdateRunner.lambda$indexOneFileOfJob$5(IndexUpdateRunner.java:267)
    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:1096)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:79)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:157)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:119)
    at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:57)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:688)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:634)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:64)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
    at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:57)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:116)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:79)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.attemptComputation(NonBlockingReadActionImpl.java:486)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.executeSynchronously(NonBlockingReadActionImpl.java:422)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl.executeSynchronously(NonBlockingReadActionImpl.java:186)
    at com.intellij.util.indexing.contentQueue.IndexUpdateRunner.indexOneFileOfJob(IndexUpdateRunner.java:270)
    at com.intellij.util.indexing.contentQueue.IndexUpdateRunner.lambda$indexJobsFairly$4(IndexUpdateRunner.java:210)
    at com.intellij.openapi.progress.impl.ProgressSuspender.executeNonSuspendableSection(ProgressSuspender.java:83)
    at com.intellij.util.indexing.contentQueue.IndexUpdateRunner.indexJobsFairly(IndexUpdateRunner.java:213)
    at com.intellij.util.indexing.contentQueue.IndexUpdateRunner.lambda$doIndexFiles$3(IndexUpdateRunner.java:147)
    at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:216)
    at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:27)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:195)
    at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:213)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:184)
    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)

Environment (please complete the following information):

To Reproduce

Dunno. After reindexing everything seems okay.

Code

{templateType App\Admin\SolutionRequest\View\SolutionRequestTemplate}

{layout '../../@layout.latte'}

{define title}
    {$control['document']->getTitle()}
{/define}

{define action-buttons}
    <a href="{alink App\Admin\Task\Create\CreateTaskPresenter::createLink($solutionRequest)}"
       type="button"
       class="inline-flex items-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
    >
        <span class="h-5 w-5">
            {App\UI\Icons::PLUS_OUTLINE|noescape}
        </span>
        <span class="ml-2">
            {_app.request.createTask}
        </span>
    </a>
{/define}

{block content}
    <div class="flex flex-col">
        <div class="-my-2 overflow-x-auto">
            <div class="py-2 align-middle inline-block min-w-full">
                <div class="shadow overflow-hidden border-b border-gray-200 sm:rounded-lg">
                    {control solutionRequest}
                </div>
            </div>
        </div>
    </div>
{/block}
mesour commented 1 year ago

Indexes will be removed in next version