You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: DAPReverseDebuggingSessionTest.testAStopWhichTheDAPServerSendsBeforeItAnswersReverseContinueShowsTheThreadStopped failed once on Windows #2320
DAPReverseDebuggingSessionTest.testAStopWhichTheDAPServerSendsBeforeItAnswersReverseContinueShowsTheThreadStopped
failed once, on Windows, in CI of #2319 (job,
IntelliJ IDEA Community 2024.2), after 2 minutes:
java.lang.AssertionError: the session is suspended where the program stopped running backwards, in the frame 2
at com.redhat.devtools.lsp4ij.dap.stepping.DAPReverseDebuggingSessionTest.waitUntilStoppedAt(DAPReverseDebuggingSessionTest.java:299)
The DAP server sends its stopped event before it answers reverseContinue. The test then waits for the session to be
suspended in frame 2, and it never was.
Cause, from the investigation in the fix's PR: Reverse Continue, Step Back and Reset Frame resume the session themselves once the debug adapter answers. That answer is handled on the EDT, not on LSP4J's thread, whenever it arrives before the EDT has chained its handler to the request. With the test's adapter, which sends stopped before its answer, the EDT could find the session still at the old stop and resume it, just as the stopped event suspended it at the new stop on a pool thread. That undid the stop, so the session showed the program running and never suspended again. The fix leaves the session alone once the adapter has said the program stopped or continued since the request, which the execution epoch tells. A new test forces that order, and fails without the fix.
Activity
lagergren commentedon Nov 27, 2026
Cause, from the investigation in the fix's PR: Reverse Continue, Step Back and Reset Frame resume the session themselves once the debug adapter answers. That answer is handled on the EDT, not on LSP4J's thread, whenever it arrives before the EDT has chained its handler to the request. With the test's adapter, which sends
stoppedbefore its answer, the EDT could find the session still at the old stop and resume it, just as thestoppedevent suspended it at the new stop on a pool thread. That undid the stop, so the session showed the program running and never suspended again. The fix leaves the session alone once the adapter has said the program stopped or continued since the request, which the execution epoch tells. A new test forces that order, and fails without the fix.