Repository navigation
Description
Problem
In IntelliJ IDEA 2026.3 (builds IU-263.7307.112 and IU-263.7307.200) with LSP4IJ 0.30.0-SNAPSHOT, LSP4IJ's settings page can't show a server's details:
- Opening Settings → Languages & Frameworks → Language Servers (LSP4IJ's page) shows a spinner with "Loading…" that never ends. The page never appears.
- When the page does appear, clicking a server in the list (here LuaLS) leaves the detail panel on the right empty.
Both come from the same exception, thrown while the detail panel of the selected server is built.
(The tree shows two "Language Servers" entries because IntelliJ 2026.3 bundles its own page with the same name; that is a separate issue, #1920. The one stuck here is LSP4IJ's page, as the stack trace below shows.)
Cause
At the same moment, idea.log has this error, with "Plugin to blame: LSP4IJ version: 0.30.0-SNAPSHOT":
SEVERE - Unhandled exception in [ModalityState.NON_MODAL, Dispatchers.Default]
com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: Access from Event Dispatch Thread (EDT) is not allowed; see https://jb.gg/ij-platform-threading for details
Current thread: Thread[#112,AWT-EventQueue-0,6,main] (EventQueue.isDispatchThread()=true)
at com.intellij.util.concurrency.ThreadingAssertions.assertBackgroundThread(ThreadingAssertions.java:145)
at com.intellij.openapi.application.impl.ApplicationImpl.assertIsNonDispatchThread(ApplicationImpl.java:1253)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:143)
at com.intellij.openapi.application.impl.NonBlockingReadActionImpl.executeSynchronously(NonBlockingReadActionImpl.java:306)
at com.redhat.devtools.lsp4ij.internal.ApplicationUtils.runCancellableReadAction(ApplicationUtils.java:59)
at com.redhat.devtools.lsp4ij.LSPIJUtils.getFile(LSPIJUtils.java:562)
at com.redhat.devtools.lsp4ij.settings.ui.JsonTextField.setJsonFilename(JsonTextField.java:92)
at com.redhat.devtools.lsp4ij.settings.ui.LanguageServerPanel.createClientConfigurationField(LanguageServerPanel.java:472)
at com.redhat.devtools.lsp4ij.settings.ui.LanguageServerPanel.addConfigurationTab(LanguageServerPanel.java:319)
at com.redhat.devtools.lsp4ij.settings.ui.LanguageServerPanel.createUI(LanguageServerPanel.java:237)
at com.redhat.devtools.lsp4ij.settings.ui.LanguageServerPanel.<init>(LanguageServerPanel.java:109)
at com.redhat.devtools.lsp4ij.settings.LanguageServerView.createSettings(LanguageServerView.java:407)
at com.redhat.devtools.lsp4ij.settings.LanguageServerView.<init>(LanguageServerView.java:80)
at com.redhat.devtools.lsp4ij.settings.LanguageServerConfigurable.createOptionsPanel(LanguageServerConfigurable.java:69)
at com.intellij.openapi.ui.NamedConfigurable.createComponent(NamedConfigurable.java:132)
at com.intellij.openapi.ui.MasterDetailsComponent.updateSelection(MasterDetailsComponent.java:612)
at com.intellij.openapi.ui.MasterDetailsComponent.updateSelectionFromTree(MasterDetailsComponent.java:261)
at com.intellij.openapi.ui.MasterDetailsComponent.addNotify(MasterDetailsComponent.java:239)
...
at com.intellij.ui.CardLayoutPanel.select(CardLayoutPanel.java:110)
Claude Code traced it through the code like this:
- When the page opens,
MasterDetailsComponentselects the first server in the list and builds its detail panel on the EDT (LanguageServerConfigurable.createOptionsPanel→LanguageServerPanel.createUI). createClientConfigurationFieldcallsclientConfigurationWidget.setJsonFilename(...), which renames the editor's virtual file so the right JSON schema applies. To get that file,JsonTextField.setJsonFilenamecallsLSPIJUtils.getFile(document, project).LSPIJUtils.getFile(Document, Disposable)only reads directly ifisReadAccessAllowed(). Here the EDT has no read access, so it goes toApplicationUtils.runCancellableReadAction, which isReadAction.nonBlocking(...).executeSynchronously(). The platform forbids that on the EDT and throws.- The exception aborts building the panel. When this happens while the page itself is being shown (
MasterDetailsComponent.addNotifyinsideCardLayoutPanel.select), the settings dialog keeps showing its "Loading…" placeholder. When it happens on a click in the server list, the trace goes throughAutoScrollToSourceHandler.onMouseClicked→MasterDetailsComponent.updateSelectionFromTreeto the samecreateOptionsPanel, and the detail panel stays empty.
idea.log has this exception three times: twice in build .112 (once on opening the page, once on a click in the list) and once in build .200 (on opening the page).
Related
#1807 fixed the same exception on closing the page (LanguageServerPanel.dispose → resetJsonSchema → setJsonFilename, reported in #1650) by not renaming the file on dispose. The opening path is still on main: LanguageServerPanel.createClientConfigurationField still calls setJsonFilename (line 541 on main).
The same call, and so the same risk, is also in:
InstallerPanel(installerConfigurationWidget.setJsonFilename(...), line 94 in our checkout)WorkspaceFoldersPanel(jsonEditor.setJsonFilename(...), line 124)LanguageServerPanelline 561 (configurationWidget.resetJsonSchema()outside of dispose)SchemaBackedJsonTextField.setJsonSchema, which callssetJsonFilenameitself
Possible fix
Don't use nonBlocking().executeSynchronously() on the EDT. Options:
- In
ApplicationUtils.runCancellableReadAction(or inLSPIJUtils.getFile(Document, Disposable)): if the current thread is the EDT, run a plainReadAction.compute(...).FileDocumentManager.getFile(document)is cheap, so a short blocking read on the EDT doesn't freeze anything. This covers every caller at once. - Or in
JsonTextField.setJsonFilename: get the file withReadAction.compute(() -> FileDocumentManager.getInstance().getFile(document))instead ofLSPIJUtils.getFile.
The first option is safer, because other EDT callers of runCancellableReadAction would fail the same way.
How this was checked
- Observed in IntelliJ IDEA 2026.3, builds IU-263.7307.112 and IU-263.7307.200 (JBR 25.0.4.1), macOS, with LSP4IJ 0.30.0-SNAPSHOT and one user-defined server (LuaLS).
- Claude Code read the stack trace from
idea.logand followed it through the currentmainsources. It didn't build or test a fix. - Not checked: whether older IDE versions are affected. The code path itself isn't new, so the trigger is probably that the EDT has no read access at that point in 2026.3.


Activity
test: take the write-intent lock away from the EDT in IntelliJ 2025.3…
fix: read on the EDT without a non-blocking read action (#1924)