Rerouting stucks in an infinite loop
We use navigationView in a fragment, inside an activity, and when the user starts the navigation for the first time, the reroute works. Then the user either arrives or just cancels the navigation (the fragment gets destroyed). After starting a new navigation, the reroute stucks on an infinite loop.
Android API: 15-28 Mapbox Navigation SDK version: 0.40.0
Steps to trigger behavior
- create navigationView inside fragment with any route
- Cancel the route, then destroy the fragment, then start a new navigation
- go a different path to trigger rerouting
Expected behavior
The rerouting should work no matter how many times the user starts a navigation.
Actual behavior
The rerouting stucks on an infinite loop.
Same problem on latest version
Hey @kiskunk 👋 thanks for reaching out and report your issue.
Could you add some more information around your test setup? Are you able to reproduce the issue using the test app / FragmentNavigationActivity / NavigationFragment? That'd be really helpful to troubleshoot the issue.
If there is any sample or pseudo code you can provide, that would be awesome and it'll give us better insight into your implementation and what could be causing your problem. As mentioned, a complete example reproducing the issue would be 💯
BTW, it seems this issue was already reported in https://github.com/mapbox/mapbox-navigation-android/issues/2010 - it sounds the same exact unexpected behavior
I am having the exact same problem, just mine breaks after recreating the activity/fragment (because of day/night mode change)
Could you clarify / confirm so we can close here as duplicated?
Yes it can be closed, as it turned out it can be reproduced in the sample app too. We figured out its no longer tied strictly to changing day/night mode later after further inspecting and testing. Thanks, and sorry for the inconvenience.
No worries at all @kiskunk Thanks for the update / confirming 🙇
Closing as duplicate of #2010
No worries at all @kiskunk Thanks for the update / confirming 🙇
Closing as duplicate of #2010
Hi, I know this thread is closed, but if it helps, I almost always can reproduce the reroute infinite loop problem when I start a new navigation, then finish it clicking on the X, then starting another (or the same destination - since we did not arrive/but also can be reproduced after correctly arriving at destination) navigation. In some cases, it does not matter how many times I start a new navigation, it works, but in most cases (strongly on Huawei devices, but can be reproduced in Android Emulator, or LG V30 too), it stucks in the infinite loop. On Huawei devices, it often happens for the first navigation too.
Hey @kiskunk thanks for the detailed info.
We're fixing OP and #2010 in #2042
Thanks again!
cc @abhishek1508