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

Plugin Crash 0.3.8 when parse sentry_sdk #380

Closed
tonal opened this issue Oct 1, 2021 · 5 comments
Closed

Plugin Crash 0.3.8 when parse sentry_sdk #380

tonal opened this issue Oct 1, 2021 · 5 comments

Comments

@tonal
Copy link

tonal commented Oct 1, 2021

Describe the bug
pydantic crashes.

To Reproduce
Steps to reproduce the behavior:

  1. Open PyCharm
  2. Jamp to sentry_sdk sources

Expected behavior
The plugin does not crash

Screenshots
If applicable, add screenshots to help explain your problem.
Also, gif movies are recommended.

Environments (please complete the following information):

  • IDE: PyCharm 2021.2.2 (Professional Edition)
  • OS: KDE neon User Edition 5.22 (based on Ubuntu 20.04) with all updates
  • Pydantic Version 1.8.2
  • Plugin version 0.3.8

Additional context
Add any other context about the problem here.

Outdated stub in index: file:///home/user/.pyenv/versions/calc/lib/python3.9/site-packages/sentry_sdk/tracing.py indexing timestamp = 1630555439968, binary = false, byte size = 25828, char size = 25828, doc=DocumentImpl[file:///home/user/.pyenv/versions/calc/lib/python3.9/site-packages/sentry_sdk/tracing.py], docSaved=true, wasIndexedAlready=true, queried at 1630555439968
doc length=25093
file length=25093
cached PSI class com.jetbrains.python.psi.impl.PyFileImpl
projects with file: 1
physical file exists; length = 25093

