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

bindPlaces NullPointerException #67

Closed
percula opened this issue Mar 23, 2020 · 2 comments · Fixed by #68
Closed

bindPlaces NullPointerException #67

percula opened this issue Mar 23, 2020 · 2 comments · Fixed by #68
Assignees
Labels
bug Something isn't working

Comments

@percula
Copy link
Contributor

percula commented Mar 23, 2020

Hi, I'm receiving this crash report. The app was working fine for months, now it crashes whenever PingPlacePicker is opened. place.latLng is null and the null isn't caught. I didn't change anything and everything still looks fine in the Google API console.

Also thank you very much for this library :-)

kotlin.KotlinNullPointerException
        at com.rtchagas.pingplacepicker.ui.PlacePickerActivity.bindPlaces(PlacePickerActivity.kt:259)
        at com.rtchagas.pingplacepicker.ui.PlacePickerActivity.handlePlacesLoaded(PlacePickerActivity.kt:413)
        at com.rtchagas.pingplacepicker.ui.PlacePickerActivity.access$handlePlacesLoaded(PlacePickerActivity.kt:54)
        at com.rtchagas.pingplacepicker.ui.PlacePickerActivity$loadNearbyPlaces$1.onChanged(PlacePickerActivity.kt:501)
        at com.rtchagas.pingplacepicker.ui.PlacePickerActivity$loadNearbyPlaces$1.onChanged(PlacePickerActivity.kt:54)
        at androidx.lifecycle.LiveData.considerNotify(LiveData.java:131)
        at androidx.lifecycle.LiveData.dispatchingValue(LiveData.java:149)
        at androidx.lifecycle.LiveData.setValue(LiveData.java:307)
        at androidx.lifecycle.MutableLiveData.setValue(MutableLiveData.java:50)
        at com.rtchagas.pingplacepicker.viewmodel.PlacePickerViewModel$getNearbyPlaces$disposable$2.accept(PlacePickerViewModel.kt:43)
        at com.rtchagas.pingplacepicker.viewmodel.PlacePickerViewModel$getNearbyPlaces$disposable$2.accept(PlacePickerViewModel.kt:13)
        at io.reactivex.internal.observers.ConsumerSingleObserver.onSuccess(ConsumerSingleObserver.java:62)
        at io.reactivex.internal.operators.single.SingleDoOnSubscribe$DoOnSubscribeSingleObserver.onSuccess(SingleDoOnSubscribe.java:77)
        at io.reactivex.internal.operators.single.SingleObserveOn$ObserveOnSingleObserver.run(SingleObserveOn.java:81)
        at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:124)
        at android.os.Handler.handleCallback(Handler.java:873)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6669)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
@percula
Copy link
Contributor Author

percula commented Mar 26, 2020

Just want to followup, I have been running my fork in production for a few days now. The crashes are gone and the place picker still works 100%. I'm guessing Google started sending places with null latLngs for some reason.

@rtchagas rtchagas self-assigned this Mar 30, 2020
@rtchagas rtchagas added the bug Something isn't working label Mar 30, 2020
@rtchagas
Copy link
Owner

Thank you so much for the PR!
Yes, probably Google is messing up with those latLngs...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants