Hannah-Sten / TeXiFy-IDEA

LaTeX support for the IntelliJ platform by JetBrains.
https://hannah-sten.github.io/TeXiFy-IDEA
MIT License
897 stars 90 forks source link

com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: Read access is allowed from inside read-action only (see Application.runReadAction()); see https://jb.gg/ij-platform-threading for details #3763

Open tompkins-ct opened 3 days ago

tompkins-ct commented 3 days ago

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

PyCharm 2024.2.3 (build PY-242.23339.19)

Operating System

Mac OS X 14.7 (aarch64)

TeXiFy IDEA version

0.9.8

Description

Stacktrace

com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: Read access is allowed from inside read-action only (see Application.runReadAction()); see https://jb.gg/ij-platform-threading for details
Current thread: Thread[#20660,DefaultDispatcher-worker-4,6,main] 2090137203 (EventQueue.isDispatchThread()=false)
SystemEventQueueThread: Thread[#60,AWT-EventQueue-0,6,main] 967345237
    at com.intellij.util.concurrency.ThreadingAssertions.createThreadAccessException(ThreadingAssertions.java:177)
    at com.intellij.util.concurrency.ThreadingAssertions.softAssertReadAccess(ThreadingAssertions.java:129)
    at com.intellij.psi.impl.file.impl.FileManagerImpl.getCachedPsiFile(FileManagerImpl.java:388)
    at com.intellij.psi.impl.PsiDocumentManagerBase.getCachedPsiFile(PsiDocumentManagerBase.java:146)
    at com.intellij.psi.impl.PsiDocumentManagerBase.getCachedPsiFile(PsiDocumentManagerBase.java:128)
    at com.intellij.psi.impl.PsiDocumentManagerBase.getPsiFile(PsiDocumentManagerBase.java:91)
    at com.intellij.psi.impl.PsiDocumentManagerImpl.getPsiFile(PsiDocumentManagerImpl.java:62)
    at nl.hannahsten.texifyidea.util.files.FilesKt.psiFile(Files.kt:106)
    at nl.hannahsten.texifyidea.editor.GraphicsDragAndDropHandler.handleDrop$suspendImpl(GraphicsDragAndDropHandler.kt:27)
    at nl.hannahsten.texifyidea.editor.GraphicsDragAndDropHandler.handleDrop(GraphicsDragAndDropHandler.kt)
    at com.intellij.openapi.editor.FileDropManager.handleDrop(FileDropManager.kt:63)
    at com.intellij.openapi.editor.FileDropManager.access$handleDrop(FileDropManager.kt:39)
    at com.intellij.openapi.editor.FileDropManager$scheduleDrop$1.invokeSuspend(FileDropManager.kt:47)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
    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)