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

com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: Read access is allowed from inside read-action only (see Application.runReadAction()); If you access or modify model on EDT consider wrapping your code in WriteIntentReadAction or ReadAction #3873

Closed
lukbukkit opened this issue Jan 30, 2025 · 1 comment · Fixed by #3898
Assignees
Labels
crash-report Reports of crashes that popped up in IDEA.
Milestone

Comments

@lukbukkit
Copy link

Type of JetBrains IDE (IntelliJ, PyCharm, etc.) and version

IntelliJ IDEA 2024.3.2 (build IU-243.23654.117)

Operating System

Mac OS X 15.3 (aarch64)

TeXiFy IDEA version

0.10.0

Description

This error appeared shortly after opening my LaTeX project in IntelliJ.

Stacktrace

com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: Read access is allowed from inside read-action only (see Application.runReadAction()); If you access or modify model on EDT consider wrapping your code in WriteIntentReadAction  or ReadAction; see https://jb.gg/ij-platform-threading for details
Current thread: Thread[#145,DefaultDispatcher-worker-58,5,main] 284070519 (EventQueue.isDispatchThread()=false)
SystemEventQueueThread: Thread[#63,AWT-EventQueue-0,6,main] 1896209040
	at com.intellij.util.concurrency.ThreadingAssertions.createThreadAccessException(ThreadingAssertions.java:218)
	at com.intellij.util.concurrency.ThreadingAssertions.softAssertReadAccess(ThreadingAssertions.java:155)
	at com.intellij.psi.impl.file.impl.FileManagerImpl.findDirectory(FileManagerImpl.java:407)
	at com.intellij.psi.impl.PsiManagerImpl.findDirectory(PsiManagerImpl.java:175)
	at com.intellij.psi.impl.source.PsiFileImpl.getContainingDirectory(PsiFileImpl.java:456)
	at nl.hannahsten.texifyidea.util.files.PsiFileKt.findFile(PsiFile.kt:143)
	at nl.hannahsten.texifyidea.util.files.PsiFileKt.findFile$default(PsiFile.kt:141)
	at nl.hannahsten.texifyidea.util.files.RootFileKt.findRootFilesWithoutCache(RootFile.kt:28)
	at nl.hannahsten.texifyidea.util.files.RootFileKt$findRootFilesWithoutCache$1.invokeSuspend(RootFile.kt)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at kotlinx.coroutines.internal.SoftLimitedDispatcher$Worker.run(SoftLimitedDispatcher.kt:125)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:608)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:873)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:763)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:750)

@lukbukkit lukbukkit added crash-report Reports of crashes that popped up in IDEA. untriaged Issue type still needs to be triaged or verified. labels Jan 30, 2025
@PHPirates PHPirates removed the untriaged Issue type still needs to be triaged or verified. label Jan 30, 2025
@PHPirates PHPirates marked this as a duplicate of #3882 Feb 4, 2025
@PHPirates PHPirates added this to the 0.10.1 milestone Feb 7, 2025
@PHPirates PHPirates self-assigned this Feb 7, 2025
@PHPirates PHPirates marked this as a duplicate of #3888 Feb 7, 2025
@PHPirates PHPirates marked this as a duplicate of #3892 Feb 7, 2025
@lukbukkit
Copy link
Author

Thanks for the fix!

@PHPirates PHPirates marked this as a duplicate of #3900 Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash-report Reports of crashes that popped up in IDEA.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants