Skip to content

Ensure pending tile requests are cleared#2048

Merged
petebankhead merged 1 commit intoqupath:mainfrom
petebankhead:tiles
Dec 10, 2025
Merged

Ensure pending tile requests are cleared#2048
petebankhead merged 1 commit intoqupath:mainfrom
petebankhead:tiles

Conversation

@petebankhead
Copy link
Member

@petebankhead petebankhead commented Dec 9, 2025

This was causing a problem whenever pixel classification overlays were stopped in the midst of live prediction: tiles might not be read, and then the exception was retained and returned on every later attempt to access the same tile.

This moves pendingTiles.remove to a finally block to ensure it is run.

It's possible this causes some issues if a tile really is invalid though, so we may need to retain exceptions in some cases - rather than repeatedly making the same (doomed) requests.

Still, this change is necessary to avoid failures in perfectly normal circumstances.

This was causing a problem whenever pixel classification overlays were stopped in the midst of life prediction: tiles might not be read, and then the exception was retained and returned on every later attempt to access the same tile.

This moves `pendingTiles.remove` to a `finally` block to ensure it is run.

It's possible this causes some issues if a tile really *is* invalid though, so we may need to retain exceptions in some cases - rather than repeatedly making the same (doomed) requests.

Still, this change is necessary to avoid failures in perfectly normal circumstances.
@petebankhead petebankhead added this to the v0.7.0 milestone Dec 9, 2025
@petebankhead petebankhead changed the title Unsure pending tile requests are cleared Ensure pending tile requests are cleared Dec 9, 2025
@petebankhead petebankhead merged commit 315ea93 into qupath:main Dec 10, 2025
3 checks passed
@petebankhead petebankhead deleted the tiles branch December 10, 2025 08:13
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