Using Intellij 2025.1-beta2 I’ve the following error (or similar) in the logs:
2025-03-15 22:48:02,170 [44989024] SEVERE - #c.i.o.a.i.AnyThreadWriteThreadingSupport - IntelliJ IDEA 2025.1 Beta Build #IC-251.23774.109
2025-03-15 22:48:02,170 [44989024] SEVERE - #c.i.o.a.i.AnyThreadWriteThreadingSupport - JDK: 21.0.6; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
2025-03-15 22:48:02,170 [44989024] SEVERE - #c.i.o.a.i.AnyThreadWriteThreadingSupport - OS: Linux
2025-03-15 22:48:02,170 [44989024] SEVERE - #c.i.o.a.i.AnyThreadWriteThreadingSupport - Plugin to blame: Easy Gitlab version: 12.5.4
2025-03-15 22:48:02,170 [44989024] SEVERE - #c.i.u.c.ThreadingAssertions - This thread requested read access, but it does not have permission to use locks.
2025-03-15 22:48:02,170 [44989024] SEVERE - #c.i.u.c.ThreadingAssertions - This thread requested read access, but it does not have permission to use locks.
The use of the RW lock is forbidden by `Dispatchers.Main.immediate`. This dispatcher is intended for pure UI operations, which do not interact with the IntelliJ Platform model (PSI, VFS, etc.).
The following solutions are available:
1. Consider moving the model access outside `Dispatchers.Main.immediate`. This would help to ensure that the UI is responsive.
2. Consider using legacy `Dispatchers.EDT` that permits usage of the RW lock. In this case, you can wrap the model-accessing code in `Dispatchers.EDT`
See https://jb.gg/ij-platform-threading for details
Current thread: Thread[#44,AWT-EventQueue-0,6,InnocuousThreadGroup] 2068819076 (EventQueue.isDispatchThread()=true)
SystemEventQueueThread: (same)
com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: This thread requested read access, but it does not have permission to use locks.
The use of the RW lock is forbidden by `Dispatchers.Main.immediate`. This dispatcher is intended for pure UI operations, which do not interact with the IntelliJ Platform model (PSI, VFS, etc.).
The following solutions are available:
1. Consider moving the model access outside `Dispatchers.Main.immediate`. This would help to ensure that the UI is responsive.
2. Consider using legacy `Dispatchers.EDT` that permits usage of the RW lock. In this case, you can wrap the model-accessing code in `Dispatchers.EDT`
See https://jb.gg/ij-platform-threading for details
Current thread: Thread[#44,AWT-EventQueue-0,6,InnocuousThreadGroup] 2068819076 (EventQueue.isDispatchThread()=true)
SystemEventQueueThread: (same)
at com.intellij.util.concurrency.ThreadingAssertions.createLockingForbiddenException(ThreadingAssertions.java:262)
at com.intellij.util.concurrency.ThreadingAssertions.trySoftAssertReadAccessWhenLocksAreForbidden(ThreadingAssertions.java:148)
at com.intellij.util.concurrency.ThreadingAssertions.assertReadAccess(ThreadingAssertions.java:141)
at com.intellij.openapi.editor.impl.view.EditorView.assertReadAccess(EditorView.java:816)
at com.intellij.openapi.editor.impl.view.EditorView.logicalPositionToOffset(EditorView.java:127)
at com.intellij.openapi.editor.impl.EditorImpl.lambda$logicalPositionToOffset$58(EditorImpl.java:2506)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runReadAction$lambda$10(AnyThreadWriteThreadingSupport.kt:455)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWithTemporaryThreadLocal(AnyThreadWriteThreadingSupport.kt:204)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runReadAction(AnyThreadWriteThreadingSupport.kt:455)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runReadAction(AnyThreadWriteThreadingSupport.kt:369)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:949)
at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:66)
at com.intellij.openapi.editor.impl.EditorImpl.logicalPositionToOffset(EditorImpl.java:2506)
at com.intellij.openapi.editor.Editor.visualPositionToOffset(Editor.java:205)
at com.intellij.openapi.editor.impl.CaretImpl.updateVisualLineInfo(CaretImpl.java:699)
at com.intellij.openapi.editor.impl.CaretImpl.updateVisualPosition(CaretImpl.java:692)
at com.intellij.openapi.editor.impl.CaretModelImpl.updateVisualPosition(CaretModelImpl.java:122)
at com.intellij.openapi.editor.impl.CaretModelImpl.onAdded(CaretModelImpl.java:585)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at com.intellij.util.EventDispatcher.dispatchVoidMethod(EventDispatcher.java:120)
at com.intellij.util.EventDispatcher.lambda$createMulticaster$1(EventDispatcher.java:85)
at jdk.proxy2/jdk.proxy2.$Proxy293.onAdded(Unknown Source)
at com.intellij.openapi.editor.impl.InlayModelImpl.notifyAdded(InlayModelImpl.java:567)
at com.intellij.openapi.editor.impl.InlayModelImpl.addBlockElement(InlayModelImpl.java:201)
at com.intellij.openapi.editor.impl.InlayModelImpl.addBlockElement(InlayModelImpl.java:184)
at com.intellij.openapi.editor.impl.ComponentInlayManager.add(ComponentInlay.kt:46)
at com.intellij.openapi.editor.ComponentInlayKt.addComponentInlay(ComponentInlay.kt:28)
at com.intellij.collaboration.ui.codereview.editor.EditorComponentInlaysUtilKt.insertComponent(editorComponentInlaysUtil.kt:205)
at com.intellij.collaboration.ui.codereview.editor.EditorComponentInlaysUtilKt.insertComponent$default(editorComponentInlaysUtil.kt:202)
at com.intellij.collaboration.ui.codereview.editor.EditorComponentInlaysUtilKt.insertComponent(editorComponentInlaysUtil.kt:173)
at com.intellij.collaboration.ui.codereview.editor.EditorComponentInlaysUtilKt.access$insertComponent(editorComponentInlaysUtil.kt:1)
at com.intellij.collaboration.ui.codereview.editor.EditorComponentInlaysUtilKt$controlInlay$2$5.emit$lambda$1(editorComponentInlaysUtil.kt:143)
at com.intellij.openapi.application.CoroutinesKt.writeIntentReadAction$lambda$1$lambda$0(coroutines.kt:339)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction$lambda$6(AnyThreadWriteThreadingSupport.kt:274)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWithTemporaryThreadLocal(AnyThreadWriteThreadingSupport.kt:204)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:274)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:222)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteIntentReadAction(ApplicationImpl.java:1009)
at com.intellij.openapi.application.CoroutinesKt.writeIntentReadAction$lambda$1(coroutines.kt:339)
at com.intellij.openapi.progress.CoroutinesKt.blockingContextInner(coroutines.kt:345)
at com.intellij.openapi.progress.CoroutinesKt$blockingContext$2.invokeSuspend(coroutines.kt:237)
at com.intellij.openapi.progress.CoroutinesKt$blockingContext$2.invoke(coroutines.kt)
at com.intellij.openapi.progress.CoroutinesKt$blockingContext$2.invoke(coroutines.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:62)
at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:261)
at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:236)
at com.intellij.openapi.application.CoroutinesKt.writeIntentReadAction(coroutines.kt:338)
at com.intellij.collaboration.ui.codereview.editor.EditorComponentInlaysUtilKt$controlInlay$2$5.emit(editorComponentInlaysUtil.kt:136)
at com.intellij.collaboration.ui.codereview.editor.EditorComponentInlaysUtilKt$controlInlay$2$5.emit(editorComponentInlaysUtil.kt:135)
at kotlinx.coroutines.flow.internal.FlowValueWrapperInternalKt.emitInternal(FlowValueWrapperInternal.kt:39)
at kotlinx.coroutines.flow.StateFlowImpl.collect(StateFlow.kt:397)
at kotlinx.coroutines.flow.ReadonlyStateFlow.collect(Share.kt)
at com.intellij.collaboration.ui.codereview.editor.EditorComponentInlaysUtilKt$controlInlay$2.invokeSuspend(editorComponentInlaysUtil.kt:135)
at com.intellij.collaboration.ui.codereview.editor.EditorComponentInlaysUtilKt$controlInlay$2.invoke(editorComponentInlaysUtil.kt)
at com.intellij.collaboration.ui.codereview.editor.EditorComponentInlaysUtilKt$controlInlay$2.invoke(editorComponentInlaysUtil.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:62)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:163)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
at com.intellij.collaboration.ui.codereview.editor.EditorComponentInlaysUtilKt.controlInlay(editorComponentInlaysUtil.kt:123)
at com.intellij.collaboration.ui.codereview.editor.EditorComponentInlaysUtilKt.access$controlInlay(editorComponentInlaysUtil.kt:1)
at com.intellij.collaboration.ui.codereview.editor.EditorComponentInlaysUtilKt$doRenderInlays$2$2$2.invokeSuspend(editorComponentInlaysUtil.kt:107)
at com.intellij.collaboration.ui.codereview.editor.EditorComponentInlaysUtilKt$doRenderInlays$2$2$2.invoke(editorComponentInlaysUtil.kt)
at com.intellij.collaboration.ui.codereview.editor.EditorComponentInlaysUtilKt$doRenderInlays$2$2$2.invoke(editorComponentInlaysUtil.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startCoroutineUndispatched(Undispatched.kt:27)
at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:90)
at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:123)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:52)
at kotlinx.coroutines.BuildersKt.launch(Unknown Source)
at com.intellij.collaboration.async.CoroutineUtilKt.launchNow(CoroutineUtil.kt:70)
at com.intellij.collaboration.async.CoroutineUtilKt.launchNow$default(CoroutineUtil.kt:69)
at com.intellij.collaboration.ui.codereview.editor.EditorComponentInlaysUtilKt$doRenderInlays$2$2.emit(editorComponentInlaysUtil.kt:106)
at com.intellij.collaboration.ui.codereview.editor.EditorComponentInlaysUtilKt$doRenderInlays$2$2.emit(editorComponentInlaysUtil.kt:88)
at com.intellij.collaboration.ui.codereview.editor.EditorComponentInlaysUtilKt$doRenderInlays$2$invokeSuspend$$inlined$map$1$2.emit(Emitters.kt:219)
at com.gitlab.msciachero.toolwindow.mergerequest.comments.InlayComment$setupReview$1$invokeSuspend$$inlined$map$1$2.emit(Emitters.kt:219)
at kotlinx.coroutines.flow.internal.FlowValueWrapperInternalKt.emitInternal(FlowValueWrapperInternal.kt:39)
at kotlinx.coroutines.flow.StateFlowImpl.collect(StateFlow.kt:397)
at kotlinx.coroutines.flow.StateFlowImpl$collect$1.invokeSuspend(StateFlow.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.prohibitTakingLocksInsideAndRun(AnyThreadWriteThreadingSupport.kt:803)
at com.intellij.openapi.application.impl.ApplicationImpl.prohibitTakingLocksInsideAndRun(ApplicationImpl.java:1315)
at com.intellij.openapi.application.impl.EdtCoroutineDispatcher$wrapWithLocking$$inlined$Runnable$1.run(Runnable.kt:15)
at com.intellij.openapi.application.impl.DispatchedRunnable.run(DispatchedRunnable.kt:42)
at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:240)
at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:25)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:222)
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:585)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:482)
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:864)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$12$lambda$11$lambda$10(IdeEventQueue.kt:306)
at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$3(IdeEventQueue.kt:958)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:109)
at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:958)
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)
But I the lock is completely inside Intellij SDK, so I don’t know how to fix it.