mapbox / mapbox/mapbox-navigation-android

Check codes returned from the Directions and Map Matching APIs

Open
#1,919 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

archived
Dominant language
Kotlin
Stars
651
Forks
321
PR merge metrics
No merged PRs in 30d

Description

Fatal Exception: java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object java.util.List.get(int)' on a null object reference
at com.mapbox.services.android.navigation.v5.navigation.RouteAnnotationUpdater.update(RouteAnnotationUpdater.java:18)
at com.mapbox.services.android.navigation.v5.navigation.RouteRefreshCallback.onResponse(RouteRefreshCallback.java:33)
at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall$1$1.run(ExecutorCallAdapterFactory.java:70)
at android.os.Handler.handleCallback(Handler.java:761)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6623)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)

I haven't been able to reproduce this. I have this PR but we need to track down the API call that is causing this issue. Wondering if we could send a non-crashing crash report.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the stack trace at RouteAnnotationUpdater.java:18 and RouteRefreshCallback.java:33, then review PR 1916 and the Directions and Map Matching API response handling. Identify which API response or status code leaves the list null, and define completion as preventing the crash while producing a useful crash report.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
api, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.