mrmans0n / smart-location-lib

Android library project that lets you manage the location updates to be as painless as possible
1.65k stars 352 forks source link

Fatal Exception: java.lang.NullPointerException #272

Open dzen1984 opened 5 years ago

dzen1984 commented 5 years ago

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.io.Serializable android.content.Intent.getSerializableExtra(java.lang.String)' on a null object reference at io.nlopez.smartlocation.geocoding.providers.AndroidGeocodingProvider$AndroidGeocodingService.onHandleIntent(AndroidGeocodingProvider.java:164) at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.os.HandlerThread.run(HandlerThread.java:61)

I believe it happened on AndroidGeocodingService that extends IntentService and overrides
protected abstract void onHandleIntent(@Nullable Intent intent); and intent value may be null if the service is being restarted after its process has gone away