Skip to content

[Win32] Release DPI change callback also on failure - #3563

Merged
HeikoKlare merged 1 commit into
eclipse-platform:masterfrom
HeikoKlare:dpi-change-callback-disposal
Sep 4, 2026
Merged

[Win32] Release DPI change callback also on failure#3563
HeikoKlare merged 1 commit into
eclipse-platform:masterfrom
HeikoKlare:dpi-change-callback-disposal

Conversation

@HeikoKlare

Copy link
Copy Markdown
Contributor

When a zoom change is processed asynchronously, a native callback is allocated for the timer triggering the processing and is released again once the processing has been performed. If the processing fails, the callback is never released.

Callback slots are a limited resource shared by the whole application, so repeatedly failing zoom change processing eventually exhausts them. From then on, allocating a callback fails, which makes the scheduling of the zoom change processing silently fall back to performing it synchronously and can break unrelated functionality relying on callbacks as well.

The callback is now released independently of the outcome of the processing. There is no automated test for this, as the leak is only observable by exhausting the application-wide callback pool, which cannot be provoked in a test without affecting everything else running in the same process. The change has no effect on the successful case, in which the callback was already released.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Test Results (win32)

   35 files  ±0     35 suites  ±0   5m 26s ⏱️ +52s
4 924 tests ±0  4 846 ✅ ±0  78 💤 ±0  0 ❌ ±0 
1 448 runs  ±0  1 424 ✅ ±0  24 💤 ±0  0 ❌ ±0 

Results for commit f0004a6. ± Comparison against base commit 67658a4.

♻️ This comment has been updated with latest results.

@HeikoKlare
HeikoKlare force-pushed the dpi-change-callback-disposal branch from 7567122 to aa789c8 Compare September 3, 2026 14:01
@HeikoKlare
HeikoKlare marked this pull request as ready for review September 3, 2026 14:01
The processing of a zoom change can be scheduled asynchronously via a
native timer, for which a callback is allocated and released again once
the processing has been performed. If the processing fails, the callback
is currently not released.

Callback slots are a limited resource shared by the whole application.
Once they are exhausted, allocating a callback fails, which makes the
scheduling of the zoom change processing fall back to performing it
synchronously and can break other functionality relying on callbacks as
well. The callback is therefore released independently of the outcome of
the processing.

Assisted-by: Claude Opus 5 <noreply@anthropic.com>
@HeikoKlare
HeikoKlare force-pushed the dpi-change-callback-disposal branch from aa789c8 to f0004a6 Compare September 4, 2026 13:33
@HeikoKlare
HeikoKlare merged commit a556c18 into eclipse-platform:master Sep 4, 2026
19 checks passed
@HeikoKlare
HeikoKlare deleted the dpi-change-callback-disposal branch September 4, 2026 14:14
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