Atwix / phpstorm-plugin-feedback

6 stars 0 forks source link

[Bug] java.lang.IllegalArgumentException: offsetInFile(=-1921603376) must be >=0 #66

Closed nazaridak closed 5 months ago

nazaridak commented 5 months ago

Describe the bug (*)

Please, describe as much as possible about of what the bug is. It will help to solve this issue faster.

StackTrace from IDE

Could not compute indexUpdateComputable

java.lang.IllegalArgumentException: offsetInFile(=-1921603376) must be >=0
    at com.intellij.util.io.dev.mmapped.MMappedFileStorage.pageIndexByOffset(MMappedFileStorage.java:254)
    at com.intellij.util.io.dev.mmapped.MMappedFileStorage.pageByOffset(MMappedFileStorage.java:208)
    at com.intellij.openapi.vfs.newvfs.persistent.mapped.MappedFileStorageHelper.writeIntField(MappedFileStorageHelper.java:455)
    at com.intellij.openapi.vfs.newvfs.persistent.dev.FastFileAttributes$Int4FileAttribute.write(FastFileAttributes.java:98)
    at com.intellij.psi.stubs.IndexingStampInfoStorageOverFastAttributes.writeStampInfo(IndexingStampInfoStorage.kt:56)
    at com.intellij.psi.stubs.StubTreeLoaderImpl.saveIndexingStampInfo(StubTreeLoaderImpl.java:295)
    at com.intellij.psi.stubs.StubUpdatingIndexStorage.lambda$mapInputAndPrepareUpdate$0(StubUpdatingIndexStorage.java:69)
    at com.intellij.openapi.util.Computable.get(Computable.java:16)
    at com.intellij.indexing.composite.CompositeInvertedIndexBase.lambda$mapInputAndPrepareUpdate$3(CompositeInvertedIndexBase.java:76)
    at com.intellij.util.indexing.IndexInfrastructureExtensionUpdateComputation.compute(IndexInfrastructureExtensionUpdateComputation.java:27)
    at com.intellij.util.indexing.IndexInfrastructureExtensionUpdateComputation.compute(IndexInfrastructureExtensionUpdateComputation.java:11)
    at com.intellij.openapi.util.Computable.get(Computable.java:16)
    at com.intellij.util.indexing.FileBasedIndexImpl.lambda$runUpdateForPersistentData$24(FileBasedIndexImpl.java:1638)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:685)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:641)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$computeInNonCancelableSection$3(CoreProgressManager.java:236)
    at com.intellij.openapi.progress.Cancellation.computeInNonCancelableSection(Cancellation.java:57)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeInNonCancelableSection(CoreProgressManager.java:236)
    at com.intellij.util.indexing.FileBasedIndexImpl.lambda$runUpdateForPersistentData$25(FileBasedIndexImpl.java:1638)
    at com.intellij.util.indexing.StorageBufferingHandler.runUpdate(StorageBufferingHandler.java:23)
    at com.intellij.util.indexing.FileBasedIndexImpl.runUpdateForPersistentData(FileBasedIndexImpl.java:1637)
    at com.intellij.util.indexing.SingleIndexValueApplier.doApply(SingleIndexValueApplier.java:62)
    at com.intellij.util.indexing.SingleIndexValueApplier.apply(SingleIndexValueApplier.java:50)
    at com.intellij.util.indexing.FileIndexesValuesApplier.applyModifications(FileIndexesValuesApplier.java:204)
    at com.intellij.util.indexing.FileIndexesValuesApplier.apply(FileIndexesValuesApplier.java:152)
    at com.intellij.util.indexing.FileBasedIndexImpl.processRefreshedFile(FileBasedIndexImpl.java:1317)
    at com.intellij.util.indexing.FileBasedIndexImpl$VirtualFileUpdateTask.doProcess(FileBasedIndexImpl.java:1682)
    at com.intellij.util.indexing.FileBasedIndexImpl$VirtualFileUpdateTask.doProcess(FileBasedIndexImpl.java:1676)
    at com.intellij.util.indexing.UpdateTask.process(UpdateTask.java:63)
    at com.intellij.util.indexing.UpdateTask.processAll(UpdateTask.java:32)
    at com.intellij.util.indexing.FileBasedIndexImpl.forceUpdate(FileBasedIndexImpl.java:1699)
    at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:788)
    at com.intellij.psi.stubs.StubIndexEx.getContainingIds(StubIndexEx.java:358)
    at com.intellij.psi.stubs.StubIndexEx.processElements(StubIndexEx.java:168)
    at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:102)
    at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:90)
    at com.jetbrains.php.PhpIndexImpl.getElements(PhpIndexImpl.java:746)
    at com.jetbrains.php.PhpIndexImpl.getByName(PhpIndexImpl.java:1183)
    at com.jetbrains.php.PhpIndexImpl.getByFQN(PhpIndexImpl.java:1160)
    at com.jetbrains.php.PhpIndexImpl.getByFqnCacheAware(PhpIndexImpl.java:1241)
    at com.jetbrains.php.PhpIndexImpl.getClassesByFQNInternal(PhpIndexImpl.java:1236)
    at com.jetbrains.php.PhpIndexImpl.getInterfacesByFQN(PhpIndexImpl.java:1261)
    at com.jetbrains.php.lang.psi.elements.PhpClass.getDirectImplementedInterfaces(PhpClass.java:87)
    at com.jetbrains.php.lang.psi.elements.impl.PhpClassImpl.getImplementedInterfaces(PhpClassImpl.java:571)
    at com.jetbrains.php.PhpClassHierarchyUtils.getImmediateParents(PhpClassHierarchyUtils.java:630)
    at com.atwix.magento.lang.php.util.PhpClassReaderUtil.getAllSuperTypes(PhpClassReaderUtil.kt:120)
    at com.atwix.magento.lang.php.util.PhpClassReaderUtil.getAllImplementedInterfaces(PhpClassReaderUtil.kt:96)
    at com.atwix.magento.lang.php.util.PhpClassReaderUtil.isClassImplementsInterface(PhpClassReaderUtil.kt:84)
    at com.atwix.magento.feature.controller.validator.ControllerValidator.validate(ControllerValidator.kt:20)
    at com.atwix.magento.feature.controller.hints.codeVision.UrlPathCodeVisionProvider.acceptsElement(UrlPathCodeVisionProvider.kt:52)
    at com.intellij.codeInsight.hints.codeVision.CodeVisionProviderBase.computeForEditor(CodeVisionProviderBase.kt:66)
    at com.atwix.magento.feature.controller.hints.codeVision.UrlPathCodeVisionProvider.computeForEditor(UrlPathCodeVisionProvider.kt:71)
    at com.intellij.codeInsight.hints.codeVision.CodeVisionPass$Companion.collect$lambda$4$lambda$3(CodeVisionPass.kt:76)
    at com.intellij.concurrency.JobLauncherImpl.lambda$processImmediatelyIfTooFew$2(JobLauncher

To Reproduce (*)

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

Screenshots

If applicable, add screenshots to help explain your problem.

System information:

bohdan-harniuk commented 5 months ago

Hello @nazaridak,

Thank you for your report. This issue is related to the PHPStorm native indexes and should not appear after invalidating all indexes: https://www.jetbrains.com/help/phpstorm/invalidate-caches.html

If you encounter any issues or have more feedback, please let us know.