Skip to content

Conversation

@fedejeanne
Copy link
Member

This reverts commit 807b159.

Add regression test.

Fixes #2162

@fedejeanne
Copy link
Member Author

Since a proper fix is not trivial, I will simply revert the commit and create a follow-up PR where 807b159 is improved and reintroduced. The follow-up PR will be targeted for M1.

cc @ShahzaibIbrahim

@github-actions
Copy link
Contributor

github-actions bot commented May 19, 2025

Test Results

   545 files  +  6     545 suites  +6   33m 48s ⏱️ - 2m 31s
 4 398 tests + 55   4 380 ✅ + 53   18 💤 +3  0 ❌  - 1 
16 719 runs  +106  16 578 ✅ +104  141 💤 +3  0 ❌  - 1 

Results for commit e4e5eec. ± Comparison against base commit 9eb34bf.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@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.

The revert is fine, as the original change obivous introduced a bug which we need to revert for the upcoming release.

But the provided regression test needs to be revised:

  • It does not test anything specifically regarding transparent style of the Composite. It only tests that one specific kind of regression does not occur in the sense of not leading to an exception in case a specific setup for shell and composite around is used, but that has nothing to do with testing transparent style for composite itself but some very specific regression to composite.
  • It creates a new shell even though the test class already provides infrastructure including a shell (and even a composite). In case another shell is required (which does not seem to be the case, as I can simply remove the additional shell), that one would at least need to be safely disposed after the test execution.
  • Why is setting the layout to the shell necessary here? If the test is about transparent style, it should have nothing to do with the layout of the containing shell. If it has some relevance, it needs to become clear by proper test naming, commenting or the like.
  • Same as for the point above applies to the paint listener to the composite.

@fedejeanne fedejeanne force-pushed the revert_new_image_contructor_double_buffer_composite branch from 417c37e to bff30ab Compare May 20, 2025 07:05
@fedejeanne
Copy link
Member Author

I adapted the name of the test and used the shell in the parent class.

The listener and the layout are necessary for the use case, otherwise the test doesn't run into the issue. Since this is a very complicated scenario and even getting a reproducer is not trivial, I simply took the reproducer from #2162 and stripped it down to the bare minimum.

@fedejeanne
Copy link
Member Author

Check failures (tests in Linux are unrelated:

Error:  Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:4.0.13-SNAPSHOT:compile (default-compile) on project org.eclipse.swt.cocoa.macosx.x86_64: can't call classpath contributors: Could not acquire lock(s) -> [Help 1]

I see the same for all 3 platforms. Very likely a follow-up of this failure:

Error:  Plugin org.eclipse.tycho:tycho-versions-plugin:4.0.13-SNAPSHOT or one of its dependencies could not be resolved:
Error:  	The following artifacts could not be resolved: org.eclipse.tycho:tycho-versions-plugin:pom:4.0.13-SNAPSHOT (absent): org.eclipse.tycho:tycho-versions-plugin:pom:4.0.13-SNAPSHOT failed to transfer from https://repo.eclipse.org/content/repositories/tycho-snapshots/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of tycho-snapshots has elapsed or updates are forced. Original error: Could not transfer artifact org.eclipse.tycho:tycho-versions-plugin:pom:4.0.13-SNAPSHOT from/to tycho-snapshots (https://repo.eclipse.org/content/repositories/tycho-snapshots/): status code: 403, reason phrase: Forbidden (403)

@HeikoKlare HeikoKlare force-pushed the revert_new_image_contructor_double_buffer_composite branch from bff30ab to e4e5eec Compare May 20, 2025 09:21
Copy link
Contributor

@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.

Thank you for the test improvement!

@HeikoKlare HeikoKlare merged commit a106143 into eclipse-platform:master May 20, 2025
17 checks passed
@HeikoKlare HeikoKlare deleted the revert_new_image_contructor_double_buffer_composite branch May 20, 2025 09:39
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.

NPE in GC: Cannot read field "nativeZoom" because "this.data" is null

2 participants