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

crash with java.lang.NullPointerException at ReverseGeocodeObservable.java:40 #193

Open
Redbu11dev opened this issue Sep 13, 2018 · 0 comments

Comments

@Redbu11dev
Copy link

Redbu11dev commented Sep 13, 2018

Hello, I am using this library (implementation 'pl.charmas.android:android-reactive-location2:2.1@aar') and it keeps crashing on some devices :(

Can anyone help me to prevent this from crashing?

From the source code I can see, that it's happening when creating an instance of Geocoder in observables/geocode/ReverseGeocodeObservable.java:

"Geocoder geocoder = new Geocoder(ctx, locale);"

Google play crash report:

io.reactivex.exceptions.OnErrorNotImplementedException:
at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept (Functions.java:704)
at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept (Functions.java:701)
at io.reactivex.internal.observers.LambdaObserver.onError (LambdaObserver.java:77)
at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.checkTerminated (ObservableObserveOn.java:276)
at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal (ObservableObserveOn.java:172)
at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run (ObservableObserveOn.java:252)
at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run (HandlerScheduler.java:109)
at android.os.Handler.handleCallback (Handler.java:754)
at android.os.Handler.dispatchMessage (Handler.java:95)
at android.os.Looper.loop (Looper.java:163)
at android.app.ActivityThread.main (ActivityThread.java:6396)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:794)

Caused by: java.lang.NullPointerException:
at android.location.GeocoderParams. (GeocoderParams.java:50)
at android.location.Geocoder. (Geocoder.java:83)
at pl.charmas.android.reactivelocation2.observables.geocode.ReverseGeocodeObservable.subscribe (ReverseGeocodeObservable.java:40)
at io.reactivex.internal.operators.observable.ObservableCreate.subscribeActual (ObservableCreate.java:40)
at io.reactivex.Observable.subscribe (Observable.java:10910)
at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run (ObservableSubscribeOn.java:96)
at io.reactivex.Scheduler$DisposeTask.run (Scheduler.java:452)
at io.reactivex.internal.schedulers.ScheduledRunnable.run (ScheduledRunnable.java:61)
at io.reactivex.internal.schedulers.ScheduledRunnable.call (ScheduledRunnable.java:52)
at java.util.concurrent.FutureTask.run (FutureTask.java:237)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run (ScheduledThreadPoolExecutor.java:272)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:607)
at java.lang.Thread.run (Thread.java:760)

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

1 participant