PsiInvalidElementAccessException because different providers

Answered

Can anyone explain why this exception occurs?

com.intellij.diagnostic.PluginException: Element: class com.jetbrains.python.psi.impl.PyReferenceExpressionImpl #Python  because: different providers: com.intellij.psi.DummyHolderViewProvider{vFile=LightVirtualFile: /DummyHolder, content=VirtualFileContent{size=0}, eventSystemEnabled=false}(16a6790e); com.intellij.psi.SingleRootFileViewProvider{vFile=LightVirtualFile: /DummyHolder, content=VirtualFileContent{size=0}, eventSystemEnabled=true}(49b15b25)
invalidated at: see attachment [Plugin: PythonCore]
    at com.intellij.ide.plugins.PluginManagerCore.createPluginException(PluginManagerCore.java:270)
    at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:12)
    at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:92)
    at com.intellij.psi.util.PsiUtilCore.ensureValid(PsiUtilCore.java:476)
    at com.jetbrains.python.psi.impl.PyPsiUtils.assertValid(PyPsiUtils.java:578)
    at com.jetbrains.python.psi.impl.references.PyQualifiedReference.resolveInner(PyQualifiedReference.java:66)
    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.jetbrains.python.codeInsight.typing.PyTypingTypeProvider.tryResolvingWithAliases(PyTypingTypeProvider.java:1520)
    at com.jetbrains.python.codeInsight.typing.PyTypingTypeProvider.tryResolving(PyTypingTypeProvider.java:1509)
    at com.jetbrains.python.codeInsight.typing.PyTypingTypeProvider.resolveToQualifiedNames(PyTypingTypeProvider.java:1575)
    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: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.PyCallExpressionHelper.getExplicitResolveResults(PyCallExpressionHelper.java:220)
    at com.jetbrains.python.psi.impl.PyCallExpressionHelper.lambda$multiResolveCallee$1(PyCallExpressionHelper.java:194)
    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.PyCallExpressionHelper.multiResolveCallee(PyCallExpressionHelper.java:190)
    at com.jetbrains.python.psi.impl.PyCallExpressionImpl.multiResolveCallee(PyCallExpressionImpl.java:47)
    at com.jetbrains.python.psi.PyCallExpression.multiResolveCalleeFunction(PyCallExpression.java:136)
    ..................................................................................
    ..................................................................................
    ..................................................................................
    ..................................................................................
    at com.intellij.idea.ApplicationLoader$startApp$3$1$1.run(ApplicationLoader.kt:198)
    at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:94)
    at com.intellij.idea.ApplicationLoader$startApp$3$1.run(ApplicationLoader.kt:197)
    at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:214)
    at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:21)
    at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:196)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
    at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:348)
    at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:82)
    at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:131)
    at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:47)
    at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:187)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:891)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:760)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:447)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:818)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:446)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:492)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: com.intellij.psi.PsiInvalidElementAccessException: Element: class com.jetbrains.python.psi.impl.PyReferenceExpressionImpl #Python  because: different providers: com.intellij.psi.DummyHolderViewProvider{vFile=LightVirtualFile: /DummyHolder, content=VirtualFileContent{size=0}, eventSystemEnabled=false}(16a6790e); com.intellij.psi.SingleRootFileViewProvider{vFile=LightVirtualFile: /DummyHolder, content=VirtualFileContent{size=0}, eventSystemEnabled=true}(49b15b25)
invalidated at: see attachment
    ... 80 more
1 comment
Comment actions Permalink

Hi Sanjay,

Please provide us with more information. The error context is unclear. If it is thrown from your plugin, then please paste the code that this error is related to. If it's not related to plugin development, then it should be moved to the product forum.

0

Please sign in to leave a comment.