Skip to content

Fix concurrent connect in ConsoleColorProvider#2806

Open
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:fix-2638-colorprovider-connect
Open

Fix concurrent connect in ConsoleColorProvider#2806
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:fix-2638-colorprovider-connect

Conversation

@vogella

@vogella vogella commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Problem

The default ConsoleColorProvider is shared across ConsoleCreation jobs that run in parallel. connect(IProcess, IConsole) stored both arguments in the fProcess/fConsole fields and then wired up via those fields, so concurrent calls could interleave and connect a console to another process' streams proxy. This caused an ArrayIndexOutOfBoundsException on the wrong console's stream listeners and consoles not being connected (#2638).

Fix

Wire up using the method arguments instead of the shared fields.

Independent of the initialization-race fix (#2637); touches only ConsoleColorProvider.

Refs #2638

The default ConsoleColorProvider is shared across ConsoleCreation jobs
that run in parallel. connect(IProcess, IConsole) stored both arguments
in fields and then wired up via those fields, so concurrent calls could
interleave and connect a console to another process' streams proxy. This
led to an ArrayIndexOutOfBoundsException on the wrong console's stream
listeners and to consoles not being connected.

Wire up using the method arguments instead of the shared fields.

Refs eclipse-platform#2638

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Test Results

    54 files  ±0      54 suites  ±0   1h 0m 19s ⏱️ + 1m 14s
 4 685 tests ±0   4 663 ✅ ±0   22 💤 ±0  0 ❌ ±0 
11 949 runs  ±0  11 796 ✅ ±0  153 💤 ±0  0 ❌ ±0 

Results for commit 62a5c8f. ± Comparison against base commit fe3597d.

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.

1 participant