Skip to content

StackOverflowError in Image when auto-scaling differs from device zoom #374

@HeikoKlare

Description

@HeikoKlare

Description and Reproduction
Scaling image data can lead to a stack overflow error since this change:

The regression is documented with a reproduction in:

Expected Behavior
No stack overflow should happen when scaling image data

Additional knowledge
The modified code is obviously problematic but the original code also seems to be incorrect. The ImageDataProvider used for image data to scale returned that same image data for every zoom, which potentially led to drawing the image data at a wrong size via Image.drawScaled and the subsequent call of GC#drawImage. So we should properly check what is really supposed to happen here and we should add according regression tests to capture different scenarios.

Metadata

Metadata

Assignees

No one assigned

    Labels

    HiDPIA HiDPI-Related Issue or FeatureSWTIssue for SWTregression

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions