diff --git a/CHANGELOG.md b/CHANGELOG.md
index 171a3d4b..92db04e9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,4 @@
+- Fixed occasional ConcurrentModificationException when the screen-poll timer reads the terminal buffer concurrently with PTY writes
- Fixed tab title showing "Claude Code" for sessions opened in non-project directories — now shows the directory name
- Added OpenAI-compatible proxy: profiles can now route Claude Code through any OpenAI-compatible API provider (OpenAI, Azure, Groq, DeepSeek, Ollama, local models, etc.)
diff --git a/pom.xml b/pom.xml
index aebe314a..e31a8c64 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
io.github.nbplugins
netbeans-plugin-claude-code-gui
- 1.2.9-SNAPSHOT
+ 1.2.10-SNAPSHOT
nbm
Netbeans Plugin Claude Code GUI
NetBeans plugin that provides a GUI for Claude Code CLI — run claude code sessions directly inside the IDE.
diff --git a/src/main/java/io/github/nbplugins/claudecodegui/ui/ClaudeSessionTab.java b/src/main/java/io/github/nbplugins/claudecodegui/ui/ClaudeSessionTab.java
index 7ee18931..10bb86ab 100644
--- a/src/main/java/io/github/nbplugins/claudecodegui/ui/ClaudeSessionTab.java
+++ b/src/main/java/io/github/nbplugins/claudecodegui/ui/ClaudeSessionTab.java
@@ -1470,13 +1470,17 @@ private void walkScrollComponents(java.awt.Container c, StringBuilder sb, int de
private List getScreenLines() {
if (terminalWidget == null) return java.util.Collections.emptyList();
+ TerminalTextBuffer buf = terminalWidget.getTerminalTextBuffer();
+ if (buf == null) return java.util.Collections.emptyList();
+ if (!buf.tryLock()) return java.util.Collections.emptyList();
try {
- TerminalTextBuffer buf = terminalWidget.getTerminalTextBuffer();
return buf.getScreenBuffer().getLineTexts();
} catch (NullPointerException e) {
// JediTerm's LinesStorage may return null entries during terminal
// initialization. Return empty so pollScreenState retries next tick.
return java.util.Collections.emptyList();
+ } finally {
+ buf.unlock();
}
}