Files
NavFrame/docs/TFT_MAP_INCIDENT_2026-10-12.md
T
Claude bca606170f fix: keep TFT snapshots alive when labels need unbundled glyph ranges
MapLibre's MapSnapshotter aborts the whole still image on any glyph load
error. The offline style only bundled Noto Sans ranges 0-2047, while the
Asturias archive labels use U+1E36/U+1E37 (Asturian Ḷḷ) and typographic
quotes/dashes, so the TFT failed with SDK/STYLE_READY UNKNOWN/UNKNOWN
("Could not read asset") whenever such a label was in view, while the
phone MapView kept working.

Bundle the unmodified demotiles ranges 7680-7935 and 8192-8447, add an
empty placeholder for every other BMP range, report missing assets as
NOT_FOUND, and release 0.13.7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014YKH4z66ZCe2wK4GvgRg7g
2026-10-26 02:19:57 +00:00

8.1 KiB
Raw Blame History

TFT map incident: La Corredoria, 12 October 2026

Report and conclusion

The owner reported that the TFT map stopped working in La Corredoria (Oviedo) after approximately 20 minutes of successful operation. It displayed MAPA NO DISPONIBLE and did not recover for the rest of the journey, while the phone map continued working. An offline map was installed. The owner reported using the latest version, but the installed APK and error diagnostics were not available to verify the build or failure category.

The root cause remains unknown. The symptom is consistent with a failure in the independent TFT snapshot workflow. There is no device log or physical reproduction establishing a GPU, resource, network, or lifecycle cause. No runtime change is proposed on that basis.

This investigation reviewed commit 6fec09f20fff50c3ed94782b10c67998adce986f, which declares version 0.13.1. Repository inspection does not establish which exact APK was installed.

What the implementation establishes

  • The phone uses PhoneMapView/MapLibre MapView; the service renders the TFT with a separate MapSnapshotter at 480×240. A working phone map does not establish that the snapshot renderer is healthy.
  • MapLibreTftRenderer.render allows 30 seconds for the first snapshot and 10 seconds after its first success. Errors are classified as TIMEOUT, NETWORK, STYLE, GPU, BITMAP, or SDK. The display text alone does not identify the category or cause.
  • TftService.mapUnavailable discards the failed renderer and schedules retries after 2, 4, 8, and at most 15 seconds. A replacement renderer receives the initial 30-second timeout again. Persistent failure can mean repeated errors; a retained error image can also remain visible if updates stop. An increasing attempt counter distinguishes active retries from a static last frame.
  • The error image is composed by NavFrame. If it arrived as a new frame during the incident, at least that frame was transmitted. It does not by itself prove that Bluetooth later stayed connected.
  • OfflineMapStyle uses local PMTiles and bundled font assets rather than network resource URLs. Loss of mobile coverage alone does not explain a failure when a valid offline source was actually selected and its resources remained usable.
  • Installation and selection are separate actions. An installed package does not prove that the active source was offline: the user must select Use for that package. The diagnostic report distinguishes LOCAL PMTiles from ONLINE.
  • The bundled Asturias archive has PMTiles v3 metadata, zoom levels 6–14, and bounds 42.9–43.75 N / −7.2–−4.45 E. La Corredoria lies inside these declared bounds. This rules out being outside that archive's declared coverage, but does not validate every tile or establish that this archive was selected.
  • The TFT requests zoom 15–17.5 according to speed and maneuver proximity; the phone uses a zoom 0.8 levels lower. Overzoom beyond the stored maximum is not itself evidence of a defect, but the two views can request different resources.
  • The real TFT session renews its 120-second partial wake lock every 30 seconds. No programmed 20-minute cutoff was found in this workflow. Device power management and native resource problems remain unverified.
  • This commit already includes the 1 October TFT connectivity lifecycle correction: the snapshot renderer owns a connectivity receiver activation independently of the phone map. The older defect cannot be assumed to explain this incident if the installed build includes that correction.

Open hypotheses

