CellularPrivacy / Android-IMSI-Catcher-Detector

AIMSICD • Fight IMSI-Catcher, StingRay and silent SMS!
https://cellularprivacy.github.io/Android-IMSI-Catcher-Detector/
GNU General Public License v3.0
4.7k stars 943 forks source link

Initial run MapViewer NPE #81

Closed r4v5 closed 10 years ago

r4v5 commented 10 years ago

Using the MapViewer on my Samsung Note II running 4.1.2 is causing an NPE. Currently running git checkout 6d3b4bf.

Problem seems to be at com.SecUpwN.AIMSICD.activities.MapViewer.loadEntries(MapViewer.java:403). Guessing this is either because the location DB was empty or because my phone was providing crap locations. After enough time has gone by that the DB has an entry, map viewer now at least loads (but has an empty map).

logcat from initial load (starting the application, entering Map Viewer):

06-21 00:51:07.299  31872-31872/com.SecUpwN.AIMSICD I/AIMSICD_MapViewer﹕ Starting MapViewer
06-21 00:51:07.464  31872-31874/com.SecUpwN.AIMSICD D/dalvikvm﹕ GC_CONCURRENT freed 208K, 7% free 12881K/13767K, paused 12ms+14ms, total 37ms
06-21 00:51:07.984  31872-31874/com.SecUpwN.AIMSICD D/dalvikvm﹕ GC_CONCURRENT freed 150K, 6% free 13138K/13959K, paused 2ms+14ms, total 52ms
06-21 00:51:08.044  31872-31872/com.SecUpwN.AIMSICD I/Google Maps Android API﹕ Google Play services client version: 4323000
06-21 00:51:08.499  31872-31872/com.SecUpwN.AIMSICD I/Google Maps Android API﹕ Google Play services package version: 4452036
06-21 00:51:08.804  31872-31874/com.SecUpwN.AIMSICD D/dalvikvm﹕ GC_CONCURRENT freed 256K, 7% free 13297K/14215K, paused 12ms+14ms, total 44ms
06-21 00:51:08.924  31872-31872/com.SecUpwN.AIMSICD I/fpp﹕ Making Creator dynamically
06-21 00:51:08.929  31872-31872/com.SecUpwN.AIMSICD I/Google Maps Android API﹕ Google Play services client version: 4452000
06-21 00:51:09.034  31872-31874/com.SecUpwN.AIMSICD D/dalvikvm﹕ GC_CONCURRENT freed 298K, 7% free 13471K/14407K, paused 13ms+4ms, total 41ms
06-21 00:51:09.149  31872-31872/com.SecUpwN.AIMSICD D/AbsListView﹕ Get MotionRecognitionManager
06-21 00:51:09.234  31872-31874/com.SecUpwN.AIMSICD D/dalvikvm﹕ GC_CONCURRENT freed 114K, 6% free 13884K/14663K, paused 2ms+15ms, total 37ms
06-21 00:51:09.319  31872-31872/com.SecUpwN.AIMSICD D/AndroidRuntime﹕ Shutting down VM
06-21 00:51:09.319  31872-31872/com.SecUpwN.AIMSICD W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x414fd2a0)
06-21 00:51:09.334  31872-31872/com.SecUpwN.AIMSICD E/AndroidRuntime﹕ FATAL EXCEPTION: main
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.SecUpwN.AIMSICD/com.SecUpwN.AIMSICD.activities.MapViewer}: java.lang.NullPointerException
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2100)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2125)
            at android.app.ActivityThread.access$600(ActivityThread.java:140)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4898)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1008)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:775)
            at dalvik.system.NativeStart.main(Native Method)
     Caused by: java.lang.NullPointerException
            at com.SecUpwN.AIMSICD.activities.MapViewer.loadEntries(MapViewer.java:403)
            at com.SecUpwN.AIMSICD.activities.MapViewer.onCreate(MapViewer.java:107)
            at android.app.Activity.performCreate(Activity.java:5206)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2064)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2125)
            at android.app.ActivityThread.access$600(ActivityThread.java:140)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4898)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1008)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:775)
            at dalvik.system.NativeStart.main(Native Method)
