Files
openide/java/debugger
Yuriy Artamonov bd518d52b3 [debugger] IDEA-389740 Fix freeze in non-cancellable read action in ExceptionBreakpoint.getPsiClass
ExceptionBreakpoint.getPsiClass() ran DebuggerUtils.findClass() inside a
non-cancellable ReadAction.compute(). findClass() reaches into the stub
index (StubIndexImpl.getAsyncState), which can block while the index is
still being built. A non-cancellable read action cannot yield to a
pending write action, so the caller (XBreakpoint source-position
resolution on a background dispatcher) froze, waiting on the index while
holding the read lock.

Replace ReadAction.compute() with a cancellable, retryable read via
ReadAction.nonBlocking(...).executeSynchronously(). It runs the same
computation in a read action that is interrupted with a
ProcessCanceledException and restarted whenever a write action is about
to occur, so it no longer blocks write actions. When the caller already
holds read access, it degrades to running the computation as-is, matching
the previous behavior.

M-Session-Id: M-905a82eb-0dac-4509-afc1-6985fd974338


IJ-CR-213777

GitOrigin-RevId: d1bacf40838ae77251ca068dfb07f8eaf102d929
2026-07-27 09:44:51 +00:00
..