Skip to content

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

@lukbukkit

Description

@lukbukkit

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)

Metadata

Metadata

Assignees

Labels

crash-reportReports of crashes that popped up in IDEA.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions