mapbox-navigation-android icon indicating copy to clipboard operation
mapbox-navigation-android copied to clipboard

Rerouting stucks in an infinite loop

Open alexwyattdev opened this issue 7 years ago • 6 comments

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

  1. create navigationView inside fragment with any route
  2. Cancel the route, then destroy the fragment, then start a new navigation
  3. 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.

alexwyattdev avatar Aug 13 '19 09:08 alexwyattdev

Same problem on latest version

AryaNyx avatar Aug 15 '19 14:08 AryaNyx

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?

Guardiola31337 avatar Aug 20 '19 16:08 Guardiola31337

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.

alexwyattdev avatar Aug 20 '19 16:08 alexwyattdev

No worries at all @kiskunk Thanks for the update / confirming 🙇

Closing as duplicate of #2010

Guardiola31337 avatar Aug 20 '19 16:08 Guardiola31337

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.

alexwyattdev avatar Sep 08 '19 20:09 alexwyattdev

Hey @kiskunk thanks for the detailed info.

We're fixing OP and #2010 in #2042

Thanks again!

cc @abhishek1508

Guardiola31337 avatar Sep 09 '19 17:09 Guardiola31337