Skip to content

Conversation

arunjose696
Copy link
Contributor

This commit reverts the changes introduced in #2526 where getImageData and getScaledImageData were mistakenly interchanged. The initial approach aimed to use this method in loadImageDataClosestTo when images couldn't be loaded at the exact size. However, the final implementation used loadImageData(zoom) instead, making those changes unnecessary. These leftover modifications were an unintended side effect, and this commit removes them.

This commit reverts the changes introduced in eclipse-platform#2526 where getImageData
and getScaledImageData were mistakenly interchanged. The initial
approach aimed to use this method in loadImageDataClosestTo when images
couldn't be loaded at the exact size. However, the final implementation
used loadImageData(zoom) instead, making those changes unnecessary.
These leftover modifications were an unintended side effect, and this
commit removes them.
Copy link
Contributor

Test Results

  115 files  ±0    115 suites  ±0   12m 21s ⏱️ + 2m 34s
4 554 tests ±0  4 538 ✅ ±0  16 💤 ±0  0 ❌ ±0 
  311 runs  ±0    308 ✅ ±0   3 💤 ±0  0 ❌ ±0 

Results for commit bd7db14. ± Comparison against base commit 3065112.

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 change is sound and was obviously an oversight in #2526 after iterating to the final version of that PR.

For the record: this resolves a potential StackOverflowError because of cyclic calls between two methods.

java.lang.StackOverflowError
	at org.eclipse.swt.graphics.Image.getImageData(Image.java:1288)
	at org.eclipse.swt.graphics.Image$ExistingImageHandleProviderWrapper.newImageData(Image.java:2048)
	at org.eclipse.swt.graphics.Image.getImageData(Image.java:1288)
	at org.eclipse.swt.graphics.Image$ExistingImageHandleProviderWrapper.newImageData(Image.java:2048)
	at org.eclipse.swt.graphics.Image.getImageData(Image.java:1288)
	at org.eclipse.swt.graphics.Image$ExistingImageHandleProviderWrapper.newImageData(Image.java:2048)

@HeikoKlare HeikoKlare merged commit d2de8e3 into eclipse-platform:master Oct 17, 2025
17 checks passed
@HeikoKlare HeikoKlare deleted the arunjose696/481/StackoverflowloadImageData branch October 17, 2025 13:36
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.

StackOverflowError in ExistingImageHandleProviderWrapper

2 participants