eopeter / flutter_mapbox_navigation

Turn By Turn Navigation for Your Flutter Application
Apache License 2.0
207 stars 161 forks source link

On the navigation screen, the map continually moves even when the user remains stationary at the same position #346

Open KamalDesignOWeb opened 4 months ago

KamalDesignOWeb commented 4 months ago

https://github.com/eopeter/flutter_mapbox_navigation/assets/132433990/609eee06-bdea-402c-ae2e-1a8bbf60c993

Eucer commented 4 months ago

The same happens to me

Eucer commented 4 months ago

@eopeter Do you know how to solve this problem we have?

eopeter commented 3 months ago

Looking into this to see how I can replicate it

benderaze commented 3 months ago

When using embedded navigation, and start navigation several times. I have this error message in the logs:

"[BUG] Two simultaneous active navigation sessions. This might happen if there are two NavigationViewController or RouteController instances exists at the same time. Profile the app and make sure that NavigationViewController is deallocated once not in use."

and the UI become unstable, map continually moves, and even, after several navigation start, app crash when arriving at a waypoint.

Looking at RoutesCoordinator in MapboxCoreNavigation it looks like a call to RouteController.finishRouting() clean the current ActiveNavigationSession UUID. Adding a call to self._navigationViewController?.navigationService.router.finishRouting() in NavigationFactory.endNavigation make the UI stable again. No more map moves or crash so far. But I still get the BUG message in the logs, which is weird and I don't understand. I'll keep investigating when I have a bit of time.

samargy commented 3 months ago

How did you guys fix this without editing the library?