[Android Apps and Games] tony78960:
Lot of NullPointerException...

Hello,

first of all : many many thanks for having ported PDroid to JB ! :D

But I'm having troubles with the PDroid app...

I'm using CM 10 on a galaxy s2, I downloaded the source code and I've just patched PDroid 2.0 before compiling.

The building process has passed without problem. No problem either with the flash process and the restart.

But when I try to open the PDroid app, it doesn't see any other application and it FC if I select another tab.

Here is the logcat for the launching of PDroid app :

I/ActivityManager( 6744): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.privacy.pdroid20/com.android.privacy.pdroid.extension.MainActivity u=0} from pid 10211
D/dalvikvm( 6744): GC_CONCURRENT freed 753K, 75% free 12624K/49152K, paused 5ms+9ms, total 94ms
D/dalvikvm( 6744): WAIT_FOR_CONCURRENT_GC blocked 82ms
D/dalvikvm( 6744): WAIT_FOR_CONCURRENT_GC blocked 41ms
D/libEGL (13030): loaded /system/lib/egl/libEGL_mali.so
D/libEGL (13030): loaded /system/lib/egl/libGLESv1_CM_mali.so
D/libEGL (13030): loaded /system/lib/egl/libGLESv2_mali.so
D/OpenGLRenderer(13030): Enabling debug mode 0
I/ActivityManager( 6744): Displayed com.android.privacy.pdroid20/com.android.privacy.pdroid.extension.MainActivity: +797ms
W/System.err(13030): android.content.pm.PackageManager$NameNotFoundException: com.google.android.gsf
W/System.err(13030): at android.app.ApplicationPackageManager.getPackageInfo(ApplicationPackageManager.java:80)
W/System.err(13030): at com.android.privacy.pdroid.extension.aa.a(Unknown Source)
W/System.err(13030): at com.android.privacy.pdroid.extension.o.doInBackground(Unknown Source)
W/System.err(13030): at android.os.AsyncTask$2.call(AsyncTask.java:287)
W/System.err(13030): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
W/System.err(13030): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
W/System.err(13030): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
W/System.err(13030): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
W/System.err(13030): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
W/System.err(13030): at java.lang.Thread.run(Thread.java:856)
W/System.err(13030): android.content.pm.PackageManager$NameNotFoundException: com.google.android.gsf
W/System.err(13030): at android.app.ApplicationPackageManager.getPackageInfo(ApplicationPackageManager.java:80)
W/System.err(13030): at com.android.privacy.pdroid.extension.aa.a(Unknown Source)
W/System.err(13030): at com.android.privacy.pdroid.extension.AppListPreferences.j(Unknown Source)
W/System.err(13030): at com.android.privacy.pdroid.extension.AppListPreferences.c(Unknown Source)
W/System.err(13030): at com.android.privacy.pdroid.extension.o.onPostExecute(Unknown Source)
W/System.err(13030): at android.os.AsyncTask.finish(AsyncTask.java:631)
W/System.err(13030): at android.os.AsyncTask.access$600(AsyncTask.java:177)
W/System.err(13030): at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
W/System.err(13030): at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err(13030): at android.os.Looper.loop(Looper.java:137)
W/System.err(13030): at android.app.ActivityThread.main(ActivityThread.java:4931)
W/System.err(13030): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err(13030): at java.lang.reflect.Method.invoke(Method.java:511)
W/System.err(13030): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
W/System.err(13030): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558)
W/System.err(13030): at dalvik.system.NativeStart.main(Native Method)
W/System.err(13030): java.lang.NullPointerException
W/System.err(13030): at com.android.privacy.pdroid.extension.AppListPreferences.j(Unknown Source)
W/System.err(13030): at com.android.privacy.pdroid.extension.AppListPreferences.c(Unknown Source)
W/System.err(13030): at com.android.privacy.pdroid.extension.o.onPostExecute(Unknown Source)
W/System.err(13030): at android.os.AsyncTask.finish(AsyncTask.java:631)
W/System.err(13030): at android.os.AsyncTask.access$600(AsyncTask.java:177)
W/System.err(13030): at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
W/System.err(13030): at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err(13030): at android.os.Looper.loop(Looper.java:137)
W/System.err(13030): at android.app.ActivityThread.main(ActivityThread.java:4931)
W/System.err(13030): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err(13030): at java.lang.reflect.Method.invoke(Method.java:511)
W/System.err(13030): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
W/System.err(13030): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558)
W/System.err(13030): at dalvik.system.NativeStart.main(Native Method)
D/AndroidRuntime(13030): Shutting down VM
W/dalvikvm(13030): threadid=1: thread exiting with uncaught exception (group=0x41437300)
E/AndroidRuntime(13030): FATAL EXCEPTION: main
E/AndroidRuntime(13030): java.lang.NullPointerException
E/AndroidRuntime(13030): at com.android.privacy.pdroid.extension.aw.onPostExecute(Unknown Source)
E/AndroidRuntime(13030): at android.os.AsyncTask.finish(AsyncTask.java:631)
E/AndroidRuntime(13030): at android.os.AsyncTask.access$600(AsyncTask.java:177)
E/AndroidRuntime(13030): at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
E/AndroidRuntime(13030): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(13030): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(13030): at android.app.ActivityThread.main(ActivityThread.java:4931)
E/AndroidRuntime(13030): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(13030): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(13030): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
E/AndroidRuntime(13030): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558)
E/AndroidRuntime(13030): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 6744): Force finishing activity com.android.privacy.pdroid20/com.android.privacy.pdroid.extension.MainActivity
W/ActivityManager( 6744): Activity pause timeout for ActivityRecord{42987660 com.android.privacy.pdroid20/com.android.privacy.pdroid.extension.MainActivity}
I/ActivityManager( 6744): No longer want com.bel.android.dspmanager (pid 10495): hidden #16
W/ActivityManager( 6744): Scheduling restart of crashed service com.bel.android.dspmanager/.service.HeadsetService in 5000ms
I/ActivityManager( 6744): No longer want com.teamhacksung.tvout (pid 10509): hidden #16
W/ActivityManager( 6744): Scheduling restart of crashed service com.teamhacksung.tvout/.TvOutService in 14477ms
I/PrivacyGSMPhone(10198): Package: com.android.phone asked for getCellLocation()
I/Process (13030): Sending signal. PID: 13030 SIG: 9
I/WindowState( 6744): WIN DEATH: Window{429b3598 com.android.privacy.pdroid20/com.android.privacy.pdroid.extension.MainActivity paused=false}
I/ActivityManager( 6744): Process com.android.privacy.pdroid20 (pid 13030) has died.
I/ActivityManager( 6744): Start proc com.android.privacy.pdroid20 for broadcast com.android.privacy.pdroid20/com.android.privacy.pdroid.extension.PrivacyReceiver: pid=13072 uid=10069 gids={1028}
E/Trace (13072): error opening trace file: No such file or directory (2)
W/System.err(13072): java.lang.NullPointerException
W/System.err(13072): at com.android.privacy.pdroid.extension.PrivacyReceiver.onReceive(Unknown Source)
W/System.err(13072): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2355)
W/System.err(13072): at android.app.ActivityThread.access$1500(ActivityThread.java:142)
W/System.err(13072): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1284)
W/System.err(13072): at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err(13072): at android.os.Looper.loop(Looper.java:137)
W/System.err(13072): at android.app.ActivityThread.main(ActivityThread.java:4931)
W/System.err(13072): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err(13072): at java.lang.reflect.Method.invoke(Method.java:511)
W/System.err(13072): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
W/System.err(13072): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558)
W/System.err(13072): at dalvik.system.NativeStart.main(Native Method)
I/PrivacyGSMPhone(10198): Package: com.android.phone asked for getCellLocation()
W/System.err(13072): java.lang.NullPointerException
W/System.err(13072): at com.android.privacy.pdroid.extension.PrivacyReceiver.onReceive(Unknown Source)
W/System.err(13072): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2355)
W/System.err(13072): at android.app.ActivityThread.access$1500(ActivityThread.java:142)
W/System.err(13072): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1284)
W/System.err(13072): at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err(13072): at android.os.Looper.loop(Looper.java:137)
W/System.err(13072): at android.app.ActivityThread.main(ActivityThread.java:4931)
W/System.err(13072): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err(13072): at java.lang.reflect.Method.invoke(Method.java:511)
W/System.err(13072): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
W/System.err(13072): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558)
W/System.err(13072): at dalvik.system.NativeStart.main(Native Method)
I/ActivityManager( 6744): Start proc com.bel.android.dspmanager for service com.bel.android.dspmanager/.service.HeadsetService: pid=13087 uid=10013 gids={3002, 1028}
D/dalvikvm( 2316): GC_EXPLICIT freed 37K, 96% free 2240K/49152K, paused 3ms+6ms, total 48ms
D/dalvikvm( 2316): GC_EXPLICIT freed <1K, 96% free 2240K/49152K, paused 1ms+3ms, total 24ms
E/Trace (13087): error opening trace file: No such file or directory (2)
I/HeadsetService(13087): Starting service.
D/dalvikvm( 2316): GC_EXPLICIT freed <1K, 96% free 2240K/49152K, paused 2ms+5ms, total 28ms
I/PrivacyGSMPhone(10198): Package: com.android.phone asked for getCellLocation()
W/System.err(13072): java.lang.NullPointerException
W/System.err(13072): at com.android.privacy.pdroid.extension.PrivacyReceiver.onReceive(Unknown Source)
W/System.err(13072): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2355)
W/System.err(13072): at android.app.ActivityThread.access$1500(ActivityThread.java:142)
W/System.err(13072): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1284)
W/System.err(13072): at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err(13072): at android.os.Looper.loop(Looper.java:137)
W/System.err(13072): at android.app.ActivityThread.main(ActivityThread.java:4931)
W/System.err(13072): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err(13072): at java.lang.reflect.Method.invoke(Method.java:511)
W/System.err(13072): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
W/System.err(13072): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558)
W/System.err(13072): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 6744): Activity destroy timeout for ActivityRecord{42987660 com.android.privacy.pdroid20/com.android.privacy.pdroid.extension.MainActivity}

