SecUSo / privacy-friendly-netmonitor

Privacy Friendly App that shows active network connections of installed apps.
GNU General Public License v3.0
156 stars 33 forks source link

java.lang.RuntimeException in PassiveService #19

Open Yonjuni opened 7 years ago

Yonjuni commented 7 years ago

Reported from Android 4.2, 5.0, 6.0, 6.0.1, 7.0, 7,1

java.lang.RuntimeException: Unable to instantiate service org.secuso.privacyfriendlynetmonitor.ConnectionAnalysis.PassiveService: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3227)
    at android.app.ActivityThread.-wrap5(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1594)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6247)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
    at org.secuso.privacyfriendlynetmonitor.ConnectionAnalysis.PassiveService.<init>(PassiveService.java:86)
    at java.lang.Class.newInstance(Native Method)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3224)
    ... 8 more
java.lang.RuntimeException: Unable to instantiate service org.secuso.privacyfriendlynetmonitor.ConnectionAnalysis.PassiveService: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:2880)
    at android.app.ActivityThread.access$1900(ActivityThread.java:157)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1439)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:148)
    at android.app.ActivityThread.main(ActivityThread.java:5551)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
    at org.secuso.privacyfriendlynetmonitor.ConnectionAnalysis.PassiveService.<init>(PassiveService.java:86)
    at java.lang.Class.newInstance(Native Method)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:2877)
    ... 8 more
java.lang.RuntimeException: Unable to instantiate service org.secuso.privacyfriendlynetmonitor.ConnectionAnalysis.PassiveService: java.lang.NullPointerException
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:2559)
    at android.app.ActivityThread.access$1800(ActivityThread.java:141)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1294)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:136)
    at android.app.ActivityThread.main(ActivityThread.java:5052)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:515)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
    at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
    at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
    at org.secuso.privacyfriendlynetmonitor.ConnectionAnalysis.PassiveService.<init>(PassiveService.java:86)
    at java.lang.Class.newInstanceImpl(Native Method)
    at java.lang.Class.newInstance(Class.java:1208)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:2556)
    ... 11 more
schillef commented 7 years ago

Issue inluded in general bugfix salute pullrequest.

Yonjuni commented 7 years ago

It also happens in case the user is changed.