stadiamaps / stadiamaps/ferrostar
Recalculation on arrival/route completion can leak a trip and navigation session/cache
- Dominant language
- Kotlin
- Stars
- 419
- Forks
- 81
- Avg merge
- 6d 1h
- Merged PRs (30d)
- 7
Description
The issue occurs when you get a recalculation right as you arrive. If you app doesn't immediately call stop navigation, the recalculation task can complete and re-inject a new trip continuing the existing session.
**What Happens**
1. You reach trip state complete/arrival.
2. You continue driving past before you end trip by calling `stopNavigation()`
3. Your UI probably exits the navigation view.
4. Ferrostar re-injects the trip on successful fetch of the recalculation.
5. Your app unexpectedly continues monitoring location.
6. You force kill your app to stop location.
7. Your app also unexpectedly still has a nav session to resume. Even though you arrived.
Note - this probably doesn't happen if your app calls stop immediately. However, my app (and probably others) allow users to loiter (e.g. to find parking) on the nav screen until they tap "Complete trip" which finally closes it out.
**Expected (Option 1)**
1. You reach trip state complete/arrival.
2. Ferrostar immediately blocks any behavior related to trip state flow. E.g. cancel recalculation and prevent further.
3. Ferrostar terminates the navigation session (no unexpected resume).
4. Ferrostar leaves location updates running (for loitering)
5. User taps "Complete Trip" in my app's case and then finally stops the location engine.
Contributor guide
Research direction
Start by tracing the recalculation task around trip completion/arrival and the stopNavigation() flow. Reproduce arrival, continue driving without immediately calling stopNavigation(), and observe whether a completed recalculation re-injects the trip or preserves the navigation session. Done means recalculation cannot continue the completed trip, the navigation session does not unexpectedly resume, and location updates remain available for loitering.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100