java.lang.Exception
	at com.intellij.psi.stubs.StubTreeLoaderImpl.diagnoseLengthMismatch(StubTreeLoaderImpl.java:174)
	at com.intellij.psi.stubs.StubTreeLoaderImpl.checkLengthMatch(StubTreeLoaderImpl.java:140)
	at com.intellij.psi.stubs.StubTreeLoaderImpl.readFromVFile(StubTreeLoaderImpl.java:107)
	at com.intellij.psi.stubs.StubTreeLoader.lambda$stubTreeAndIndexDoNotMatch$0(StubTreeLoader.java:63)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$computeInNonCancelableSection$3(CoreProgressManager.java:242)
	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.executeNonCancelableSection(CoreProgressManager.java:223)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeInNonCancelableSection(CoreProgressManager.java:240)
	at com.intellij.psi.stubs.StubTreeLoader.stubTreeAndIndexDoNotMatch(StubTreeLoader.java:61)
	at com.intellij.psi.impl.source.FileTrees.reconcilePsi(FileTrees.java:193)
	at com.intellij.psi.impl.source.FileTrees.withAst(FileTrees.java:141)
	at com.intellij.psi.impl.source.PsiFileImpl.loadTreeElement(PsiFileImpl.java:212)
	at com.intellij.psi.impl.source.PsiFileImpl.calcTreeElement(PsiFileImpl.java:731)
	at com.intellij.extapi.psi.StubBasedPsiElementBase.getNode(StubBasedPsiElementBase.java:128)
	at com.intellij.extapi.psi.StubBasedPsiElementBase.getParent(StubBasedPsiElementBase.java:319)
	at com.koxudaxi.pydantic.PydanticTypeProvider.getReferenceType(PydanticTypeProvider.kt:47)
	at com.jetbrains.python.psi.impl.PyReferenceExpressionImpl.getReferenceTypeFromProviders(PyReferenceExpressionImpl.java:529)
	at com.jetbrains.python.psi.impl.PyTargetExpressionImpl.getType(PyTargetExpressionImpl.java:127)
	at com.jetbrains.python.psi.types.TypeEvalContext.lambda$getType$0(TypeEvalContext.java:177)
	at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:111)
	at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:43)
	at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:68)
	at com.jetbrains.python.psi.types.TypeEvalContext.getType(TypeEvalContext.java:166)
	at com.koxudaxi.pydantic.PydanticKt.getType(Pydantic.kt:124)
	at com.koxudaxi.pydantic.PydanticDataclassTypeProvider$getPydanticDataclass$1.invoke(PydanticDataclassTypeProvider.kt:71)
	at com.koxudaxi.pydantic.PydanticDataclassTypeProvider$getPydanticDataclass$1.invoke(PydanticDataclassTypeProvider.kt:20)
	at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)
	at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:170)
	at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194)
	at kotlin.sequences.SequencesKt___SequencesKt.firstOrNull(_Sequences.kt:167)
	at com.koxudaxi.pydantic.PydanticDataclassTypeProvider.getPydanticDataclass(PydanticDataclassTypeProvider.kt:82)
	at com.koxudaxi.pydantic.PydanticDataclassTypeProvider.getReferenceExpressionType(PydanticDataclassTypeProvider.kt:27)
	at com.jetbrains.python.psi.impl.PyReferenceExpressionImpl.getTypeFromProviders(PyReferenceExpressionImpl.java:383)
	at com.jetbrains.python.psi.impl.PyReferenceExpressionImpl.getType(PyReferenceExpressionImpl.java:217)
	at com.jetbrains.python.psi.types.TypeEvalContext.lambda$getType$0(TypeEvalContext.java:177)
	at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:111)
	at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:43)
	at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:68)
	at com.jetbrains.python.psi.types.TypeEvalContext.getType(TypeEvalContext.java:166)
	at com.jetbrains.python.psi.impl.PyKeyValueExpressionImpl.getType(PyKeyValueExpressionImpl.java:28)
	at com.jetbrains.python.psi.types.TypeEvalContext.lambda$getType$0(TypeEvalContext.java:177)
	at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:111)
	at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:43)
	at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:68)
	at com.jetbrains.python.psi.types.TypeEvalContext.getType(TypeEvalContext.java:166)
	at com.jetbrains.python.psi.types.PyCollectionTypeUtil.getTypedDictTypeFromDictLiteral(PyCollectionTypeUtil.kt:112)
	at com.jetbrains.python.psi.types.PyCollectionTypeUtil.getTypedDictTypeWithModifications(PyCollectionTypeUtil.kt:42)
	at com.jetbrains.python.psi.impl.PyBuiltinCache.createLiteralCollectionType(PyBuiltinCache.java:173)
	at com.jetbrains.python.psi.impl.PyDictLiteralExpressionImpl.getType(PyDictLiteralExpressionImpl.java:28)
	at com.jetbrains.python.psi.types.TypeEvalContext.lambda$getType$0(TypeEvalContext.java:177)
	at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:111)
	at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:43)
	at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:68)
	at com.jetbrains.python.psi.types.TypeEvalContext.getType(TypeEvalContext.java:166)
	at com.jetbrains.python.psi.impl.PyTargetExpressionImpl.getType(PyTargetExpressionImpl.java:162)
	at com.jetbrains.python.psi.types.TypeEvalContext.lambda$getType$0(TypeEvalContext.java:177)
	at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:111)
	at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:43)
	at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:68)
	at com.jetbrains.python.psi.types.TypeEvalContext.getType(TypeEvalContext.java:166)
	at com.jetbrains.python.psi.impl.PyReferenceExpressionImpl.getGenericTypeFromTarget(PyReferenceExpressionImpl.java:471)
	at com.jetbrains.python.psi.impl.PyReferenceExpressionImpl.getTypeFromTarget(PyReferenceExpressionImpl.java:399)
	at com.jetbrains.python.psi.impl.PyReferenceExpressionImpl.getTypeFromTargets(PyReferenceExpressionImpl.java:310)
	at com.jetbrains.python.psi.impl.PyReferenceExpressionImpl.getType(PyReferenceExpressionImpl.java:229)
	at com.jetbrains.python.psi.types.TypeEvalContext.lambda$getType$0(TypeEvalContext.java:177)
	at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:111)
	at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:43)
	at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:68)
	at com.jetbrains.python.psi.types.TypeEvalContext.getType(TypeEvalContext.java:166)
	at com.jetbrains.python.psi.impl.references.PyQualifiedReference.resolveInner(PyQualifiedReference.java:79)
	at com.jetbrains.python.psi.impl.references.PyReferenceImpl.multiResolveInner(PyReferenceImpl.java:106)
	at com.jetbrains.python.psi.impl.references.PyReferenceImpl$CachingResolver.resolve(PyReferenceImpl.java:775)
	at com.jetbrains.python.psi.impl.references.PyReferenceImpl$CachingResolver.resolve(PyReferenceImpl.java:770)
	at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$resolve$1(ResolveCache.java:154)
	at com.intellij.openapi.util.Computable.get(Computable.java:18)
	at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$loggingResolver$4(ResolveCache.java:260)
	at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:111)
	at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:43)
	at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:68)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:237)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:154)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:169)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:162)
	at com.jetbrains.python.psi.impl.references.PyReferenceImpl.multiResolve(PyReferenceImpl.java:93)
	at com.jetbrains.python.psi.PyUtil.multiResolveTopPriority(PyUtil.java:517)
	at com.jetbrains.python.codeInsight.typing.PyTypingTypeProvider.tryResolvingWithAliases(PyTypingTypeProvider.java:1419)
	at com.jetbrains.python.codeInsight.typing.PyTypingTypeProvider.tryResolving(PyTypingTypeProvider.java:1408)
	at com.jetbrains.python.codeInsight.typing.PyTypingTypeProvider.resolveToQualifiedNames(PyTypingTypeProvider.java:1474)
	at com.jetbrains.python.codeInsight.typing.PyTypedDictTypeProvider$Companion.isTypedDict(PyTypedDictTypeProvider.kt:42)
	at com.jetbrains.python.codeInsight.typing.PyTypedDictTypeProvider$Companion.getTypedDictTypeForCallee(PyTypedDictTypeProvider.kt:111)
	at com.jetbrains.python.codeInsight.typing.PyTypedDictTypeProvider$Companion.access$getTypedDictTypeForCallee(PyTypedDictTypeProvider.kt:38)
	at com.jetbrains.python.codeInsight.typing.PyTypedDictTypeProvider.getReferenceExpressionType(PyTypedDictTypeProvider.kt:27)
	at com.jetbrains.python.psi.impl.PyReferenceExpressionImpl.getTypeFromProviders(PyReferenceExpressionImpl.java:383)
	at com.jetbrains.python.psi.impl.PyReferenceExpressionImpl.getType(PyReferenceExpressionImpl.java:217)
	at com.jetbrains.python.psi.types.TypeEvalContext.lambda$getType$0(TypeEvalContext.java:177)
	at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:111)
	at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:43)
	at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:68)
	at com.jetbrains.python.psi.types.TypeEvalContext.getType(TypeEvalContext.java:166)
	at com.koxudaxi.pydantic.PydanticKt.getType(Pydantic.kt:124)
	at com.koxudaxi.pydantic.PydanticKt.getPyClassByPyCallExpression(Pydantic.kt:132)
	at com.koxudaxi.pydantic.PydanticKt.getPydanticPyClass(Pydantic.kt:464)
	at com.koxudaxi.pydantic.PydanticAnnotator.annotatePydanticModelCallableExpression(PydanticAnnotator.kt:22)
	at com.koxudaxi.pydantic.PydanticAnnotator.visitPyCallExpression(PydanticAnnotator.kt:17)
	at com.jetbrains.python.psi.impl.PyCallExpressionImpl.acceptPyVisitor(PyCallExpressionImpl.java:27)
	at com.jetbrains.python.psi.impl.PyBaseElementImpl.accept(PyBaseElementImpl.java:69)
	at com.jetbrains.python.validation.PyAnnotator.annotateElement(PyAnnotator.java:44)
	at com.jetbrains.python.validation.PyAnnotatingVisitor.runAnnotators(PyAnnotatingVisitor.java:63)
	at com.jetbrains.python.validation.PyCompositeAnnotator.annotate(PyCompositeAnnotator.java:15)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.runAnnotators(DefaultHighlightVisitor.java:134)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:114)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.runVisitors(GeneralHighlightingPass.java:335)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$collectHighlights$5(GeneralHighlightingPass.java:274)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:294)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$6(GeneralHighlightingPass.java:297)
	at com.intellij.codeInsight.daemon.RainbowVisitor.analyze(RainbowVisitor.java:50)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:297)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$6(GeneralHighlightingPass.java:297)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:94)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:297)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:265)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:211)
	at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:84)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:56)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:414)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1078)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:407)
	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.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:406)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:382)
	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.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:380)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:188)
	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)
@koxudaxi
Copy link
Owner

koxudaxi commented Oct 6, 2021

Thank you for the report!!
I will check it.

@aphedges
Copy link

I'm getting a similar error. To not clutter the tracker with extra issues, I'll post it here. Hopefully the second data point helps.

Describe the bug

Pydantic plugin crashes.

To Reproduce

Unclear. The only thing I can tell is that the error is about a PyTorch stub and the code I had just opened uses PyTorch.

Expected behavior

The plugin does not crash.

Environments:

  • IDE: PyCharm 2021.3.1 (Professional Edition)
  • OS: macOS 11.6.3
  • Pydantic Version: n/a
  • Plugin version 0.3.10

Note: Pydantic is not installed in the environment used by the active window, but two of the other windows open includes Pydantic and PyTorch in their environments. However, I had not accessed Pydantic or PyTorch code in either recently.

Additional context

Outdated stub in index: file:///Users/ahedges/Library/Caches/JetBrains/PyCharm2021.3/python_stubs/581821779/torch/_C/__init__.py indexing timestamp = 1643155077087, binary = false, byte size = 0, char size = 0, doc=DocumentImpl[file:///Users/ahedges/Library/Caches/JetBrains/PyCharm2021.3/python_stubs/581821779/torch/_C/__init__.py], docSaved=true, wasIndexedAlready=true, queried at 1643155077087
doc length=71708
file length=71708
cached PSI class com.jetbrains.python.psi.impl.PyFileImpl
projects with file: 1
physical file exists; length = 71708

