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:
via the image provider (OneFrameImageStreamCompleter), if the map tile layer has unsubscribed from the image stream, as when the tile scrolls offscreen before the image loading fails, or
via the async cache, if enough tiles are scrolled to cause eviction. The onEvict for images has to wait for them to load to dispose them. (There's an opportunity for improvement there.)
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.
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:
OneFrameImageStreamCompleter
), if the map tile layer has unsubscribed from the image stream, as when the tile scrolls offscreen before the image loading fails, oronEvict
for images has to wait for them to load to dispose them. (There's an opportunity for improvement there.)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