IchnaeaNlpBackend icon indicating copy to clipboard operation
IchnaeaNlpBackend copied to clipboard

Fix possible NPE

Open jonathanklee opened this issue 3 years ago • 4 comments

A NPE was reported here: https://gitlab.e.foundation/e/backlog/-/issues/5676#note_286210

jonathanklee avatar Oct 10 '22 06:10 jonathanklee

Hi, the link return error 404.

ale5000-git avatar Oct 10 '22 13:10 ale5000-git

Here is the backtrace:

00-07 18:51:42.345  5826  5826 W IchnaeaBackendService: java.lang.NullPointerException: Attempt to invoke virtual method 'float android.location.Location.getAccuracy()' on a null object reference
10-07 18:51:42.345  5826  5826 W IchnaeaBackendService: 	at org.microg.nlp.backend.ichnaea.BackendService.startCalculate(BackendService.java:211)
10-07 18:51:42.345  5826  5826 W IchnaeaBackendService: 	at org.microg.nlp.backend.ichnaea.BackendService.onWiFisChanged(BackendService.java:163)
10-07 18:51:42.345  5826  5826 W IchnaeaBackendService: 	at org.microg.nlp.api.WiFiBackendHelper.onWiFisChanged(WiFiBackendHelper.java:109)
10-07 18:51:42.345  5826  5826 W IchnaeaBackendService: 	at org.microg.nlp.api.WiFiBackendHelper.access$000(WiFiBackendHelper.java:32)
10-07 18:51:42.345  5826  5826 W IchnaeaBackendService: 	at org.microg.nlp.api.WiFiBackendHelper$1.onReceive(WiFiBackendHelper.java:42)
10-07 18:51:42.345  5826  5826 W IchnaeaBackendService: 	at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1580)
10-07 18:51:42.345  5826  5826 W IchnaeaBackendService: 	at android.app.-$$Lambda$LoadedApk$ReceiverDispatcher$Args$_BumDX2UKsnxLVrE6UJsJZkotuA.run(Unknown Source:2)
10-07 18:51:42.345  5826  5826 W IchnaeaBackendService: 	at android.os.Handler.handleCallback(Handler.java:938)
10-07 18:51:42.345  5826  5826 W IchnaeaBackendService: 	at android.os.Handler.dispatchMessage(Handler.java:99)
10-07 18:51:42.345  5826  5826 W IchnaeaBackendService: 	at android.os.Looper.loop(Looper.java:223)
10-07 18:51:42.345  5826  5826 W IchnaeaBackendService: 	at android.app.ActivityThread.main(ActivityThread.java:7664)
10-07 18:51:42.345  5826  5826 W IchnaeaBackendService: 	at java.lang.reflect.Method.invoke(Native Method)
10-07 18:51:42.345  5826  5826 W IchnaeaBackendService: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
10-07 18:51:42.345  5826  5826 W IchnaeaBackendService: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

jonathanklee avatar Oct 10 '22 13:10 jonathanklee

@ale5000-git No follow up on this ?

jonathanklee avatar Oct 18 '22 12:10 jonathanklee

This is simple so there isn't so much to comment, we just have to wait that mar-v-in has some time to merge things. He mostly lack time.

ale5000-git avatar Oct 18 '22 16:10 ale5000-git