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

[Automated Report] com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: Access is allowed with explicit read lock. #898

Open
eplatonoff opened this issue Jan 25, 2025 · 0 comments
Assignees

Comments

@eplatonoff
Copy link

Message

Stacktrace

com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: Access is allowed with explicit read lock.
Now each coroutine scheduled on EDT wrapped in implicit write intent lock (which implies read lock too). This implicit lock will be removed in future releases.
Please, use explicit lock API like ReadAction.run(), WriteIntentReadAction.run(), readAction() or writeIntentReadAction() to wrap code which needs lock to access model or PSI.
Please note, that read action API can re-schedule your code to background threads, if you are sure that your code need to be executed on EDT, you need to use write intent read action.
Also, consult with https://jb.gg/ij-platform-threading
at com.intellij.util.concurrency.ThreadingAssertions.reportImplicitRead(ThreadingAssertions.java:139)
at com.intellij.util.concurrency.ThreadingAssertions.assertReadAccess(ThreadingAssertions.java:130)
at com.intellij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexDataImpl.ensureIsUpToDate(WorkspaceFileIndexDataImpl.kt:157)
at com.intellij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexDataImpl.getFileInfo(WorkspaceFileIndexDataImpl.kt:98)
at com.intellij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexImpl.getFileInfo(WorkspaceFileIndexImpl.kt:267)
at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.isUnderIgnored(ProjectFileIndexImpl.java:78)
at com.intellij.openapi.roots.impl.ProjectFileIndexFacade.isUnderIgnored(ProjectFileIndexFacade.java:73)
at com.intellij.psi.impl.file.impl.FileManagerImpl.isExcludedOrIgnored(FileManagerImpl.java:455)
at com.intellij.psi.impl.file.impl.FileManagerImpl.findDirectoryImpl(FileManagerImpl.java:441)
at com.intellij.psi.impl.file.impl.FileManagerImpl.findDirectory(FileManagerImpl.java:434)
at com.intellij.psi.impl.PsiManagerImpl.findDirectory(PsiManagerImpl.java:175)
at com.intellij.psi.AbstractFileViewProvider.shouldCreatePsi(AbstractFileViewProvider.java:91)
at com.intellij.psi.SingleRootFileViewProvider.createFile(SingleRootFileViewProvider.java:147)
at com.intellij.psi.SingleRootFileViewProvider.getPsiInner(SingleRootFileViewProvider.java:103)
at com.intellij.psi.AbstractFileViewProvider.getPsi(AbstractFileViewProvider.java:187)
at com.intellij.psi.impl.file.impl.FileManagerImpl.findFile(FileManagerImpl.java:396)
at com.intellij.psi.impl.PsiDocumentManagerBase.getPsiFile(PsiDocumentManagerBase.java:156)
at com.intellij.psi.impl.PsiDocumentManagerBase.getPsiFile(PsiDocumentManagerBase.java:105)
at com.intellij.psi.impl.PsiDocumentManagerImpl.getPsiFile(PsiDocumentManagerImpl.java:62)
at net.seesharpsoft.intellij.plugins.csv.editor.table.CsvTableEditor.getCsvFile(CsvTableEditor.java:220)
at net.seesharpsoft.intellij.plugins.csv.editor.table.CsvTableEditor.getPsiFile(CsvTableEditor.java:207)
at net.seesharpsoft.intellij.plugins.csv.editor.table.CsvTableModelBase.getPsiFile(CsvTableModelBase.java:78)
at net.seesharpsoft.intellij.plugins.csv.editor.table.CsvTableModelBase.addPsiTreeChangeListener(CsvTableModelBase.java:48)
at net.seesharpsoft.intellij.plugins.csv.editor.table.CsvTableModelBase.(CsvTableModelBase.java:40)
at net.seesharpsoft.intellij.plugins.csv.editor.table.swing.CsvTableModelSwing.(CsvTableModelSwing.java:38)
at net.seesharpsoft.intellij.plugins.csv.editor.table.swing.CsvTableEditorSwing.createUIComponents(CsvTableEditorSwing.java:62)
at net.seesharpsoft.intellij.plugins.csv.editor.table.swing.CsvTableEditorSwing.$$$setupUI$$$(CsvTableEditorSwing.java)
at net.seesharpsoft.intellij.plugins.csv.editor.table.swing.CsvTableEditorSwing.(CsvTableEditorSwing.java:52)
at net.seesharpsoft.intellij.plugins.csv.editor.table.CsvTableEditorProvider$1.build(CsvTableEditorProvider.java:69)
at com.intellij.openapi.fileEditor.AsyncFileEditorProvider$createFileEditor$2.invokeSuspend(AsyncFileEditorProvider.kt:37)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:225)
at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:117)
at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:43)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:781)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:728)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:750)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:582)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:480)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$12$lambda$11$lambda$10$lambda$9(IdeEventQueue.kt:307)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:857)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$12$lambda$11$lambda$10(IdeEventQueue.kt:306)
at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$2$lambda$1(IdeEventQueue.kt:948)
at com.intellij.openapi.application.WriteIntentReadAction.lambda$run$0(WriteIntentReadAction.java:24)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction$lambda$6(AnyThreadWriteThreadingSupport.kt:263)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWithTemporaryThreadLocal(AnyThreadWriteThreadingSupport.kt:214)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:263)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteIntentReadAction(ApplicationImpl.java:927)
at com.intellij.openapi.application.WriteIntentReadAction.compute(WriteIntentReadAction.java:55)
at com.intellij.openapi.application.WriteIntentReadAction.run(WriteIntentReadAction.java:23)
at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$2(IdeEventQueue.kt:945)
at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$3(IdeEventQueue.kt:959)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:109)
at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:959)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$12(IdeEventQueue.kt:301)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:341)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

