Skip to content

Run DebugUITools.launch on the UI thread in MavenConsoleLineTracker - #2220

Merged
HannesWell merged 2 commits into
eclipse-m2e:mainfrom
khroolick:fix-mavenconsolelinetracker-ui-thread
Aug 12, 2026
Merged

Run DebugUITools.launch on the UI thread in MavenConsoleLineTracker#2220
HannesWell merged 2 commits into
eclipse-m2e:mainfrom
khroolick:fix-mavenconsolelinetracker-ui-thread

Conversation

@khroolick

@khroolick khroolick commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Fixes #2218

MavenConsoleLineTracker.launchRemoteJavaApp is invoked from ConsolePatternMatcher$MatchJob, a non-UI worker thread. DebugUITools.launch(...) must run on the SWT UI thread, so calling it directly produces SWTException: Invalid thread access and aborts the remote Java debugger auto-attach.

Dispatch the launch to the UI thread with Display.getDefault().asyncExec(...).

@khroolick
khroolick force-pushed the fix-mavenconsolelinetracker-ui-thread branch from 6160483 to 9b68c9a Compare August 6, 2026 13:07
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>
@HannesWell
HannesWell force-pushed the fix-mavenconsolelinetracker-ui-thread branch from aa40511 to 672bbf2 Compare August 12, 2026 17:30
@eclipse-m2e-bot

Copy link
Copy Markdown
Contributor

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

org.eclipse.m2e.launching/META-INF/MANIFEST.MF

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 patch
From 586aacf1775bd47153229a8d647e6cafacb4c280 Mon Sep 17 00:00:00 2001
From: Eclipse M2E Bot <m2e-bot@eclipse.org>
Date: Wed, 12 Aug 2026 17:33:19 +0000
Subject: [PATCH] Version bump(s) for null object or invalid expression stream


diff --git a/org.eclipse.m2e.launching/META-INF/MANIFEST.MF b/org.eclipse.m2e.launching/META-INF/MANIFEST.MF
index 0bf18d11..e781ed22 100644
--- a/org.eclipse.m2e.launching/META-INF/MANIFEST.MF
+++ b/org.eclipse.m2e.launching/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %Bundle-Name
 Bundle-SymbolicName: org.eclipse.m2e.launching;singleton:=true
-Bundle-Version: 2.1.200.qualifier
+Bundle-Version: 2.1.300.qualifier
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.27.0,4.0.0)",
  org.eclipse.core.variables,
-- 
2.54.0

Further information are available in Common Build Issues - Missing version increments.

@HannesWell
HannesWell force-pushed the fix-mavenconsolelinetracker-ui-thread branch from 344334d to 04a15f6 Compare August 12, 2026 17:36

@HannesWell HannesWell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the default Display at this place should be fine, since it should already exist for a long time.

Looks good thank you.

@github-actions

Copy link
Copy Markdown

Test Results

  345 files  ±0    345 suites  ±0   1h 23m 5s ⏱️ - 1m 44s
  727 tests ±0    710 ✅ ±0  16 💤 ±0  1 ❌ ±0 
2 181 runs  ±0  2 132 ✅ ±0  48 💤 ±0  1 ❌ ±0 

For more details on these failures, see this check.

Results for commit 04a15f6. ± Comparison against base commit 02002ee.

@HannesWell
HannesWell merged commit 3741914 into eclipse-m2e:main Aug 12, 2026
14 of 15 checks passed
@khroolick
khroolick deleted the fix-mavenconsolelinetracker-ui-thread branch August 14, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SWTException: Invalid thread access in MavenConsoleLineTracker.launchRemoteJavaApp

3 participants