xLaMbChOpSx commented 10 years ago

Hi @r4v5 I believe I have corrected this issue and will create a new release later today which will incorporate this and other additions.

Thanks for taking the time to test the application and more so for posting the log it really helps ironing out these issues, keep your eye out for the next release and let me know how things go. I will leave this open until you have confirmed the issue has been addressed.

r4v5 commented 10 years ago

It's moved down from line 403 to 409.

06-22 16:10:13.775  24034-24034/com.SecUpwN.AIMSICD E/AndroidRuntime﹕ FATAL EXCEPTION: main
    java.lang.RuntimeException: Unable to resume activity {com.SecUpwN.AIMSICD/com.SecUpwN.AIMSICD.activities.MapViewer}: java.lang.NullPointerException
            at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2616)
            at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2644)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2130)
            at android.app.ActivityThread.access$600(ActivityThread.java:140)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4898)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1008)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:775)
            at dalvik.system.NativeStart.main(Native Method)
     Caused by: java.lang.NullPointerException
            at com.SecUpwN.AIMSICD.activities.MapViewer.loadEntries(MapViewer.java:409)
            at com.SecUpwN.AIMSICD.activities.MapViewer.onResume(MapViewer.java:126)
            at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1199)
            at android.app.Activity.performResume(Activity.java:5280)
            at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2606)
            at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2644)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2130)
            at android.app.ActivityThread.access$600(ActivityThread.java:140)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4898)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1008)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:775)
            at dalvik.system.NativeStart.main(Native Method)
SecUpwN commented 10 years ago

@r4v5, does your Issue still persist with the current WIP-Release v0.1.21-alpha?

r4v5 commented 10 years ago

@xLaMbChOpSx, this Issue exists in master, and if I can use Android Studio and its debugger properly, it appears that mAimsicdService is null at line 409 when it tries to call lastKnownLocation() on it.

This only happens when the app is freshly installed and I choose the map viewer from the side. When data has been collected, the map does show successfully.

SecUpwN commented 10 years ago

@xLaMbChOpSx, I am experiencing Issues with opening MapViewer as well. This is not only the case when initially running it, but instead every single time I get the error message Unable to create map! and then AIMSICD crashes instantly. I have installed the current NOGAPPS API as supposed to and everything is set up correctly. Here is a fresh logcat to analyze what's going on. Thanks for having a look.

E3V3A commented 10 years ago

I can confirm this is also an issue for me on both I9100/9195. I.e. that app crashes when trying MapViewer, before one GPS lock have been cached/found.

xLaMbChOpSx commented 10 years ago

I have pushed a commit that addresses this, I just had a couple of other things I wanted to complete before publishing a new release. When I get home tonight I will complete the other items then publish a new release for you all 😀

xLaMbChOpSx commented 10 years ago

@E3V3A @r4v5 I have released a new version that includes the correction for this issue, can you please let me know if you still have problems.

r4v5 commented 10 years ago

@xLaMbChOpSx This seems fixed on master, with a convenient little toast popup saying "no data yet". Leaving open until @E3V3A verifies.

SecUpwN commented 10 years ago

@xLaMbChOpSx, it still persists on WIP-Internal v0.1.24-alpha-build-6. AIMSICD force closes.

tobykurien commented 10 years ago

This should be fixed with the changes I made in moving to OsmDroid. I fixed several "first-install" map viewer force closes. Also tested by doing a first-install and viewing the map.

E3V3A commented 10 years ago

@r4v5 Thanks to Toby, you'll probably find this fixed in the next WIP as we have abandoned the Google spyware maps and replaced it with Open Street Maps (OSM), also reducing app to a whopping 40% original size, in the process.

Diapolo commented 10 years ago

When will there be a new release downloadable from here? And once again I propose you should consider using F-Droid to even test that alphas (as Google spyware is out, they will surely list your app).

SecUpwN commented 10 years ago

@Diapolo, we are currently working hard to erase as many bugs as possible from #105. Please participate to make this process faster. After they've been solved, a new Release will appear. With Google Play Services kicked out, we also will (besides F-Droid) have an official Aptoide store soon!