eopeter / flutter_mapbox_navigation

Turn By Turn Navigation for Your Flutter Application
Apache License 2.0
217 stars 186 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 9 months ago

KamalDesignOWeb commented 9 months ago

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

Eucer commented 9 months ago

The same happens to me

Eucer commented 9 months ago

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

eopeter commented 8 months ago

Looking into this to see how I can replicate it

benderaze commented 8 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 7 months ago

How did you guys fix this without editing the library?