Run DebugUITools.launch on the UI thread in MavenConsoleLineTracker - #2220
Conversation
6160483 to
9b68c9a
Compare
MavenConsoleLineTracker.launchRemoteJavaApp was called from a ConsolePatternMatcher worker thread, so DebugUITools.launch hit Display.getShells() off the SWT UI thread and threw SWTException: Invalid thread access. Wrap the launch in Display.asyncExec so it runs on the UI thread. Fixes eclipse-m2e#2218 Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
aa40511 to
672bbf2
Compare
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
344334d to
04a15f6
Compare
HannesWell
left a comment
There was a problem hiding this comment.
Using the default Display at this place should be fine, since it should already exist for a long time.
Looks good thank you.
Test Results 345 files ±0 345 suites ±0 1h 23m 5s ⏱️ - 1m 44s For more details on these failures, see this check. Results for commit 04a15f6. ± Comparison against base commit 02002ee. |
Fixes #2218
MavenConsoleLineTracker.launchRemoteJavaAppis invoked fromConsolePatternMatcher$MatchJob, a non-UI worker thread.DebugUITools.launch(...)must run on the SWT UI thread, so calling it directly producesSWTException: Invalid thread accessand aborts the remote Java debugger auto-attach.Dispatch the launch to the UI thread with
Display.getDefault().asyncExec(...).