Plugin

PluginClassLoader(plugin=PluginDescriptor(name=CSV Editor, id=net.seesharpsoft.intellij.plugins.csv, descriptorPath=plugin.xml, path=/Library/Application Support/JetBrains/CLion2025.1/plugins/intellij-csv-validator, version=4.0.2, package=null, isBundled=false), packagePrefix=null, state=active, parents=PluginDescriptor(name=GitHub, id=org.jetbrains.plugins.github, moduleName=intellij.vcs.github.tracker, descriptorPath=intellij.vcs.github.tracker.xml, path=/Applications/CLion.app/Contents/plugins/vcs-github-IU, version=IU-251.14649.40, package=org.jetbrains.plugins.github.tasks, isBundled=true), PluginDescriptor(name=GitHub, id=org.jetbrains.plugins.github, moduleName=intellij.vcs.github.json, descriptorPath=intellij.vcs.github.json.xml, path=/Applications/CLion.app/Contents/plugins/vcs-github-IU, version=IU-251.14649.40, package=org.jetbrains.plugins.github.json, isBundled=true), PluginDescriptor(name=GitHub, id=org.jetbrains.plugins.github, moduleName=intellij.vcs.github.ultimate/cron, descriptorPath=intellij.vcs.github.ultimate.cron.xml, path=/Applications/CLion.app/Contents/plugins/vcs-github-IU, version=IU-251.14649.40, package=com.intellij.vcs.github.ultimate.cron, isBundled=true), PluginDescriptor(name=GitHub, id=org.jetbrains.plugins.github, moduleName=intellij.vcs.github.ultimate/docker, descriptorPath=intellij.vcs.github.ultimate.docker.xml, path=/Applications/CLion.app/Contents/plugins/vcs-github-IU, version=IU-251.14649.40, package=com.intellij.vcs.github.ultimate.action.runs.docker, isBundled=true), PluginDescriptor(name=IDEA CORE, id=com.intellij, moduleName=intellij.platform.vcs.impl, descriptorPath=intellij.platform.vcs.impl.xml, path=/Applications/CLion.app/Contents/lib, version=251.14649.40, package=null, isBundled=true), PluginDescriptor(name=IDEA CORE, id=com.intellij, moduleName=intellij.platform.vcs.log.impl, descriptorPath=intellij.platform.vcs.log.impl.xml, path=/Applications/CLion.app/Contents/lib, version=251.14649.40, package=null, isBundled=true), PluginDescriptor(name=IDEA CORE, id=com.intellij, moduleName=intellij.platform.vcs.dvcs.impl, descriptorPath=intellij.platform.vcs.dvcs.impl.xml, path=/Applications/CLion.app/Contents/lib, version=251.14649.40, package=null, isBundled=true), PluginDescriptor(name=IDEA CORE, id=com.intellij, moduleName=intellij.platform.collaborationTools, descriptorPath=intellij.platform.collaborationTools.xml, path=/Applications/CLion.app/Contents/lib, version=251.14649.40, package=null, isBundled=true), PluginDescriptor(name=GitHub, id=org.jetbrains.plugins.github, moduleName=intellij.vcs.github, descriptorPath=intellij.vcs.github.xml, path=/Applications/CLion.app/Contents/plugins/vcs-github-IU, version=IU-251.14649.40, package=null, isBundled=true), PluginDescriptor(name=GitHub, id=org.jetbrains.plugins.github, descriptorPath=plugin.xml, path=~/Applications/CLion.app/Contents/plugins/vcs-github-IU, version=IU-251.14649.40, package=com.intellij.vcs.github.ultimate, isBundled=true), )

IDE

CLion (CL-251.14649.40)

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

No branches or pull requests

2 participants