Skip to content

Conversation

@HeikoKlare
Copy link
Contributor

In case a DPI change handler fails with an exception, the complete rescaling process may fail. As an example, it may happen that an image set to an Item has already been disposed when a DPI change event occurs, but the DPI change handler still tries to set that image on the item again, leading to an exception because of the image being disposed.

This change ensures that an exception happening when processing a DPI change handler does not result in a complete rescaling failure and instead reports the listener error to the Display.

Contributes to #2432

@github-actions
Copy link
Contributor

github-actions bot commented Aug 20, 2025

Test Results

   546 files  + 7     546 suites  +7   38m 51s ⏱️ + 4m 37s
 4 426 tests +54   4 409 ✅ +52   17 💤 +3  0 ❌ ±0 
16 750 runs  +54  16 623 ✅ +52  127 💤 +3  0 ❌ ±0 

Results for commit f36669b. ± Comparison against base commit 93c0ce9.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@akoch-yatta akoch-yatta left a comment

Choose a reason for hiding this comment

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

Looks good to me. Although this still can lead to a partly broken UI, it at least only affects one branch in the UI hierarchy.

…m#2432

In case a DPI change handler fails with an exception, the complete
rescaling process may fail. As an example, it may happen that an image
set to an Item has already been disposed when a DPI change event occurs,
but the DPI change handler still tries to set that image on the item
again, leading to an exception because of the image being disposed.

This change ensures that an exception happening when processing a DPI
change handler does not result in a complete rescaling failure and
instead reports the listener error to the Display.

Contributes to
eclipse-platform#2432
@HeikoKlare HeikoKlare force-pushed the issue-2432-catch-DPIhandler-exceptions branch from d3e4691 to f36669b Compare August 20, 2025 15:33
Copy link
Contributor Author

@HeikoKlare HeikoKlare left a comment

Choose a reason for hiding this comment

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

This should go in RC1 as it comes without risk of regression but reduces the risk of ending up in a broken UI when some UI rescaling handler fails.

@HeikoKlare HeikoKlare merged commit 93a484e into eclipse-platform:master Aug 20, 2025
16 of 17 checks passed
@HeikoKlare HeikoKlare deleted the issue-2432-catch-DPIhandler-exceptions branch August 20, 2025 15:56
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.

Broken UI because of exceptions during DPI change event processing

2 participants