I don't understand why PDroid app can't find com.google.android.gsf (GoogleServicesFramework) because I have gapps already flashed...

And when I open an app like Mms or Phone, I can see with ADB a huge amount of NullPointerException error like this :

[SIZE=2]W/System.err(13030): java.lang.NullPointerException
W/System.err(13030): at com.android.privacy.pdroid.extension.PrivacyReceiver.onReceive(Unknown Source)
W/System.err(13030): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2355)
W/System.err(13030): at android.app.ActivityThread.access$1500(ActivityThread.java:142)
W/System.err(13030): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1284)
W/System.err(13030): at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err(13030): at android.os.Looper.loop(Looper.java:137)
W/System.err(13030): at android.app.ActivityThread.main(ActivityThread.java:4931)
W/System.err(13030): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err(13030): at java.lang.reflect.Method.invoke(Method.java:511)
W/System.err(13030): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
W/System.err(13030): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558)
W/System.err(13030): at dalvik.system.NativeStart.main(Native Method)[/SIZE]

So for now I can't change the settings of PDroid because the app FC.

It seems that this issue comes from the PDroid app and not from the patch.

Note :

- I patched with v1.51

- I use the app v1.52

Do you know what could be done in order to solve this issue ?

Thanks

I'm French, so I apologize if I made any mistake in English.