AsturaPhoenix / trip_planner_aquamarine

BASK Trip Planner cross-platform
MIT License
2 stars 1 forks source link

[map] Remove empty blobs, ignore acquisition exceptions during eviction #85

Closed AsturaPhoenix closed 1 year ago

AsturaPhoenix commented 1 year ago

The WMS server can return empty 200 responses under load. Empty blobs were being persisted in the cache (and not refreshed), making tiles received this way permanently undisplayable.

There may be an opportunity to evict any blobs that fail to decode, but the logic for this would be more complex as decoding can also flake when under load.

Furthermore, when the map is moved after long-running tile fetches that eventually fail, exceptions could be dropped in one of at least two ways:

The OneFrameImageStreamCompleter/FlutterError.reportError behavior is acceptable and will be silent in release mode, but note that it can fail tests. The onEvict behavior should ignore these exceptions as they would be handled elsewhere if they matter.

Fixes #83