Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NullPointerException #35

Open
nicolasjafelle opened this issue Oct 8, 2015 · 4 comments
Open

java.lang.NullPointerException #35

nicolasjafelle opened this issue Oct 8, 2015 · 4 comments

Comments

@nicolasjafelle
Copy link

Apparently shortestRoute is initialized in null when:

result != null but is 0
//Line 99 in AbstractRouting class
i$ = shortestRoute.getPoints().iterator(); // at this point shortestRoute is null
java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List com.directions.route.Route.getPoints()' on a null object reference
10-08 15:02:07.212 6045-6045/ai.home E/AndroidRuntime:     at com.directions.route.AbstractRouting.onPostExecute(AbstractRouting.java:146)
10-08 15:02:07.212 6045-6045/ai.home E/AndroidRuntime:     at com.directions.route.AbstractRouting.onPostExecute(AbstractRouting.java:20)
10-08 15:02:07.212 6045-6045/ai.home E/AndroidRuntime:     at android.os.AsyncTask.finish(AsyncTask.java:636)
10-08 15:02:07.212 6045-6045/ai.home E/AndroidRuntime:     at android.os.AsyncTask.access$500(AsyncTask.java:177)
10-08 15:02:07.212 6045-6045/ai.home E/AndroidRuntime:     at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:653)
10-08 15:02:07.212 6045-6045/ai.home E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:102)
10-08 15:02:07.212 6045-6045/ai.home E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:135)
10-08 15:02:07.212 6045-6045/ai.home E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5254)
10-08 15:02:07.212 6045-6045/ai.home E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method)
10-08 15:02:07.212 6045-6045/ai.home E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:372)
10-08 15:02:07.212 6045-6045/ai.home E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
10-08 15:02:07.212 6045-6045/ai.home E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
@jd-alexander
Copy link
Owner

Okay. Would be nice if you submit a PR to fix the issue. Currently working on releasing my app (wakesocialapp.com) so can't touch this as yet

@nicolasjafelle
Copy link
Author

Sure!! Probably first I need to fix it locally in the project I am using the library and then create the pull request =D.

@jd-alexander
Copy link
Owner

Awesome thanks.

@jd-alexander
Copy link
Owner

Still looking forward to the PR Nicolas ^_^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants