Skip to content

K2GO-582 fix(maps): no crash when you leave the map during a region download - #806

Merged
luisguzman-adfa merged 1 commit into
mainfrom
fix/K2GO-582-maps-leave-crash
Nov 18, 2026
Merged

luisguzman-adfa merged 1 commit into
mainfrom
fix/K2GO-582-maps-leave-crash

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

What changes

  • MapsRegionClient.deliver reads the download listener on the main thread, when the queued progress or pause update runs, and skips it after stopPolling() or a finished job.

Why

  • Leaving the map screen during a region download could crash the app: a poll update queued before stopPolling() read the listener again after it was set to null (GlitchTip KNOWLEDGE-TO-GO-8).

Steps to QA

  • Baseline (main 30b7a8b): start a full-region map download, then leave the map screen. With a test-only 1.5 s delay on the update (makes the race certain), the app crashes with NullPointerException ... MapsRegionClient.java:134.
  • Change: same steps and same test delay. The app stays open, and the download finishes on the box.

Verifications

  • OPPO CPH2557: baseline crash reproduced; with the fix no crash, region finished on the box. Evidence in Jira K2GO-582.
  • assembleStandardDebug and testStandardDebugUnitTest pass.

Notes

  • The test delay is not in this PR.
  • Related: K2GO-583 (overlap shown as "No internet connection"), found during this test.

…ownload

A queued poll update read the listener again after stopPolling() cleared it. The update now reads the listener on the main thread, when it runs.
@luisguzman-adfa
luisguzman-adfa merged commit 5e9f25c into main Nov 18, 2026
4 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the fix/K2GO-582-maps-leave-crash branch November 18, 2026 18:12
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