A snapshot timeout, graphics-context failure, or native resource problem can affect the TFT while its independent phone map keeps working. A local tile, style, or glyph resource failure is also possible. Alternatively, an online source may have remained selected despite an installed offline package. A static last error frame must be distinguished from repeated failing captures. None of these hypotheses is confirmed by the report.

Capture evidence before restarting

While stationary, open Menu → Information and licenses → TFT map diagnosis → Share (Spanish UI: ☰ → Información y licencias → Diagnóstico del mapa TFT → Compartir). Save the complete report before stopping the service or restarting the app. It includes the active source, failure code, stage, duration, attempts, and last failure without coordinates or URLs. The last failure is retained in service memory even after recovery, but is lost when that service instance is destroyed; it is not a persistent incident history.

For a stationary reproduction with an attached development device, collect logcat locally and inspect MAP_UNAVAILABLE, TFT_MAP_NETWORK, GPS_FAILED, and MapLibre/EGL output. A full logcat may include private information; review and redact it before sharing.

Evidence Next investigation
TIMEOUT / STYLE_LOADING Determine which style/resource operation did not finish; do not infer an Internet outage solely from the timeout.
TIMEOUT / STYLE_READY Inspect pending resources and native rendering after style loading completed.
GPU, EGL, or CONTEXT_LOST Investigate OpenGL context and recovery on the actual device.
NETWORK with source ONLINE Verify source selection and connectivity.
Increasing attempt counter Retries are running and failing again.
Unchanging attempt counter and error frame Investigate rendering/session progress and whether the TFT is showing a retained frame.

After preserving evidence, restarting the map mode or app while stationary can test recovery. It is not a demonstrated fix for this incident.

Automated validation and limits

The reviewed code built its debug APK and passed Android lint (zero errors, 76 warnings), 159 unit tests (60 app, 89 core, 10 NaviLite; zero failures or skips), and 17 offline Python tests. The cloud setup uses JDK 17 and Android SDK 36.

These checks do not execute physical MapLibre JNI/OpenGL rendering, Yamaha Bluetooth/TFT behavior, or device power management. They neither reproduce nor rule out this incident. Future fixes need evidence from the device and validation of the affected failure/recovery path.

Follow-up: persistent history from 13–25 October 2026 (0.13.5)

A shared diagnostic history (100 events, LOCAL PMTiles, network connected, GPS recent) showed repeated SDK/STYLE_READY failures with UNKNOWN/UNKNOWN detail. Each failed in 50–270 ms, well short of the timeout, and recovered after the vehicle moved. Retries reached the 15-second backoff limit and continued for up to 10 minutes. The phone map kept working throughout.

The likely cause is a missing glyph range, which matches this pattern and explains this incident's symptoms:

  • OfflineMapStyle loads glyphs from asset://offline/fonts/{fontstack}/{range}.pbf, but only Unicode ranges 0–2047 were bundled.
  • The bundled Asturias archive contains 4,810 label values with U+1E36/U+1E37 (Asturian Ḷ/ḷ, range 7680–7935). It also contains 124 with typographic quotes and dashes (U+2013, U+2014, U+2018, U+2019; range 8192–8447). These counts come from scanning every tile's place and roads string values.
  • In MapLibre Native 13.5.2, a missing asset produces Could not read asset (AssetManagerFileSource). GlyphManager reports it as a glyph error. Map::Impl::onResourceError then fails the pending still image with only that message. The message has no keyword that the diagnostic classifier recognized, which gave SDK and UNKNOWN/UNKNOWN. The phone's continuous MapView only logs the same error, so its map keeps working.
  • The failure persists while such a label is in the TFT view and stops once the camera moves away from it.

0.13.7 bundles the unmodified demotiles ranges 7680–7935 and 8192–8447. It also adds an empty placeholder for every other BMP range, so an uncovered character only drops out of a label. A missing asset is now reported as NOT_FOUND. Unit tests check that all 256 ranges exist and are well formed, and that the Asturian and punctuation code points are present. The fix still needs to be validated on a device by driving where these failures happened.