microg / IchnaeaNlpBackend

Backend for UnifiedNlp that uses Mozilla Location Service for geolocation.
119 stars 28 forks source link

v0.10.0 is crashing #4

Closed aelmahmoudy closed 9 years ago

aelmahmoudy commented 9 years ago

When I upgraded the backend to v0.10.0 (and UnifiedNlp to 1.3.0), Ichnaea backend keeps crashing, here's what I find in logcat:

D/NlpLocationBackendHelper(30754): Bound to: ComponentInfo{org.microg.nlp.backend.ichnaea/org.microg.nlp.backend.ichnaea.BackendService}
D/IchnaeaBackendService( 1993): Contributing with nickname "µg User"
D/AndroidRuntime( 1993): Shutting down VM
W/dalvikvm( 1993): threadid=1: thread exiting with uncaught exception (group=0x418bfba8)
E/AndroidRuntime( 1993): FATAL EXCEPTION: main
E/AndroidRuntime( 1993): Process: org.microg.nlp.backend.ichnaea, PID: 1993
E/AndroidRuntime( 1993): java.lang.NullPointerException
E/AndroidRuntime( 1993):        at org.microg.nlp.api.CellBackendHelper.loadCells(CellBackendHelper.java:263)
E/AndroidRuntime( 1993):        at org.microg.nlp.api.CellBackendHelper.onCellsChanged(CellBackendHelper.java:199)
E/AndroidRuntime( 1993):        at org.microg.nlp.api.CellBackendHelper.access$100(CellBackendHelper.java:53)
E/AndroidRuntime( 1993):        at org.microg.nlp.api.CellBackendHelper$1$1.onCellInfoChanged(CellBackendHelper.java:90)
E/AndroidRuntime( 1993):        at android.telephony.PhoneStateListener$2.handleMessage(PhoneStateListener.java:385)
E/AndroidRuntime( 1993):        at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 1993):        at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime( 1993):        at android.app.ActivityThread.main(ActivityThread.java:5001)
E/AndroidRuntime( 1993):        at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1993):        at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 1993):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
E/AndroidRuntime( 1993):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
E/AndroidRuntime( 1993):        at dalvik.system.NativeStart.main(Native Method)
D/IchnaeaBackendService( 1993): Activating instance at process 1993
D/IchnaeaBackendService( 1993): Cells: 0
I/Process ( 1993): Sending signal. PID: 1993 SIG: 9
D/NlpLocationBackendHelper(30754): Unbound from: ComponentInfo{org.microg.nlp.backend.ichnaea/org.microg.nlp.backend.ichnaea.BackendService}
I/ActivityManager( 2389): Process org.microg.nlp.backend.ichnaea (pid 1993) has died.
W/ActivityManager( 2389): Scheduling restart of crashed service org.microg.nlp.backend.ichnaea/.BackendService in 1000ms
aelmahmoudy commented 9 years ago

The problem happens when 'Use cell (GSM/UMTS/LTE/CDMA)' option is enabled.

I am running OMNI 4.4.4, so it should work.

n76 commented 9 years ago

Just updated to MozillaNlpBackend 0.10.0 and UnifiedNlp (for GAPPS-free) 1.3.0 and I am getting the same crash. It also seems to go away when I turn off "Use cell". I am running a Galaxy Nexus with CyanogenMod CM11 M12:

I/ActivityManager( 1238): Start proc org.microg.nlp.backend.ichnaea for service org.microg.nlp.backend.ichnaea/.BackendService: pid=22681 uid=10512 gids={50512, 3003}
D/NlpLocationBackendHelper(22194): Not (yet) bound.
D/ActivityThread(22681): handleBindApplication:org.microg.nlp.backend.ichnaea
D/ActivityThread(22681): setTargetHeapUtilization:0.75
D/ActivityThread(22681): setTargetHeapMinFree:2097152
D/NlpLocationBackendHelper(22194): Bound to: ComponentInfo{org.microg.nlp.backend.ichnaea/org.microg.nlp.backend.ichnaea.BackendService}
D/AndroidRuntime(22681): Shutting down VM
W/dalvikvm(22681): threadid=1: thread exiting with uncaught exception (group=0x4191ece0)
E/AndroidRuntime(22681): FATAL EXCEPTION: main
E/AndroidRuntime(22681): Process: org.microg.nlp.backend.ichnaea, PID: 22681
E/AndroidRuntime(22681): java.lang.NullPointerException
E/AndroidRuntime(22681):    at org.microg.nlp.api.CellBackendHelper.loadCells(CellBackendHelper.java:263)
E/AndroidRuntime(22681):    at org.microg.nlp.api.CellBackendHelper.onCellsChanged(CellBackendHelper.java:199)
E/AndroidRuntime(22681):    at org.microg.nlp.api.CellBackendHelper.access$100(CellBackendHelper.java:53)
E/AndroidRuntime(22681):    at org.microg.nlp.api.CellBackendHelper$1$1.onCellInfoChanged(CellBackendHelper.java:90)
E/AndroidRuntime(22681):    at android.telephony.PhoneStateListener$2.handleMessage(PhoneStateListener.java:404)
E/AndroidRuntime(22681):    at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(22681):    at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime(22681):    at android.app.ActivityThread.main(ActivityThread.java:5146)
E/AndroidRuntime(22681):    at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(22681):    at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime(22681):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:732)
E/AndroidRuntime(22681):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:566)
E/AndroidRuntime(22681):    at dalvik.system.NativeStart.main(Native Method)
D/IchnaeaBackendService(22681): Activating instance at process 22681
D/IchnaeaBackendService(22681): Cells: 0
I/wpa_supplicant( 1357): wlan0: CTRL-EVENT-SCAN-STARTED 
W/BroadcastQueue( 1238): Skipping deliver [background] BroadcastRecord{4240b290 u-1 android.net.wifi.SCAN_RESULTS} to ReceiverList{42063840 22681 org.microg.nlp.backend.ichnaea/10512/u0 remote:41f44f90}: process crashing
mar-v-in commented 9 years ago

Should be fixed in 0.10.1 as of microg/android_external_UnifiedNlpApi@06d1132344b4600ae00bda63d4da0acff7de42f0