java.lang.Exception
	at com.intellij.psi.stubs.StubTreeLoaderImpl.diagnoseLengthMismatch(StubTreeLoaderImpl.java:181)
	at com.intellij.psi.stubs.StubTreeLoaderImpl.checkLengthMatch(StubTreeLoaderImpl.java:147)
	at com.intellij.psi.stubs.StubTreeLoaderImpl.readFromVFile(StubTreeLoaderImpl.java:114)
	at com.intellij.psi.stubs.StubTreeLoaderImpl.readOrBuild(StubTreeLoaderImpl.java:39)
	at com.intellij.psi.impl.source.PsiFileImpl.getStubTree(PsiFileImpl.java:634)
	at com.intellij.psi.impl.source.PsiFileImpl.getStub(PsiFileImpl.java:597)
	at com.jetbrains.python.psi.impl.PyFileImpl.getDunderAll(PyFileImpl.java:495)
	at com.jetbrains.python.psi.PyUtil.isStarImportableFrom(PyUtil.java:1558)
	at com.jetbrains.python.psi.impl.PyStarImportElementImpl.calculateMultiResolveName(PyStarImportElementImpl.java:95)
	at com.jetbrains.python.psi.PyUtil.getNullableParameterizedCachedValue(PyUtil.java:676)
	at com.jetbrains.python.psi.PyUtil.getParameterizedCachedValue(PyUtil.java:654)
	at com.jetbrains.python.psi.impl.PyStarImportElementImpl.multiResolveName(PyStarImportElementImpl.java:84)
	at com.jetbrains.python.psi.resolve.PyResolveProcessor.resolveInImportedNameDefiner(PyResolveProcessor.java:99)
	at com.jetbrains.python.psi.resolve.PyResolveProcessor.execute(PyResolveProcessor.java:51)
	at com.jetbrains.python.psi.impl.PyFileImpl$ExportedNameCache.multiResolve(PyFileImpl.java:145)
	at com.jetbrains.python.psi.impl.PyFileImpl.lambda$multiResolveName$0(PyFileImpl.java:408)
	at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:114)
	at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:44)
	at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:68)
	at com.jetbrains.python.psi.impl.PyFileImpl.multiResolveName(PyFileImpl.java:407)
	at com.jetbrains.python.psi.impl.PyFileImpl.multiResolveName(PyFileImpl.java:401)
	at com.jetbrains.python.psi.types.PyModuleType.resolveMemberInPackageOrModule(PyModuleType.java:91)
	at com.jetbrains.python.psi.types.PyModuleType.resolveMember(PyModuleType.java:73)
	at com.jetbrains.python.psi.types.PyUnionType.resolveMember(PyUnionType.java:41)
	at com.jetbrains.python.psi.impl.references.PyQualifiedReference.resolveInner(PyQualifiedReference.java:89)
	at com.jetbrains.python.psi.impl.references.PyReferenceImpl.multiResolveInner(PyReferenceImpl.java:107)
	at com.jetbrains.python.psi.impl.references.PyReferenceImpl$CachingResolver.resolve(PyReferenceImpl.java:776)
	at com.jetbrains.python.psi.impl.references.PyReferenceImpl$CachingResolver.resolve(PyReferenceImpl.java:771)
	at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$resolve$1(ResolveCache.java:154)
	at com.intellij.openapi.util.Computable.get(Computable.java:18)
	at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$loggingResolver$4(ResolveCache.java:260)
	at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:114)
	at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:44)
	at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:68)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:237)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:154)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:169)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:162)
	at com.jetbrains.python.psi.impl.references.PyReferenceImpl.multiResolve(PyReferenceImpl.java:94)
	at com.jetbrains.python.psi.PyUtil.multiResolveTopPriority(PyUtil.java:517)
	at com.koxudaxi.pydantic.PydanticKt.getResolvedPsiElements(Pydantic.kt:254)
	at com.koxudaxi.pydantic.PydanticDataclassTypeProvider.getPydanticDataclass(PydanticDataclassTypeProvider.kt:64)
	at com.koxudaxi.pydantic.PydanticDataclassTypeProvider.getReferenceExpressionType(PydanticDataclassTypeProvider.kt:27)
	at com.jetbrains.python.psi.impl.PyReferenceExpressionImpl.getTypeFromProviders(PyReferenceExpressionImpl.java:383)
	at com.jetbrains.python.psi.impl.PyReferenceExpressionImpl.getType(PyReferenceExpressionImpl.java:217)
	at com.jetbrains.python.psi.types.TypeEvalContext.lambda$getType$0(TypeEvalContext.java:176)
	at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:114)
	at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:44)
	at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:68)
	at com.jetbrains.python.psi.types.TypeEvalContext.getType(TypeEvalContext.java:165)
	at com.jetbrains.python.psi.impl.references.PyQualifiedReference.resolveInner(PyQualifiedReference.java:79)
	at com.jetbrains.python.psi.impl.references.PyReferenceImpl.multiResolveInner(PyReferenceImpl.java:107)
	at com.jetbrains.python.psi.impl.references.PyReferenceImpl$CachingResolver.resolve(PyReferenceImpl.java:776)
	at com.jetbrains.python.psi.impl.references.PyReferenceImpl$CachingResolver.resolve(PyReferenceImpl.java:771)
	at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$resolve$1(ResolveCache.java:154)
	at com.intellij.openapi.util.Computable.get(Computable.java:18)
	at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$loggingResolver$4(ResolveCache.java:260)
	at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:114)
	at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:44)
	at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:68)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:237)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:154)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:169)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:162)
	at com.jetbrains.python.psi.impl.references.PyReferenceImpl.multiResolve(PyReferenceImpl.java:94)
	at com.jetbrains.python.psi.impl.references.PyReferenceImpl.resolve(PyReferenceImpl.java:73)
	at com.jetbrains.python.codeInsight.regexp.PythonRegexpInjector.resolvePossibleRegexpCall(PythonRegexpInjector.java:75)
	at com.jetbrains.python.codeInsight.regexp.PythonRegexpInjector.getLanguagesToInject(PythonRegexpInjector.java:60)
	at com.intellij.psi.impl.source.tree.injected.InjectedLanguageManagerImpl.processInPlaceInjectorsFor(InjectedLanguageManagerImpl.java:442)
	at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.probeElementsUp(InjectedLanguageUtilBase.java:248)
	at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.enumerate(InjectedLanguageUtilBase.java:178)
	at com.intellij.psi.impl.source.tree.injected.InjectedLanguageManagerImpl.enumerateEx(InjectedLanguageManagerImpl.java:326)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.queryLineMarkersForInjected(LineMarkersPass.java:219)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.queryProviders(LineMarkersPass.java:181)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.lambda$doCollectInformation$3(LineMarkersPass.java:93)
	at com.intellij.codeInsight.daemon.impl.Divider.divideInsideAndOutsideInOneRoot(Divider.java:115)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.doCollectInformation(LineMarkersPass.java:80)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:56)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:414)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1084)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:407)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:624)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:698)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:646)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:623)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:406)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:382)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:174)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:181)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:380)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:184)
	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)

@koxudaxi
Copy link
Owner

koxudaxi commented Feb 2, 2022

@aphedges
Thank you for sharing the error.
I will ask the problem to JetBrains teams.

@koxudaxi
Copy link
Owner

koxudaxi commented Mar 2, 2023

@tonal @aphedges
I'm sorry for my too-late fix.
I have released a new version v0.4.0 in the market
The version dropped unnecessary resolving for an object reference.
It means the update reduces CPU load and fixes unexpected errors.

I closed the PR because the root cause method was removed from the plugin's source code.
Thank you.

@koxudaxi koxudaxi closed this as completed Mar 2, 2023
@aphedges
Copy link

Thanks for fixing this!

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

No branches or pull requests

3 participants