Skip to content

terminal freezing #7

Description

@flakeme

since a few days i get IDE freezes when scrolling in the output.
this is what AI had to say about it:

Found it. The freeze stack trace is unambiguous:                                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                                                                                                 
  com.ashotn.opencode.relay.terminal.MarkdownTerminalHyperlinkFilter.resolveTerminalLinkTarget                                                                                                                                                                                                                                                                                                                                   
    → java.io.File.isFile                                                                                                                                                                                                                                                                                                                                                                                                        
      → sun.nio.fs.WindowsNativeDispatcher.GetFileAttributesEx0  ← blocks for 28s                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                 
  The MarkdownTerminalHyperlinkFilter in the opencode relay plugin calls File.isFile() synchronously on every character written to the terminal, inside the terminal emulator's buffer lock (TerminalTextBuffer.modify). This is a synchronous Windows filesystem call happening on the EDT-adjacent terminal thread, holding a lock — hence the freeze, especially when large output is scrolling.                              
                                                                                                                                                                                                                                                                                                                                                                                                                               
  All 4 freeze clusters (Jun 5, Jun 10, Jun 11, Jun 15) have the same root cause.                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                 
  Workarounds until the plugin is fixed:                                                                                                                                                                                                                                                                                                                                                                                         
  1. Disable the plugin temporarily — Settings → Plugins → opencode relay → disable
  2. Or report the bug to the plugin author (com.ashotn.opencode.relay) — the fix is to either cache isFile results, debounce/batch hyperlink processing, or do it off the terminal write path

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions