in my activities i've a bottom menu loaded using inflate (the menu is an horizontalScrollView with some buttons (one selected and one deselected for each activity)).
Moving quickly throught this menu, sometimes i get an exception (the point is random) and seems that for some reason, android has killed something so is not available for my activity.
error logs:
12-12 09:24:24.389: I/Process(480): Sending signal. PID: 480 SIG: 9
12-12 09:24:24.430: I/ActivityManager(81): Process com.apia.selfnettest (pid 480) has died.
12-12 09:24:24.439: I/WindowManager(81): WIN DEATH: Window{405b6c28 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:24.459: E/InputDispatcher(81): channel '407da4a8 com.apia.selfnettest/com.apia.selfnettest.MainClass (server)' ~ Consumer closed input channel or an error occurred. events=0x8
12-12 09:24:24.459: E/InputDispatcher(81): channel '407da4a8 com.apia.selfnettest/com.apia.selfnettest.MainClass (server)' ~ Channel is unrecoverably broken and will be disposed!
12-12 09:24:24.609: I/WindowManager(81): WIN DEATH: Window{40613eb8 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:24.769: I/WindowManager(81): WIN DEATH: Window{405fc890 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:24.960: I/WindowManager(81): WIN DEATH: Window{409d4d48 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:25.030: I/WindowManager(81): WIN DEATH: Window{408c5d58 com.apia.selfnettest/com.apia.selfnettest.ContactOffline paused=false}
12-12 09:24:25.189: I/WindowManager(81): WIN DEATH: Window{408f4090 com.apia.selfnettest/com.apia.selfnettest.InformationOffline paused=false}
12-12 09:24:25.289: I/WindowManager(81): WIN DEATH: Window{406f0470 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:25.459: I/WindowManager(81): WIN DEATH: Window{4054e0b8 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:25.579: I/WindowManager(81): WIN DEATH: Window{406f7be0 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:25.679: I/WindowManager(81): WIN DEATH: Window{409eb980 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:25.819: I/ActivityManager(81): Start proc com.apia.selfnettest for activity com.apia.selfnettest/.MainClass: pid=520 uid=10034 gids={3003, 1006, 1015}
12-12 09:24:25.829: I/WindowManager(81): WINDOW DIED Window{407da4a8 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:25.859: I/WindowManager(81): WIN DEATH: Window{40774410 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:25.899: E/InputDispatcher(81): Received spurious receive callback for unknown input channel. fd=160, events=0x8
12-12 09:24:25.899: E/InputDispatcher(81): Received spurious receive callback for unknown input channel. fd=163, events=0x8
12-12 09:24:25.899: E/InputDispatcher(81): Received spurious receive callback for unknown input channel. fd=166, events=0x8
12-12 09:24:25.899: E/InputDispatcher(81): Received spurious receive callback for unknown input channel. fd=171, events=0x8
12-12 09:24:25.899: E/InputDispatcher(81): Received spurious receive callback for unknown input channel. fd=174, events=0x8
12-12 09:24:25.899: E/InputDispatcher(81): Received spurious receive callback for unknown input channel. fd=175, events=0x8
12-12 09:24:25.899: E/InputDispatcher(81): channel '406dfd88 com.apia.selfnettest/com.apia.selfnettest.MainClass (server)' ~ Consumer closed input channel or an error occurred. events=0x8
12-12 09:24:25.899: E/InputDispatcher(81): channel '406dfd88 com.apia.selfnettest/com.apia.selfnettest.MainClass (server)' ~ Channel is unrecoverably broken and will be disposed!
12-12 09:24:25.961: I/WindowManager(81): WIN DEATH: Window{407713a0 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:25.979: I/WindowManager(81): WIN DEATH: Window{409345c0 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:26.090: I/WindowManager(81): WIN DEATH: Window{408ab168 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:26.130: I/WindowManager(81): WIN DEATH: Window{40892f20 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:26.171: I/WindowManager(81): WIN DEATH: Window{406dfd88 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:26.199: W/WindowManager(81): Failed looking up window
12-12 09:24:26.199: W/WindowManager(81): java.lang.IllegalArgumentException: Requested window android.os.BinderProxy#407da2c8 does not exist
12-12 09:24:26.199: W/WindowManager(81): at com.android.server.WindowManagerService.windowForClientLocked(WindowManagerService.java:8174)
12-12 09:24:26.199: W/WindowManager(81): at com.android.server.WindowManagerService.windowForClientLocked(WindowManagerService.java:8165)
12-12 09:24:26.199: W/WindowManager(81): at com.android.server.WindowManagerService$WindowState$DeathRecipient.binderDied(WindowManagerService.java:7024)
12-12 09:24:26.199: W/WindowManager(81): at android.os.BinderProxy.sendDeathNotice(Binder.java:381)
12-12 09:24:26.199: W/WindowManager(81): at dalvik.system.NativeStart.run(Native Method)
12-12 09:24:26.199: I/WindowManager(81): WIN DEATH: null
12-12 09:24:26.199: I/WindowManager(81): WIN DEATH: Window{4093bfb0 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:26.260: I/WindowManager(81): WIN DEATH: Window{408d2a28 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:26.300: I/WindowManager(81): WIN DEATH: Window{408a49e8 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:26.311: I/WindowManager(81): WIN DEATH: Window{40884570 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:26.319: E/InputDispatcher(81): Received spurious receive callback for unknown input channel. fd=181, events=0x8
12-12 09:24:26.330: E/InputDispatcher(81): Received spurious receive callback for unknown input channel. fd=184, events=0x8
12-12 09:24:26.330: E/InputDispatcher(81): Received spurious receive callback for unknown input channel. fd=187, events=0x8
12-12 09:24:26.330: E/InputDispatcher(81): Received spurious receive callback for unknown input channel. fd=190, events=0x8
12-12 09:24:26.330: E/InputDispatcher(81): Received spurious receive callback for unknown input channel. fd=195, events=0x8
12-12 09:24:26.330: E/InputDispatcher(81): Received spurious receive callback for unknown input channel. fd=196, events=0x8
12-12 09:24:26.330: E/InputDispatcher(81): Received spurious receive callback for unknown input channel. fd=198, events=0x8
12-12 09:24:26.330: E/InputDispatcher(81): Received spurious receive callback for unknown input channel. fd=202, events=0x8
12-12 09:24:26.330: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.330: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.340: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.340: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.340: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.340: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.340: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.349: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.349: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.349: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.349: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.349: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.349: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.359: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.359: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.359: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.359: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.380: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.380: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.380: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.539: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.630: I/jdwp(520): Ignoring second debugger -- accepting and dropping
12-12 09:24:27.030: D/AndroidRuntime(520): Shutting down VM
12-12 09:24:27.030: W/dalvikvm(520): threadid=1: thread exiting with uncaught exception (group=0x40015560)
12-12 09:24:27.050: E/AndroidRuntime(520): FATAL EXCEPTION: main
12-12 09:24:27.050: E/AndroidRuntime(520): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.apia.selfnettest/com.apia.selfnettest.MainClass}: java.lang.NullPointerException
12-12 09:24:27.050: E/AndroidRuntime(520): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
12-12 09:24:27.050: E/AndroidRuntime(520): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
12-12 09:24:27.050: E/AndroidRuntime(520): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
12-12 09:24:27.050: E/AndroidRuntime(520): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
12-12 09:24:27.050: E/AndroidRuntime(520): at android.os.Handler.dispatchMessage(Handler.java:99)
12-12 09:24:27.050: E/AndroidRuntime(520): at android.os.Looper.loop(Looper.java:130)
12-12 09:24:27.050: E/AndroidRuntime(520): at android.app.ActivityThread.main(ActivityThread.java:3683)
12-12 09:24:27.050: E/AndroidRuntime(520): at java.lang.reflect.Method.invokeNative(Native Method)
12-12 09:24:27.050: E/AndroidRuntime(520): at java.lang.reflect.Method.invoke(Method.java:507)
12-12 09:24:27.050: E/AndroidRuntime(520): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
12-12 09:24:27.050: E/AndroidRuntime(520): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
12-12 09:24:27.050: E/AndroidRuntime(520): at dalvik.system.NativeStart.main(Native Method)
12-12 09:24:27.050: E/AndroidRuntime(520): Caused by: java.lang.NullPointerException
12-12 09:24:27.050: E/AndroidRuntime(520): at com.apia.utils.LibLayout.determineScreenDensity(LibLayout.java:1273)
12-12 09:24:27.050: E/AndroidRuntime(520): at com.apia.utils.LibLayout.isXLargeLayout(LibLayout.java:1310)
12-12 09:24:27.050: E/AndroidRuntime(520): at com.apia.selfnettest.MainClass.onCreate(MainClass.java:191)
12-12 09:24:27.050: E/AndroidRuntime(520): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
12-12 09:24:27.050: E/AndroidRuntime(520): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
12-12 09:24:27.050: E/AndroidRuntime(520): ... 11 more
12-12 09:24:27.059: W/ActivityManager(81): Force finishing activity com.apia.selfnettest/.MainClass
12-12 09:24:27.580: W/ActivityManager(81): Activity pause timeout for HistoryRecord{4071c7f0 com.apia.selfnettest/.MainClass}
12-12 09:24:30.865: W/ActivityManager(81): Launch timeout has expired, giving up wake lock!
this is the function that generate the error:
public static int determineScreenDensity() {
//0: low density
//1: medium density
//2: high density
DisplayMetrics metrics = new DisplayMetrics();
((Activity) LibBanking.AppContext).getWindowManager().getDefaultDisplay().getMetrics(metrics);
int density = metrics.densityDpi;
if (density==DisplayMetrics.DENSITY_XHIGH) {
return 3;
}
else if (density==DisplayMetrics.DENSITY_HIGH) {
return 2;
}
else if (density==DisplayMetrics.DENSITY_MEDIUM) {
return 1;
}
else if (density==DisplayMetrics.DENSITY_LOW) {
return 0;
}
else {
return 1;
}
}
and notice that LibBanking.AppContext is set in each activity in this way:
LibBanking.AppContext = this;
thank you in advance....
Related
I want to run my android app from ADB So I run this command
adb -s emulator-5554 shell am start -W -S -n com.example.myproj/.MainActivity
My application starts in emulator but it force closed and the message unfortunately stopped working showed on emulator screen. I try both genymotion and eclipse emulator and got same error.But when I run it from eclipse directly it does not any force close problem.
I should mention that I use ubuntu 14.04 32bit.
Please help me and say what is my mistake and how I can fix it?
ok I use logcat as result I have very long log I just put last part which I can see from command line and seems to relevant to my app
D/gralloc ( 51): Registering a buffer in the process that created it.
This may cause memory ordering problems.
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/SurfaceFlinger( 51): glCheckFramebufferStatusOES error 1304732677
E/SurfaceFlinger( 51): got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
W/WindowManager( 361): Screenshot failure taking screenshot for (266x425) to layer 21005
D/AndroidRuntime( 1133): Shutting down VM
I/ActivityManager( 361): Start proc com.example.myproj for activity com.example.myproj/.MainActivity: pid=1144 uid=10051 gids={50051, 1028, 1015}
D/dalvikvm( 1133): GC_CONCURRENT freed 96K, 15% free 585K/684K, paused 22ms+12ms, total 59ms
D/dalvikvm( 1144): Not late-enabling CheckJNI (already on)
I/Choreographer( 531): Skipped 32 frames! The application may be doing too much work on its main thread.
I/Choreographer( 361): Skipped 33 frames! The application may be doing too much work on its main thread.
W/dalvikvm( 1144): VFY: register1 v4 holds uninitialized ref
W/dalvikvm( 1144): VFY: bad arg 0 (into Ljava/lang/Object;)
W/dalvikvm( 1144): VFY: rejecting call to Lacteve/symbolic/Util;.write (Ljava/lang/Object;I)V
W/dalvikvm( 1144): VFY: rejecting opcode 0x71 at 0x000a
W/dalvikvm( 1144): VFY: rejected Lcom/example/myproj/MainActivity$1;.<init> (Lcom/example/myproj/MainActivity;)V
W/dalvikvm( 1144): Verifier rejected class Lcom/example/myproj/MainActivity$1;
D/AndroidRuntime( 1144): Shutting down VM
W/dalvikvm( 1144): threadid=1: thread exiting with uncaught exception (group=0xb3ae0b90)
E/AndroidRuntime( 1144): FATAL EXCEPTION: main
E/AndroidRuntime( 1144): Process: com.example.myproj, PID: 1144
E/AndroidRuntime( 1144): java.lang.VerifyError: com/example/myproj/MainActivity$1
E/AndroidRuntime( 1144): at com.example.myproj.MainActivity.dol(MainActivity.java:24)
E/AndroidRuntime( 1144): at com.example.myproj.MainActivity.onCreate(MainActivity.java:17)
E/AndroidRuntime( 1144): at android.app.Activity.performCreate(Activity.java:5243)
E/AndroidRuntime( 1144): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
E/AndroidRuntime( 1144): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2140)
E/AndroidRuntime( 1144): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226)
E/AndroidRuntime( 1144): at android.app.ActivityThread.access$700(ActivityThread.java:135)
E/AndroidRuntime( 1144): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
E/AndroidRuntime( 1144): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 1144): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 1144): at android.app.ActivityThread.main(ActivityThread.java:4998)
E/AndroidRuntime( 1144): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1144): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 1144): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
E/AndroidRuntime( 1144): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
E/AndroidRuntime( 1144): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 361): Force finishing activity com.example.myproj/.MainActivity
I/WindowManager( 361): Screenshot max retries 4 of Token{b40b44d0 ActivityRecord{b40181a0 u0 com.example.myproj/.MainActivity t7 f}} appWin=Window{b41a0fe8 u0 Starting com.example.myproj} drawState=4
W/WindowManager( 361): Screenshot failure taking screenshot for (800x1280) to layer 21010
W/ActivityManager( 361): Activity pause timeout for ActivityRecord{b40181a0 u0 com.example.myproj/.MainActivity t7 f}
I/Process ( 1144): Sending signal. PID: 1144 SIG: 9
I/ActivityManager( 361): Process com.example.myproj (pid 1144) has died.
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressStandard.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressStandard.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressSpacebar.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressSpacebar.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressDelete.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressDelete.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressReturn.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressReturn.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressInvalid.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressInvalid.ogg
W/AudioService( 361): onLoadSoundEffects(), Error -1 while loading samples
I/Choreographer( 361): Skipped 40 frames! The application may be doing too much work on its main thread.
W/InputMethodManagerService( 361): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#b417b3a0 attribute=null, token = android.os.BinderProxy#b404fb70
D/AndroidRuntime( 1161):
D/AndroidRuntime( 1161): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
D/AndroidRuntime( 1161): CheckJNI is ON
D/dalvikvm( 1161): Trying to load lib libjavacore.so 0x0
D/dalvikvm( 1161): Added shared lib libjavacore.so 0x0
D/dalvikvm( 1161): Trying to load lib libnativehelper.so 0x0
D/dalvikvm( 1161): Added shared lib libnativehelper.so 0x0
D/dalvikvm( 1161): No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
D/dalvikvm( 1161): Note: class Landroid/app/ActivityManagerNative; has 179 unimplemented (abstract) methods
E/memtrack( 1161): Couldn't load memtrack module (No such file or directory)
E/android.os.Debug( 1161): failed to load memtrack module: -2
D/AndroidRuntime( 1161): Calling main entry com.android.commands.am.Am
I/ActivityManager( 361): Force stopping com.example.myproj appid=10051 user=0: from pid 1161
I/ActivityManager( 361): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.example.myproj/.MainActivity} from pid 1161
D/gralloc ( 51): Registering a buffer in the process that created it. This may cause memory ordering problems.
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/SurfaceFlinger( 51): glCheckFramebufferStatusOES error 1304732677
E/SurfaceFlinger( 51): got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
W/WindowManager( 361): Screenshot failure taking screenshot for (266x425) to layer 21005
D/AndroidRuntime( 1161): Shutting down VM
D/dalvikvm( 1161): GC_CONCURRENT freed 96K, 15% free 589K/688K, paused 23ms+32ms, total 71ms
D/dalvikvm( 1172): Not late-enabling CheckJNI (already on)
I/ActivityManager( 361): Start proc com.example.myproj for activity com.example.myproj/.MainActivity: pid=1172 uid=10051 gids={50051, 1028, 1015}
I/Choreographer( 361): Skipped 39 frames! The application may be doing too much work on its main thread.
I/Choreographer( 361): Skipped 34 frames! The application may be doing too much work on its main thread.
W/dalvikvm( 1172): VFY: register1 v4 holds uninitialized ref
W/dalvikvm( 1172): VFY: bad arg 0 (into Ljava/lang/Object;)
W/dalvikvm( 1172): VFY: rejecting call to Lacteve/symbolic/Util;.write (Ljava/lang/Object;I)V
W/dalvikvm( 1172): VFY: rejecting opcode 0x71 at 0x000a
W/dalvikvm( 1172): VFY: rejected Lcom/example/myproj/MainActivity$1;.<init> (Lcom/example/myproj/MainActivity;)V
W/dalvikvm( 1172): Verifier rejected class Lcom/example/myproj/MainActivity$1;
D/AndroidRuntime( 1172): Shutting down VM
W/dalvikvm( 1172): threadid=1: thread exiting with uncaught exception (group=0xb3ae0b90)
E/AndroidRuntime( 1172): FATAL EXCEPTION: main
E/AndroidRuntime( 1172): Process: com.example.myproj, PID: 1172
E/AndroidRuntime( 1172): java.lang.VerifyError: com/example/myproj/MainActivity$1
E/AndroidRuntime( 1172): at com.example.myproj.MainActivity.dol(MainActivity.java:24)
E/AndroidRuntime( 1172): at com.example.myproj.MainActivity.onCreate(MainActivity.java:17)
E/AndroidRuntime( 1172): at android.app.Activity.performCreate(Activity.java:5243)
E/AndroidRuntime( 1172): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
E/AndroidRuntime( 1172): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2140)
E/AndroidRuntime( 1172): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226)
E/AndroidRuntime( 1172): at android.app.ActivityThread.access$700(ActivityThread.java:135)
E/AndroidRuntime( 1172): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
E/AndroidRuntime( 1172): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 1172): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 1172): at android.app.ActivityThread.main(ActivityThread.java:4998)
E/AndroidRuntime( 1172): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1172): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 1172): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
E/AndroidRuntime( 1172): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
E/AndroidRuntime( 1172): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 361): Force finishing activity com.example.myproj/.MainActivity
I/WindowManager( 361): Screenshot max retries 4 of Token{b4186bf8 ActivityRecord{b4186a98 u0 com.example.myproj/.MainActivity t8 f}} appWin=Window{b417dc10 u0 Starting com.example.myproj} drawState=4
W/WindowManager( 361): Screenshot failure taking screenshot for (800x1280) to layer 21010
W/ActivityManager( 361): Activity pause timeout for ActivityRecord{b4186a98 u0 com.example.myproj/.MainActivity t8 f}
I/Process ( 1172): Sending signal. PID: 1172 SIG: 9
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressStandard.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressStandard.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressSpacebar.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressSpacebar.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressDelete.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressDelete.ogg
I/dalvikvm( 361): Jit: resizing JitTable from 4096 to 8192
I/ActivityManager( 361): Process com.example.myproj (pid 1172) has died.
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressReturn.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressReturn.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressInvalid.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressInvalid.ogg
W/AudioService( 361): onLoadSoundEffects(), Error -1 while loading samples
D/LightsService( 361): Excessive delay setting light: 444ms
D/LightsService( 361): Excessive delay setting light: 102ms
W/InputMethodManagerService( 361): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#b421b110 attribute=null, token = android.os.BinderProxy#b404fb70
D/dalvikvm( 361): GC_CONCURRENT freed 660K, 10% free 6734K/7468K, paused 7ms+17ms, total 344ms
D/AndroidRuntime( 1189):
D/AndroidRuntime( 1189): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
D/AndroidRuntime( 1189): CheckJNI is ON
D/dalvikvm( 1189): Trying to load lib libjavacore.so 0x0
D/dalvikvm( 1189): Added shared lib libjavacore.so 0x0
D/dalvikvm( 1189): Trying to load lib libnativehelper.so 0x0
D/dalvikvm( 1189): Added shared lib libnativehelper.so 0x0
D/dalvikvm( 1189): No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
D/dalvikvm( 1189): Note: class Landroid/app/ActivityManagerNative; has 179 unimplemented (abstract) methods
E/memtrack( 1189): Couldn't load memtrack module (No such file or directory)
E/android.os.Debug( 1189): failed to load memtrack module: -2
D/AndroidRuntime( 1189): Calling main entry com.android.commands.am.Am
I/ActivityManager( 361): Force stopping com.example.myproj appid=10051 user=0: from pid 1189
I/ActivityManager( 361): START u0 {flg=0x10000000 cmp=com.example.myproj/.MainActivity} from pid 1189
D/gralloc ( 51): Registering a buffer in the process that created it. This may cause memory ordering problems.
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/SurfaceFlinger( 51): glCheckFramebufferStatusOES error 1304732677
E/SurfaceFlinger( 51): got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
W/WindowManager( 361): Screenshot failure taking screenshot for (266x425) to layer 21005
I/ActivityManager( 361): Start proc com.example.myproj for activity com.example.myproj/.MainActivity: pid=1200 uid=10051 gids={50051, 1028, 1015}
D/dalvikvm( 1200): Not late-enabling CheckJNI (already on)
I/Choreographer( 361): Skipped 37 frames! The application may be doing too much work on its main thread.
I/Choreographer( 361): Skipped 33 frames! The application may be doing too much work on its main thread.
I/Choreographer( 531): Skipped 84 frames! The application may be doing too much work on its main thread.
W/dalvikvm( 1200): VFY: register1 v4 holds uninitialized ref
W/dalvikvm( 1200): VFY: bad arg 0 (into Ljava/lang/Object;)
W/dalvikvm( 1200): VFY: rejecting call to Lacteve/symbolic/Util;.write (Ljava/lang/Object;I)V
W/dalvikvm( 1200): VFY: rejecting opcode 0x71 at 0x000a
W/dalvikvm( 1200): VFY: rejected Lcom/example/myproj/MainActivity$1;.<init> (Lcom/example/myproj/MainActivity;)V
W/dalvikvm( 1200): Verifier rejected class Lcom/example/myproj/MainActivity$1;
D/AndroidRuntime( 1200): Shutting down VM
W/dalvikvm( 1200): threadid=1: thread exiting with uncaught exception (group=0xb3ae0b90)
E/AndroidRuntime( 1200): FATAL EXCEPTION: main
E/AndroidRuntime( 1200): Process: com.example.myproj, PID: 1200
E/AndroidRuntime( 1200): java.lang.VerifyError: com/example/myproj/MainActivity$1
E/AndroidRuntime( 1200): at com.example.myproj.MainActivity.dol(MainActivity.java:24)
E/AndroidRuntime( 1200): at com.example.myproj.MainActivity.onCreate(MainActivity.java:17)
E/AndroidRuntime( 1200): at android.app.Activity.performCreate(Activity.java:5243)
E/AndroidRuntime( 1200): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
E/AndroidRuntime( 1200): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2140)
E/AndroidRuntime( 1200): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226)
E/AndroidRuntime( 1200): at android.app.ActivityThread.access$700(ActivityThread.java:135)
E/AndroidRuntime( 1200): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
E/AndroidRuntime( 1200): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 1200): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 1200): at android.app.ActivityThread.main(ActivityThread.java:4998)
E/AndroidRuntime( 1200): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1200): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 1200): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
E/AndroidRuntime( 1200): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
E/AndroidRuntime( 1200): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 361): Force finishing activity com.example.myproj/.MainActivity
I/WindowManager( 361): Screenshot max retries 4 of Token{b4083168 ActivityRecord{b3ffc9c8 u0 com.example.myproj/.MainActivity t9 f}} appWin=Window{b401a348 u0 Starting com.example.myproj} drawState=4
W/WindowManager( 361): Screenshot failure taking screenshot for (800x1280) to layer 21010
W/ActivityManager( 361): Activity pause timeout for ActivityRecord{b3ffc9c8 u0 com.example.myproj/.MainActivity t9 f}
I/Choreographer( 361): Skipped 31 frames! The application may be doing too much work on its main thread.
E/WindowManager( 361): Starting window AppWindowToken{b41c65a8 token=Token{b4083168 ActivityRecord{b3ffc9c8 u0 com.example.myproj/.MainActivity t9}}} timed out
W/ActivityManager( 361): Activity destroy timeout for ActivityRecord{b3ffc9c8 u0 com.example.myproj/.MainActivity t9 f}
D/dalvikvm( 531): GC_CONCURRENT freed 894K, 16% free 5380K/6392K, paused 78ms+17ms, total 167ms
D/dalvikvm( 515): GC_CONCURRENT freed 322K, 12% free 3340K/3780K, paused 6ms+7ms, total 64ms
I/Process ( 1200): Sending signal. PID: 1200 SIG: 9
W/InputMethodManagerService( 361): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#b404f558 attribute=null, token = android.os.BinderProxy#b404fb70
I/ActivityManager( 361): Process com.example.myproj (pid 1200) has died.
D/ConnectivityService( 361): Sampling interval elapsed, updating statistics ..
D/ConnectivityService( 361): Done.
D/ConnectivityService( 361): Setting timer for 720seconds
D/dalvikvm( 515): GC_CONCURRENT freed 436K, 14% free 3290K/3792K, paused 4ms+5ms, total 41ms
D/AndroidRuntime( 1240):
D/AndroidRuntime( 1240): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
D/AndroidRuntime( 1240): CheckJNI is ON
D/dalvikvm( 1240): Trying to load lib libjavacore.so 0x0
D/dalvikvm( 1240): Added shared lib libjavacore.so 0x0
D/dalvikvm( 1240): Trying to load lib libnativehelper.so 0x0
D/dalvikvm( 1240): Added shared lib libnativehelper.so 0x0
D/dalvikvm( 1240): No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
D/dalvikvm( 1240): Note: class Landroid/app/ActivityManagerNative; has 179 unimplemented (abstract) methods
E/memtrack( 1240): Couldn't load memtrack module (No such file or directory)
E/android.os.Debug( 1240): failed to load memtrack module: -2
D/AndroidRuntime( 1240): Calling main entry com.android.commands.am.Am
I/ActivityManager( 361): Force stopping com.example.myproj appid=10051 user=0: from pid 1240
I/ActivityManager( 361): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=logcat cmp=com.example.myproj/.MainActivity} from pid 1240
D/gralloc ( 51): Registering a buffer in the process that created it. This may cause memory ordering problems.
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/SurfaceFlinger( 51): glCheckFramebufferStatusOES error 1304732677
E/SurfaceFlinger( 51): got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
W/WindowManager( 361): Screenshot failure taking screenshot for (266x425) to layer 21005
I/ActivityManager( 361): Start proc com.example.myproj for activity com.example.myproj/.MainActivity: pid=1251 uid=10051 gids={50051, 1028, 1015}
D/dalvikvm( 1251): Not late-enabling CheckJNI (already on)
I/Choreographer( 361): Skipped 44 frames! The application may be doing too much work on its main thread.
W/dalvikvm( 1251): VFY: register1 v4 holds uninitialized ref
W/dalvikvm( 1251): VFY: bad arg 0 (into Ljava/lang/Object;)
W/dalvikvm( 1251): VFY: rejecting call to Lacteve/symbolic/Util;.write (Ljava/lang/Object;I)V
W/dalvikvm( 1251): VFY: rejecting opcode 0x71 at 0x000a
W/dalvikvm( 1251): VFY: rejected Lcom/example/myproj/MainActivity$1;.<init> (Lcom/example/myproj/MainActivity;)V
W/dalvikvm( 1251): Verifier rejected class Lcom/example/myproj/MainActivity$1;
D/AndroidRuntime( 1251): Shutting down VM
W/dalvikvm( 1251): threadid=1: thread exiting with uncaught exception (group=0xb3ae0b90)
E/AndroidRuntime( 1251): FATAL EXCEPTION: main
E/AndroidRuntime( 1251): Process: com.example.myproj, PID: 1251
E/AndroidRuntime( 1251): java.lang.VerifyError: com/example/myproj/MainActivity$1
E/AndroidRuntime( 1251): at com.example.myproj.MainActivity.dol(MainActivity.java:24)
E/AndroidRuntime( 1251): at com.example.myproj.MainActivity.onCreate(MainActivity.java:17)
E/AndroidRuntime( 1251): at android.app.Activity.performCreate(Activity.java:5243)
E/AndroidRuntime( 1251): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
E/AndroidRuntime( 1251): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2140)
E/AndroidRuntime( 1251): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226)
E/AndroidRuntime( 1251): at android.app.ActivityThread.access$700(ActivityThread.java:135)
E/AndroidRuntime( 1251): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
E/AndroidRuntime( 1251): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 1251): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 1251): at android.app.ActivityThread.main(ActivityThread.java:4998)
E/AndroidRuntime( 1251): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1251): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 1251): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
E/AndroidRuntime( 1251): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
E/AndroidRuntime( 1251): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 361): Force finishing activity com.example.myproj/.MainActivity
I/WindowManager( 361): Screenshot max retries 4 of Token{b41deb30 ActivityRecord{b4232990 u0 com.example.myproj/.MainActivity t10 f}} appWin=Window{b423e4b0 u0 Starting com.example.myproj} drawState=4
W/WindowManager( 361): Screenshot failure taking screenshot for (800x1280) to layer 21010
D/dalvikvm( 361): GC_CONCURRENT freed 1117K, 16% free 6529K/7720K, paused 16ms+34ms, total 347ms
W/ActivityManager( 361): Activity pause timeout for ActivityRecord{b4232990 u0 com.example.myproj/.MainActivity t10 f}
I/Choreographer( 531): Skipped 46 frames! The application may be doing too much work on its main thread.
D/LightsService( 361): Excessive delay setting light: 82ms
D/LightsService( 361): Excessive delay setting light: 426ms
I/Choreographer( 361): Skipped 37 frames! The application may be doing too much work on its main thread.
D/LightsService( 361): Excessive delay setting light: 1681ms
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressStandard.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressStandard.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressSpacebar.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressSpacebar.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressDelete.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressDelete.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressReturn.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressReturn.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressInvalid.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressInvalid.ogg
W/AudioService( 361): onLoadSoundEffects(), Error -1 while loading samples
I/Process ( 1251): Sending signal. PID: 1251 SIG: 9
D/LightsService( 361): Excessive delay setting light: 320ms
D/LightsService( 361): Excessive delay setting light: 190ms
D/LightsService( 361): Excessive delay setting light: 73ms
I/ActivityManager( 361): Process com.example.myproj (pid 1251) has died.
W/InputMethodManagerService( 361): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#b3f8b170 attribute=null, token = android.os.BinderProxy#b404fb70
E/WindowManager( 361): Starting window AppWindowToken{b4233820 token=Token{b41deb30 ActivityRecord{b4232990 u0 com.example.myproj/.MainActivity t10}}} timed out
I/ActivityManager( 361): Killing 564:com.android.printspooler/u0a38 (adj 15): empty for 1807s
I/ProcessStatsService( 361): Prepared write state in 25ms
I/ProcessStatsService( 361): Prepared write state in 16ms
Here's my breakdown: I have a class called UserLocation where I perform all Location events. Within this class I have a function, public Location getLocation(Context context) , where I check for Location providers, get locations from all available providers, and return the most accurate. Now I want to use this function inside an AsyncTask in my SplashScreen Activity. I have been reading several resources that I need to call a Looper.prepare() at the beginning of my doInBackground method and Looper.loop() at the end of the method. However, I cannot get it to work properly. I have scanned my logcat and the line that sticks out to me is Looper.loop() line: 137
Splash Activity: (modified slightly to avoid garbage)
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.splash_layout);
new LoadData().execute();
}
class LoadData extends AsyncTask <Void, Integer, Void> {
private final int prgTitle[] = { R.string.Checking_Service,
R.string.fetching_location,
R.string.Location_got,
R.string.Connect_Database};
private final int prgNums[] = {0, 10, 25, 50, 85,};
private int index;
#Override
public void onPreExecute() {
int max = 0;
for (final int p : prgNums){
max += p;
}
pBar.setMax(max);
index = 0;
}
#Override
protected Void doInBackground(Void...params) {
if(usrLoc.canGetLocation = true){
usrLoc.getLocation(mContext);
}
if(usrLoc.latitude != Double.NaN){
//do stuff
}
return null;
}
protected void onProgressUpdate(Void... loadingValues) {
pBarText.setText(prgTitle[index]);
pBar.incrementProgressBy(prgNums[index]);
++index;
publishProgress();
}
protected void onPostExecute(){
usrLoc.stopUsingGPS();
}
}
EDIT: LogCat Posted
12-10 14:26:00.434: D/AndroidRuntime(894): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
12-10 14:26:00.434: D/AndroidRuntime(894): CheckJNI is ON
12-10 14:26:01.272: D/AndroidRuntime(894): Calling main entry com.android.commands.pm.Pm
12-10 14:26:01.312: D/AndroidRuntime(894): Shutting down VM
12-10 14:26:01.332: I/AndroidRuntime(894): NOTE: attach of thread 'Binder Thread #3' failed
12-10 14:26:01.342: D/dalvikvm(894): GC_CONCURRENT freed 101K, 78% free 462K/2048K, paused 1ms+2ms
12-10 14:26:01.342: D/dalvikvm(894): Debugger has detached; object registry had 1 entries
12-10 14:26:01.932: D/AndroidRuntime(907): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
12-10 14:26:01.932: D/AndroidRuntime(907): CheckJNI is ON
12-10 14:26:02.864: D/AndroidRuntime(907): Calling main entry com.android.commands.am.Am
12-10 14:26:02.892: I/ActivityManager(91): Force stopping package com.book.swap uid=10040
12-10 14:26:02.892: W/ActivityManager(91): Force removing ActivityRecord{41785ec8 com.book.swap/.SplashScreen}: app died, no saved state
12-10 14:26:02.892: I/Process(91): Sending signal. PID: 877 SIG: 9
12-10 14:26:02.922: W/NetworkManagementSocketTagger(91): setKernelCountSet(10040, 0) failed with errno -2
12-10 14:26:02.992: W/NetworkManagementSocketTagger(91): setKernelCountSet(10005, 1) failed with errno -2
12-10 14:26:03.022: I/ActivityManager(91): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.book.swap/.SplashScreen} from pid 907
12-10 14:26:03.073: I/WindowManager(91): createSurface Window{41af7978 com.android.launcher/com.android.launcher2.Launcher paused=false}: DRAW NOW PENDING
12-10 14:26:03.092: W/WindowManager(91): Failure taking screenshot for (240x394) to layer 21005
12-10 14:26:03.102: D/AndroidRuntime(907): Shutting down VM
12-10 14:26:03.152: I/AndroidRuntime(907): NOTE: attach of thread 'Binder Thread #3' failed
12-10 14:26:03.163: D/dalvikvm(907): GC_CONCURRENT freed 101K, 77% free 485K/2048K, paused 1ms+1ms
12-10 14:26:03.163: D/jdwp(907): Got wake-up signal, bailing out of select
12-10 14:26:03.163: D/dalvikvm(907): Debugger has detached; object registry had 1 entries
12-10 14:26:03.191: D/dalvikvm(918): Not late-enabling CheckJNI (already on)
12-10 14:26:03.202: I/WindowManager(91): createSurface Window{41a24bd0 Starting com.book.swap paused=false}: DRAW NOW PENDING
12-10 14:26:03.222: I/ActivityManager(91): Start proc com.book.swap for activity com.book.swap/.SplashScreen: pid=918 uid=10040 gids={3003}
12-10 14:26:03.522: W/NetworkManagementSocketTagger(91): setKernelCountSet(10040, 1) failed with errno -2
12-10 14:26:03.662: W/ActivityThread(918): Application com.book.swap is waiting for the debugger on port 8100...
12-10 14:26:03.672: I/System.out(918): Sending WAIT chunk
12-10 14:26:03.682: I/dalvikvm(918): Debugger is active
12-10 14:26:03.872: I/System.out(918): Debugger has connected
12-10 14:26:03.872: I/System.out(918): waiting for debugger to settle...
12-10 14:26:04.072: I/System.out(918): waiting for debugger to settle...
12-10 14:26:04.202: I/WindowManager(91): createSurface Window{41adaa20 Waiting For Debugger paused=false}: DRAW NOW PENDING
12-10 14:26:04.272: I/System.out(918): waiting for debugger to settle...
12-10 14:26:04.498: I/System.out(918): waiting for debugger to settle...
12-10 14:26:04.692: I/System.out(918): waiting for debugger to settle...
12-10 14:26:04.904: I/System.out(918): waiting for debugger to settle...
12-10 14:26:05.102: I/System.out(918): waiting for debugger to settle...
12-10 14:26:05.122: W/InputManagerService(91): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#417c64e8
12-10 14:26:05.355: I/System.out(918): waiting for debugger to settle...
12-10 14:26:05.619: I/System.out(918): waiting for debugger to settle...
12-10 14:26:05.822: I/System.out(918): waiting for debugger to settle...
12-10 14:26:06.065: I/System.out(918): waiting for debugger to settle...
12-10 14:26:06.287: I/System.out(918): waiting for debugger to settle...
12-10 14:26:06.513: I/System.out(918): debugger has settled (1427)
12-10 14:26:13.132: W/ActivityManager(91): Launch timeout has expired, giving up wake lock!
12-10 14:26:13.597: W/ActivityManager(91): Activity idle timeout for ActivityRecord{418af8c8 com.book.swap/.SplashScreen}
12-10 14:31:31.391: A/NetworkStats(91): problem reading network stats
12-10 14:31:31.391: A/NetworkStats(91): java.lang.IllegalStateException: problem parsing line: null
12-10 14:31:31.391: A/NetworkStats(91): at com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:313)
12-10 14:31:31.391: A/NetworkStats(91): at com.android.server.NetworkManagementService.getNetworkStatsUidDetail(NetworkManagementService.java:1271)
12-10 14:31:31.391: A/NetworkStats(91): at com.android.server.net.NetworkStatsService.performPollLocked(NetworkStatsService.java:810)
12-10 14:31:31.391: A/NetworkStats(91): at com.android.server.net.NetworkStatsService.performPoll(NetworkStatsService.java:771)
12-10 14:31:31.391: A/NetworkStats(91): at com.android.server.net.NetworkStatsService.access$100(NetworkStatsService.java:128)
12-10 14:31:31.391: A/NetworkStats(91): at com.android.server.net.NetworkStatsService$3.onReceive(NetworkStatsService.java:610)
12-10 14:31:31.391: A/NetworkStats(91): at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:728)
12-10 14:31:31.391: A/NetworkStats(91): at android.os.Handler.handleCallback(Handler.java:605)
12-10 14:31:31.391: A/NetworkStats(91): at android.os.Handler.dispatchMessage(Handler.java:92)
12-10 14:31:31.391: A/NetworkStats(91): at android.os.Looper.loop(Looper.java:137)
12-10 14:31:31.391: A/NetworkStats(91): at android.os.HandlerThread.run(HandlerThread.java:60)
12-10 14:31:31.391: A/NetworkStats(91): Caused by: java.io.FileNotFoundException: /proc/net/xt_qtaguid/stats: open failed: ENOENT (No such file or directory)
12-10 14:31:31.391: A/NetworkStats(91): at libcore.io.IoBridge.open(IoBridge.java:406)
12-10 14:31:31.391: A/NetworkStats(91): at java.io.FileInputStream.<init>(FileInputStream.java:78)
12-10 14:31:31.391: A/NetworkStats(91): at java.io.FileReader.<init>(FileReader.java:42)
12-10 14:31:31.391: A/NetworkStats(91): at com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:272)
12-10 14:31:31.391: A/NetworkStats(91): ... 10 more
12-10 14:31:31.391: A/NetworkStats(91): Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)
12-10 14:31:31.391: A/NetworkStats(91): at libcore.io.Posix.open(Native Method)
12-10 14:31:31.391: A/NetworkStats(91): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:98)
12-10 14:31:31.391: A/NetworkStats(91): at libcore.io.IoBridge.open(IoBridge.java:390)
12-10 14:31:31.391: A/NetworkStats(91): ... 13 more
I reference and imitates the Android Sample at android-sdks\samples\android-18\legacy\BluetoothLeGatt to developing an application.
I can scan the device.
But the app crash when I try to connect the bluetooth device.
This is the log that the app crash when I try to connect the bluetooth device.
D/BtGatt.btif( 2443): btif_gattc_scan
D/BtGatt.btif( 2443): btgattc_handle_event: Event 1003
D/BtGatt.GattService( 2443): unregisterClient() - clientIf=4
D/BtGatt.btif( 2443): btif_gattc_unregister_app
D/BtGatt.btif( 2443): btgattc_handle_event: Event 1001
D/BtGatt.btif( 2443): btif_gattc_upstreams_evt: Event 1
I/ActivityManager( 1766): START u0 {cmp=com.example.prevent_the_lost/.DeviceControl (has extras)} from pid 5526
W/WindowManager( 1766): Screenshot failure taking screenshot for (166x125) to layer 21015
I/bt-hci ( 2443): BLE HCI(id=62) event = 0x02)
I/bt-hci ( 2443): btu_ble_process_adv_pkt
D/BluetoothAdapter( 5526): stopLeScan()
I/bt-hci ( 2443): BLE HCI(id=62) event = 0x02)
I/bt-hci ( 2443): btu_ble_process_adv_pkt
D/dalvikvm( 5526): GC_CONCURRENT freed 165K, 5% free 4427K/4624K, paused 1ms+1ms, total 5ms
W/ActivityManager( 1766): Unable to start service Intent { cmp=com.example.prevent_the_lost/.BluetoothLeService } U=0: not found
I/ActivityManager( 1766): Displayed com.example.prevent_the_lost/.DeviceControl: +29ms
D/AndroidRuntime( 5526): Shutting down VM
W/dalvikvm( 5526): threadid=1: thread exiting with uncaught exception (group=0x94ee8648)
E/AndroidRuntime( 5526): FATAL EXCEPTION: main
E/AndroidRuntime( 5526): java.lang.NullPointerException
E/AndroidRuntime( 5526): at com.example.prevent_the_lost.DeviceControl.onOptionsItemSelected(DeviceControl.java:140)
E/AndroidRuntime( 5526): at android.app.Activity.onMenuItemSelected(Activity.java:2566)
E/AndroidRuntime( 5526): at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:986)
E/AndroidRuntime( 5526): at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:735)
E/AndroidRuntime( 5526): at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:152)
E/AndroidRuntime( 5526): at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:874)
E/AndroidRuntime( 5526): at com.android.internal.view.menu.ActionMenuView.invokeItem(ActionMenuView.java:547)
E/AndroidRuntime( 5526): at com.android.internal.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:115)
E/AndroidRuntime( 5526): at android.view.View.performClick(View.java:4240)
E/AndroidRuntime( 5526): at android.view.View$PerformClick.run(View.java:17721)
E/AndroidRuntime( 5526): at android.os.Handler.handleCallback(Handler.java:730)
E/AndroidRuntime( 5526): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 5526): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 5526): at android.app.ActivityThread.main(ActivityThread.java:5103)
E/AndroidRuntime( 5526): at java.lang.reflect.Method.invokeNative(NativeMethod)
E/AndroidRuntime( 5526): at java.lang.reflect.Method.invoke(Method.java:525)
E/AndroidRuntime( 5526): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
E/AndroidRuntime( 5526): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
E/AndroidRuntime( 5526): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 1766): Force finishing activity com.example.prevent_the_lost/.DeviceControl
W/WindowManager( 1766): Screenshot failure taking screenshot for (166x125) to layer 21020
W/ActivityManager( 1766): Activity pause timeout for ActivityRecord{4aad960c u0com.example.prevent_the_lost/.DeviceControl}
I/Process ( 5526): Sending signal. PID: 5526 SIG: 9
W/InputDispatcher( 1766): channel '4aaa49ec com.example.prevent_the_lost/com.example.prevent_the_lost.Device_List (server)' ~ Consumer closed input channel or an error occurred. events=0x9
E/InputDispatcher( 1766): channel '4aaa49ec com.example.prevent_the_lost/com.example.prevent_the_lost.Device_List (server)' ~ Channel is unrecoverably broken and will be disposed!
W/InputDispatcher( 1766): channel '4aa9c3e4 com.example.prevent_the_lost/com.example.prevent_the_lost.DeviceControl (server)' ~ Consumer closed input channel or an error occurred. events=0xd
E/InputDispatcher( 1766): channel '4aa9c3e4 com.example.prevent_the_lost/com.example.prevent_the_lost.DeviceControl (server)' ~ Channel is unrecoverably brokenand will be disposed!
W/InputDispatcher( 1766): Attempted to unregister already unregistered input channel '4aaa49ec com.example.prevent_the_lost/com.example.prevent_the_lost.Device_List (server)'
W/InputDispatcher( 1766): Attempted to unregister already unregistered input channel '4aa9c3e4 com.example.prevent_the_lost/com.example.prevent_the_lost.DeviceControl (server)'
I/ActivityManager( 1766): Process com.example.prevent_the_lost (pid 5526) has died.
I/WindowState( 1766): WIN DEATH: Window{4aaa49ec u0 com.example.prevent_the_lost/com.example.prevent_the_lost.Device_List}
I/WindowState( 1766): WIN DEATH: Window{4aa9c3e4 u0 com.example.prevent_the_lost/com.example.prevent_the_lost.DeviceControl}
I/ActivityManager( 1766): Start proc com.example.prevent_the_lost for activity com.example.prevent_the_lost/.Device_List: pid=5545 uid=10043 gids={50043, 3001,3002, 1028}
I/ActivityThread( 5545): Switching default density from 160 to 130
D/BluetoothManagerService( 1766): Message: 20
D/BluetoothManagerService( 1766): Added callback: android.bluetooth.IBluetoothManagerCallback$Stub$Proxy#4ab1fee8:true
W/InputMethodManagerService( 1766): Got RemoteException sending setActive(false) notification to pid 5526 uid 10043
I/ActivityManager( 1766): Displayed com.example.prevent_the_lost/.Device_List: +171ms
D/dalvikvm( 1766): GC_CONCURRENT freed 455K, 19% free 7301K/8980K, paused 1ms+1ms, total 12ms
I don't know what the error in this Log ??
Could somebody tell me the error and how to solve it ???
Thanks a lot!!!
I find the error is "Unable to start service Intent"
The solution is add the Service in Manifest -> Application.
When ANR occurs for Launcher,dialog pops up and the Launcher resume then.
Select OK to restart Launcher after the launcher resume to respond, the rest keys will be dropped.
The problem occurs in my developing environment and it's hard to reproduce.So I do a test for this:
Create a simple APK as Launcher, and sleep some time in onCreat or onResume to let the ANR occurs
Start the Launcher and press key to let ANR occurs
after sleep the view is normally shown behind the ANR dialog
select OK to restart launcher, then keys can't be received because the activity can't created
Dropping event because there is no focused window or focused application
The APK is used on Android4.0 and Android2.2
there is no problem in Android2.2, it looks like a problem on Android 4.03.
Log are suppled for the real test issue and the emulate issue in 2.2, 4.03.
Plus: I modify the original Launcher2 as well and sleep in onResume, It has no such issue
but I can't find any clue.
Any help is appreciated.
Android4.0
09-10 17:29:44.716 W/ActivityManager( 77): Force finishing activity com.example.testanr2/.MainActivity
09-10 17:29:44.716 W/WindowManager( 77): Failure taking screenshot for (180x300) to layer 21005
09-10 17:29:44.736 I/ActivityManager( 77): Clearing package preferred activities from com.example.testanr2
09-10 17:29:44.736 I/ActivityManager( 77): Killing ProcessRecord{415df8d8 2409:com.example.testanr2/10040}: user's request
09-10 17:29:44.756 I/WindowManager( 77): WIN DEATH: Window{41444c48 com.example.testanr2/com.example.testanr2.MainActivity paused=true}
09-10 17:29:44.765 I/ActivityManager( 77): START {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000000 cmp=com.example.testanr2/.MainActivity} from pid 0
09-10 17:29:44.786 W/ActivityManager( 77): Exception when starting activity com.example.testanr2/.MainActivity
09-10 17:29:44.786 W/ActivityManager( 77): android.os.DeadObjectException
09-10 17:29:44.786 W/ActivityManager( 77): at android.os.BinderProxy.transact(Native Method)
09-10 17:29:44.786 W/ActivityManager( 77): at android.app.ApplicationThreadProxy.scheduleLaunchActivity(ApplicationThreadNative.java:660)
09-10 17:29:44.786 W/ActivityManager( 77): at com.android.server.am.ActivityStack.realStartActivityLocked(ActivityStack.java:593)
09-10 17:29:44.786 W/ActivityManager( 77): at com.android.server.am.ActivityStack.startSpecificActivityLocked(ActivityStack.java:701)
09-10 17:29:44.786 W/ActivityManager( 77): at com.android.server.am.ActivityStack.resumeTopActivityLocked(ActivityStack.java:1571)
09-10 17:29:44.786 W/ActivityManager( 77): at com.android.server.am.ActivityStack.completePauseLocked(ActivityStack.java:1000)
09-10 17:29:44.786 W/ActivityManager( 77): at com.android.server.am.ActivityStack.activityPaused(ActivityStack.java:928)
09-10 17:29:44.786 W/ActivityManager( 77): at com.android.server.am.ActivityManagerService.activityPaused(ActivityManagerService.java:3957)
09-10 17:29:44.786 W/ActivityManager( 77): at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:371)
09-10 17:29:44.786 W/ActivityManager( 77): at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:1496)
09-10 17:29:44.786 W/ActivityManager( 77): at android.os.Binder.execTransact(Binder.java:338)
09-10 17:29:44.786 W/ActivityManager( 77): at dalvik.system.NativeStart.run(Native Method)
09-10 17:29:44.786 W/ActivityManager( 77): Force removing ActivityRecord{414b0020 com.example.testanr2/.MainActivity}: app died, no saved state
09-10 17:29:44.836 D/dalvikvm( 2438): Not late-enabling CheckJNI (already on)
09-10 17:29:44.855 I/ActivityManager( 77): Start proc com.example.testanr2 for activity com.example.testanr2/.MainActivity: pid=2438 uid=10040 gids={}
09-10 17:29:44.855 I/ActivityManager( 77): Process com.example.testanr2 (pid 2409) has died and restarted (pid 2438).
09-10 17:29:44.855 W/NetworkManagementSocketTagger( 77): setKernelCountSet(10040, 0) failed with errno -2
09-10 17:29:47.562 I/InputDispatcher( 77): Dropping event because there is no touched window or focused application.
09-10 17:29:47.828 I/InputDispatcher( 77): Dropping event because there is no touched window or focused application.
09-10 17:29:47.965 D/dalvikvm( 161): GC_CONCURRENT freed 384K, 6% free 10331K/10951K, paused 7ms+3ms
09-10 17:29:48.135 I/InputDispatcher( 77): Dropping event because there is no touched window or focused application.
09-10 17:29:50.207 I/InputDispatcher( 77): Dropping event because there is no touched window or focused application.
09-10 17:29:50.708 I/InputDispatcher( 77): Dropping event because there is no touched window or focused application.
09-10 17:29:50.991 I/InputDispatcher( 77): Dropping event because there is no touched window or focused application.
09-10 17:29:51.205 I/InputDispatcher( 77): Dropping event because there is no touched window or focused application.
09-10 17:29:51.362 I/InputDispatcher( 77): Dropping event because there is no touched window or focused application.
09-10 17:29:54.746 W/ActivityManager( 77): Launch timeout has expired, giving up wake lock!
09-10 17:29:57.877 I/InputDispatcher( 77): Dropping event because there is no touched window or focused application.
Android2.2
09-10 16:40:32.254 D/PackageManager( 72): New package installed in /data/app/com.example.testanr2-1.apk
09-10 16:40:32.304 D/lixin ( 668): sleep~ in application10
09-10 16:40:32.394 I/ActivityManager( 72): Force stopping package com.example.testanr2 uid=10040
09-10 16:40:32.394 I/Process ( 72): Sending signal. PID: 668 SIG: 9
09-10 16:40:32.414 I/ActivityManager( 72): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000000 cmp=com.example.testanr2/.MainActivity }
09-10 16:40:32.484 D/dalvikvm( 72): GC_FOR_MALLOC freed 11945 objects / 732440 bytes in 67ms
09-10 16:40:32.484 I/ActivityManager( 72): Start proc com.example.testanr2 for activity com.example.testanr2/.MainActivity: pid=674 uid=10040 gids={}
09-10 16:40:32.604 D/dalvikvm( 198): GC_EXPLICIT freed 2644 objects / 128328 bytes in 105ms
09-10 16:40:32.734 D/dalvikvm( 72): GC_EXPLICIT freed 939 objects / 49752 bytes in 229ms
09-10 16:40:32.734 I/UsageStats( 72): Unexpected resume of com.example.testanr2 while already resumed in com.example.testanr2
09-10 16:40:32.834 W/RecognitionManagerService( 72): no available voice recognition services found
09-10 16:40:32.864 D/lixin ( 674): sleep~ in application10
09-10 16:40:32.915 D/dalvikvm( 72): GC_EXPLICIT freed 2356 objects / 116024 bytes in 77ms
09-10 16:40:32.954 I/installd( 34): unlink /data/dalvik-cache/data#app#com.example.testanr2-2.apk#classes.dex
09-10 16:40:32.984 D/AndroidRuntime( 654): Shutting down VM
09-10 16:40:32.984 D/dalvikvm( 654): Debugger has detached; object registry had 1 entries
09-10 16:40:33.245 D/AndroidRuntime( 684):
09-10 16:40:33.245 D/AndroidRuntime( 684): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
09-10 16:40:33.245 D/AndroidRuntime( 684): CheckJNI is ON
09-10 16:40:33.334 D/AndroidRuntime( 684): --- registering native functions ---
09-10 16:40:33.665 I/ActivityManager( 72): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.example.testanr2/.MainActivity }
09-10 16:40:33.665 D/AndroidRuntime( 684): Shutting down VM
09-10 16:40:33.665 D/dalvikvm( 684): Debugger has detached; object registry had 1 entries
09-10 16:40:33.674 I/AndroidRuntime( 684): NOTE: attach of thread 'Binder Thread #3' failed
09-10 16:40:34.169 W/ActivityManager( 72): Activity pause timeout for HistoryRecord{45060dd8 com.example.testanr2/.MainActivity}
09-10 16:40:40.057 W/WindowManager( 72): No window to dispatch pointer action 0
09-10 16:40:40.074 W/WindowManager( 72): No window to dispatch pointer action 1
09-10 16:40:40.275 W/WindowManager( 72): No window to dispatch pointer action 0
09-10 16:40:40.314 W/WindowManager( 72): No window to dispatch pointer action 1
09-10 16:40:40.445 W/WindowManager( 72): No window to dispatch pointer action 0
09-10 16:40:40.484 W/WindowManager( 72): No window to dispatch pointer action 1
09-10 16:40:40.528 W/ActivityManager( 72): Launch timeout has expired, giving up wake lock!
09-10 16:40:40.678 W/WindowManager( 72): No window to dispatch pointer action 0
09-10 16:40:40.714 W/WindowManager( 72): No window to dispatch pointer action 1
09-10 16:40:40.864 W/WindowManager( 72): No window to dispatch pointer action 0
09-10 16:40:40.874 W/WindowManager( 72): No window to dispatch pointer action 1
09-10 16:40:41.604 W/WindowManager( 72): No window to dispatch pointer action 0
09-10 16:40:41.637 W/WindowManager( 72): No window to dispatch pointer action 1
09-10 16:40:41.755 W/WindowManager( 72): No window to dispatch pointer action 0
09-10 16:40:41.786 W/WindowManager( 72): No window to dispatch pointer action 1
09-10 16:40:41.936 W/WindowManager( 72): No window to dispatch pointer action 0
09-10 16:40:41.954 W/WindowManager( 72): No window to dispatch pointer action 1
09-10 16:40:42.088 W/WindowManager( 72): No window to dispatch pointer action 0
09-10 16:40:42.124 W/WindowManager( 72): No window to dispatch pointer action 1
09-10 16:40:42.234 W/WindowManager( 72): No window to dispatch pointer action 0
09-10 16:40:42.295 W/WindowManager( 72): No window to dispatch pointer action 1
09-10 16:40:42.404 W/WindowManager( 72): No window to dispatch pointer action 0
09-10 16:40:42.444 W/WindowManager( 72): No window to dispatch pointer action 1
09-10 16:40:42.595 W/WindowManager( 72): No window to dispatch pointer action 0
09-10 16:40:42.614 W/WindowManager( 72): No window to dispatch pointer action 1
09-10 16:40:42.744 W/ActivityManager( 72): Activity idle timeout for HistoryRecord{45060dd8 com.example.testanr2/.MainActivity}
09-10 16:40:42.744 W/WindowManager( 72): No window to dispatch pointer action 0
09-10 16:40:42.754 W/WindowManager( 72): No window to dispatch pointer action 1
09-10 16:40:42.885 W/WindowManager( 72): No window to dispatch pointer action 0
09-10 16:40:42.885 D/lixin ( 674): sleep~ in application10
09-10 16:40:42.926 W/WindowManager( 72): No window to dispatch pointer action 1
09-10 16:40:44.181 W/ActivityManager( 72): Activity idle timeout for HistoryRecord{451b0480 com.example.testanr2/.MainActivity}
09-10 16:40:47.029 W/WindowManager( 72): No window to dispatch pointer action 0
09-10 16:40:47.045 W/WindowManager( 72): No window to dispatch pointer action 1
09-10 16:40:47.280 W/WindowManager( 72): No window to dispatch pointer action 0
09-10 16:40:47.345 W/WindowManager( 72): No window to dispatch pointer action 1
09-10 16:40:47.545 W/WindowManager( 72): No window to dispatch pointer action 0
09-10 16:40:47.595 W/WindowManager( 72): No window to dispatch pointer action 1
09-10 16:40:47.794 W/WindowManager( 72): No window to dispatch pointer action 0
09-10 16:40:47.865 W/WindowManager( 72): No window to dispatch pointer action 1
09-10 16:40:49.235 D/dalvikvm( 289): GC_EXPLICIT freed 353 objects / 19600 bytes in 56ms
09-10 16:40:52.924 W/InputManagerService( 72): Got RemoteException sending setActive(false) notification to pid 575 uid 10040
09-10 16:40:52.964 I/ActivityManager( 72): Displayed activity com.example.testanr2/.MainActivity: 18800 ms (total 22687 ms)
Launcher2
01-01 08:12:56.140 I/WindowManager( 1259): Handle special keys: 23
01-01 08:12:56.145 W/ActivityManager( 1259): Force finishing activity com.android.launcher/com.android.launcher2.Launcher
01-01 08:12:56.239 D/dalvikvm( 1259): GC_FOR_ALLOC freed 462K, 13% free 10871K/12423K, paused 48ms
01-01 08:12:56.242 D/UsageStats( 1259): UsageStats: broadcasting intent
01-01 08:12:56.244 I/ActivityManager( 1259): Clearing package preferred activities from com.android.launcher
01-01 08:12:56.244 I/ActivityManager( 1259): Killing ProcessRecord{40c2f498 2970:com.android.launcher/10032}: user's request
01-01 08:12:56.252 I/ActivityManager( 1259): START {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000000 cmp=com.android.launcher/com.android.launcher2.Launcher} from pid 0
01-01 08:12:56.303 E/JavaBinder( 1259): !!! FAILED BINDER TRANSACTION !!!
01-01 08:12:56.330 W/ActivityManager( 1259): Exception when starting activity com.android.launcher/com.android.launcher2.Launcher
01-01 08:12:56.330 W/ActivityManager( 1259): android.os.TransactionTooLargeException
01-01 08:12:56.330 W/ActivityManager( 1259): at android.os.BinderProxy.transact(Native Method)
01-01 08:12:56.330 W/ActivityManager( 1259): at android.app.ApplicationThreadProxy.scheduleLaunchActivity(ApplicationThreadNative.java:660)
01-01 08:12:56.330 W/ActivityManager( 1259): at com.android.server.am.ActivityStack.realStartActivityLocked(ActivityStack.java:615)
01-01 08:12:56.330 W/ActivityManager( 1259): at com.android.server.am.ActivityStack.startSpecificActivityLocked(ActivityStack.java:724)
01-01 08:12:56.330 W/ActivityManager( 1259): at com.android.server.am.ActivityStack.resumeTopActivityLocked(ActivityStack.java:1614)
01-01 08:12:56.330 W/ActivityManager( 1259): at com.android.server.am.ActivityStack.startActivityLocked(ActivityStack.java:1760)
01-01 08:12:56.330 W/ActivityManager( 1259): at com.android.server.am.ActivityStack.startActivityUncheckedLocked(ActivityStack.java:2802)
01-01 08:12:56.330 W/ActivityManager( 1259): at com.android.server.am.ActivityStack.startActivityLocked(ActivityStack.java:2422)
01-01 08:12:56.330 W/ActivityManager( 1259): at com.android.server.am.ActivityManagerService.startHomeActivityLocked(ActivityManagerService.java:2063)
01-01 08:12:56.330 W/ActivityManager( 1259): at com.android.server.am.ActivityStack.resumeTopActivityLocked(ActivityStack.java:1299)
01-01 08:12:56.330 W/ActivityManager( 1259): at com.android.server.am.ActivityStack.completePauseLocked(ActivityStack.java:1040)
01-01 08:12:56.330 W/ActivityManager( 1259): at com.android.server.am.ActivityStack.activityPaused(ActivityStack.java:952)
01-01 08:12:56.330 W/ActivityManager( 1259): at com.android.server.am.ActivityManagerService.activityPaused(ActivityManagerService.java:4140)
01-01 08:12:56.330 W/ActivityManager( 1259): at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:371)
01-01 08:12:56.330 W/ActivityManager( 1259): at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:1548)
01-01 08:12:56.330 W/ActivityManager( 1259): at android.os.Binder.execTransact(Binder.java:338)
01-01 08:12:56.330 W/ActivityManager( 1259): at com.android.server.SystemServer.init1(Native Method)
01-01 08:12:56.330 W/ActivityManager( 1259): at com.android.server.SystemServer.main(SystemServer.java:860)
01-01 08:12:56.330 W/ActivityManager( 1259): at java.lang.reflect.Method.invokeNative(Native Method)
01-01 08:12:56.330 W/ActivityManager( 1259): at java.lang.reflect.Method.invoke(Method.java:511)
01-01 08:12:56.330 W/ActivityManager( 1259): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
01-01 08:12:56.330 W/ActivityManager( 1259): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
01-01 08:12:56.330 W/ActivityManager( 1259): at dalvik.system.NativeStart.main(Native Method)
01-01 08:12:56.345 E/JavaBinder( 1259): !!! FAILED BINDER TRANSACTION !!!
01-01 08:12:56.408 I/ActivityManager( 1259): Start proc com.android.launcher for activity com.android.launcher/com.android.launcher2.Launcher: pid=3000 uid=10032 gids={}
01-01 08:12:56.484 D/UsageStats( 1259): UsageStats: broadcasting intent
01-01 08:12:56.613 I/ActivityThread( 3000): Pub com.android.launcher2.settings: com.android.launcher2.LauncherProvider
01-01 08:12:56.862 D/dalvikvm( 3000): GC_FOR_ALLOC freed 164K, 5% free 7837K/8199K, paused 21ms
01-01 08:12:56.986 I/Process ( 1259): Sending signal. PID: 3000 SIG: 3
01-01 08:12:56.986 I/dalvikvm( 3000): threadid=3: reacting to signal 3
01-01 08:12:57.007 W/WindowManager( 1259): Rebuild removed 2 windows but added 1
01-01 08:12:57.012 W/WindowManager( 1259): This window was lost: Window{40c51350 com.android.launcher/com.android.launcher2.Launcher paused=true}
01-01 08:12:57.012 W/WindowManager( 1259): mSession=Session{40bee818 uid 10032} mClient=android.os.BinderProxy#40bbecd8
01-01 08:12:57.012 W/WindowManager( 1259): mAttrs=WM.LayoutParams{(0,0)(fillxfill) sim=#20 ty=1 fl=#1810100 pfl=0x8 fmt=-2 wanim=0x1030292}
01-01 08:12:57.012 W/WindowManager( 1259): Requested w=1920 h=1080 mLayoutSeq=148
01-01 08:12:57.012 W/WindowManager( 1259): mBaseLayer=21000 mSubLayer=0 mAnimLayer=21000+0=21000 mLastLayer=21000
01-01 08:12:57.012 W/WindowManager( 1259): mSurface=Surface(name=com.android.launcher/com.android.launcher2.Launcher, identity=34)
01-01 08:12:57.012 W/WindowManager( 1259): Surface: shown=false layer=21000 alpha=1.0 rect=(0.0,0.0) 1920.0 x 1080.0
01-01 08:12:57.012 W/WindowManager( 1259): mToken=AppWindowToken{40cb7750 token=Token{40b37598 ActivityRecord{40b9c4c0 com.android.launcher/com.android.launcher2.Launcher}}}
01-01 08:12:57.012 W/WindowManager( 1259): mRootToken=AppWindowToken{40cb7750 token=Token{40b37598 ActivityRecord{40b9c4c0 com.android.launcher/com.android.launcher2.Launcher}}}
01-01 08:12:57.012 W/WindowManager( 1259): mAppToken=AppWindowToken{40cb7750 token=Token{40b37598 ActivityRecord{40b9c4c0 com.android.launcher/com.android.launcher2.Launcher}}}
01-01 08:12:57.012 W/WindowManager( 1259): mViewVisibility=0x0 mLastHidden=true mHaveFrame=true mObscured=false
01-01 08:12:57.012 W/WindowManager( 1259): mSeq=0 mSystemUiVisibility=0x0
01-01 08:12:57.012 W/WindowManager( 1259): mGivenContentInsets=[0,0][0,0] mGivenVisibleInsets=[0,0][0,0]
01-01 08:12:57.012 W/WindowManager( 1259): mConfiguration={1.0 0mcc0mnc zh_CN layoutdir=0 sw720dp w1280dp h720dp xlrg long land -touch -keyb/v/h dpad/v s.4}
01-01 08:12:57.012 W/WindowManager( 1259): mShownFrame=[0.0,0.0][1920.0,1080.0]
01-01 08:12:57.012 W/WindowManager( 1259): mFrame=[0,0][1920,1080] last=[0,0][1920,1080]
01-01 08:12:57.012 W/WindowManager( 1259): mContainingFrame=[0,0][1920,1080] mParentFrame=[0,0][1920,1080] mDisplayFrame=[0,0][1920,1080]
01-01 08:12:57.012 W/WindowManager( 1259): mContentFrame=[0,0][1920,1080] mVisibleFrame=[0,0][1920,1080]
01-01 08:12:57.012 W/WindowManager( 1259): mContentInsets=[0,0][0,0] last=[0,0][0,0] mVisibleInsets=[0,0][0,0] last=[0,0][0,0]
01-01 08:12:57.012 W/WindowManager( 1259): mDrawPending=false mCommitDrawPending=false mReadyToShow=false mHasDrawn=true
01-01 08:12:57.012 W/WindowManager( 1259): mWallpaperX=0.5 mWallpaperY=0.5
01-01 08:12:57.012 W/WindowManager( 1259): mWallpaperXStep=0.25 mWallpaperYStep=1.0
01-01 08:12:57.012 W/WindowManager( 1259): Current app token list:
01-01 08:12:57.012 V/WindowManager( 1259): #0: Token{40ba4ee8 ActivityRecord{40bb8cd8 com.android.launcher/com.android.launcher2.Launcher}}
01-01 08:12:57.012 W/WindowManager( 1259): Final window list:
01-01 08:12:57.012 V/WindowManager( 1259): #1: Window{40b78338 InputMethod paused=false}
01-01 08:12:57.012 V/WindowManager( 1259): #0: Window{40c6f7b8 Starting com.android.launcher paused=false}
01-01 08:12:57.035 I/WindowManager( 1259): WIN DEATH: Window{40c51350 com.android.launcher/com.android.launcher2.Launcher paused=true}
01-01 08:12:57.039 I/dalvikvm( 3000): Wrote stack traces to '/data/anr/traces.txt'
01-01 08:12:57.051 D/dalvikvm( 3000): GC_CONCURRENT freed 264K, 6% free 8034K/8519K, paused 5ms+1ms
01-01 08:12:57.251 D/dalvikvm( 3000): GC_FOR_ALLOC freed 168K, 5% free 8217K/8583K, paused 14ms
01-01 08:12:57.263 I/dalvikvm-heap( 3000): Grow heap (frag case) to 10.641MB for 2560016-byte allocation
01-01 08:12:57.278 D/dalvikvm( 3000): GC_CONCURRENT freed 13K, 4% free 10704K/11143K, paused 2ms+1ms
01-01 08:12:57.358 D/dalvikvm( 3000): GC_FOR_ALLOC freed 0K, 4% free 10704K/11143K, paused 10ms
01-01 08:12:57.370 D/KeyLayoutMap( 1259): mapKey: scanCode=106 ~ Result keyCode=22, flags=0x00000002.
01-01 08:12:57.370 D/InputReader( 1259): receive key event: device=6 type=0x0001 scancode=106(0x006a) keycode=22(0x0016) value=0x00000001 flags=0x00000002
01-01 08:12:57.370 I/WindowManager( 1259): Handle special keys: 22
01-01 08:12:57.372 I/dalvikvm-heap( 3000): Grow heap (frag case) to 12.001MB for 1440016-byte allocation
01-01 08:12:57.394 D/dalvikvm( 3000): GC_CONCURRENT freed 0K, 4% free 12110K/12551K, paused 1ms+2ms
01-01 08:12:57.453 D/Launcher( 3000): #### onCreate setBackgroundColor
01-01 08:12:57.454 D/Launcher( 3000): sleep~main10
I add the attributes to the main activity in Launcher manifest
android:clearTaskOnLaunch="true"
android:stateNotNeeded="true"
The two attributes are in the original Launcher in Android which can solve this issue
But why it works is still unknown.
private void sendSMS(String phoneNumber, String message) {
PendingIntent pi = PendingIntent.getActivity(this, 0,
new Intent(this, Msgactivity.class), 0);
SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage(phoneNumber, null,message, pi, null);
}
In the above code while executing sms.sendTextMessage(phoneNumber, null,message, pi, null); statement my application shows "application example has stopped unexpectedly" message.
I added user permission to manifest file
What might the cause for the message?
LogCat output is--
09-05 15:39:11.758: DEBUG/AndroidRuntime(403): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
09-05 15:39:11.758: DEBUG/AndroidRuntime(403): CheckJNI is ON
09-05 15:39:12.648: DEBUG/AndroidRuntime(403): Calling main entry com.android.commands.pm.Pm
09-05 15:39:12.678: DEBUG/AndroidRuntime(403): Shutting down VM
09-05 15:39:12.698: DEBUG/dalvikvm(403): GC_CONCURRENT freed 101K, 71% free 297K/1024K, external 0K/0K, paused 1ms+1ms
09-05 15:39:12.708: DEBUG/dalvikvm(403): Debugger has detached; object registry had 1 entries
09-05 15:39:12.739: INFO/AndroidRuntime(403): NOTE: attach of thread 'Binder Thread #3' failed
09-05 15:39:13.328: DEBUG/AndroidRuntime(413): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
09-05 15:39:13.328: DEBUG/AndroidRuntime(413): CheckJNI is ON
09-05 15:39:14.188: DEBUG/AndroidRuntime(413): Calling main entry com.android.commands.am.Am
09-05 15:39:14.228: INFO/ActivityManager(70): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=task.list/.DolistActivity } from pid 413
09-05 15:39:14.308: DEBUG/AndroidRuntime(413): Shutting down VM
09-05 15:39:14.318: DEBUG/dalvikvm(413): GC_CONCURRENT freed 102K, 69% free 319K/1024K, external 0K/0K, paused 1ms+1ms
09-05 15:39:14.328: DEBUG/dalvikvm(413): Debugger has detached; object registry had 1 entries
09-05 15:39:14.428: INFO/AndroidRuntime(413): NOTE: attach of thread 'Binder Thread #3' failed
09-05 15:39:15.138: INFO/ActivityManager(70): Displayed task.list/.DolistActivity: +877ms
09-05 15:39:20.599: DEBUG/dalvikvm(138): GC_EXPLICIT freed 57K, 49% free 3059K/5959K, external 1625K/2102K, paused 68ms
09-05 15:39:21.879: INFO/ActivityManager(70): Starting: Intent { cmp=task.list/.Msgactivity } from pid 374
09-05 15:39:22.349: INFO/ActivityManager(70): Displayed task.list/.Msgactivity: +457ms
09-05 15:39:27.319: WARN/KeyCharacterMap(120): No keyboard for id 0
09-05 15:39:27.319: WARN/KeyCharacterMap(120): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
09-05 15:39:31.968: DEBUG/AndroidRuntime(374): Shutting down VM
09-05 15:39:31.968: WARN/dalvikvm(374): threadid=1: thread exiting with uncaught exception (group=0x40015560)
09-05 15:39:31.988: ERROR/AndroidRuntime(374): FATAL EXCEPTION: main
09-05 15:39:31.988: ERROR/AndroidRuntime(374): java.lang.IllegalArgumentException: Invalid destinationAddress
09-05 15:39:31.988: ERROR/AndroidRuntime(374): at android.telephony.SmsManager.sendTextMessage(SmsManager.java:77)
09-05 15:39:31.988: ERROR/AndroidRuntime(374): at task.list.Msgactivity.sendSMS(Msgactivity.java:51)
09-05 15:39:31.988: ERROR/AndroidRuntime(374): at task.list.Msgactivity.access$0(Msgactivity.java:46)
09-05 15:39:31.988: ERROR/AndroidRuntime(374): at task.list.Msgactivity$1.onClick(Msgactivity.java:38)
09-05 15:39:31.988: ERROR/AndroidRuntime(374): at android.view.View.performClick(View.java:2485)
09-05 15:39:31.988: ERROR/AndroidRuntime(374): at android.view.View$PerformClick.run(View.java:9080)
09-05 15:39:31.988: ERROR/AndroidRuntime(374): at android.os.Handler.handleCallback(Handler.java:587)
09-05 15:39:31.988: ERROR/AndroidRuntime(374): at android.os.Handler.dispatchMessage(Handler.java:92)
09-05 15:39:31.988: ERROR/AndroidRuntime(374): at android.os.Looper.loop(Looper.java:123)
09-05 15:39:31.988: ERROR/AndroidRuntime(374): at android.app.ActivityThread.main(ActivityThread.java:3683)
09-05 15:39:31.988: ERROR/AndroidRuntime(374): at java.lang.reflect.Method.invokeNative(Native Method)
09-05 15:39:31.988: ERROR/AndroidRuntime(374): at java.lang.reflect.Method.invoke(Method.java:507)
09-05 15:39:31.988: ERROR/AndroidRuntime(374): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
09-05 15:39:31.988: ERROR/AndroidRuntime(374): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
09-05 15:39:31.988: ERROR/AndroidRuntime(374): at dalvik.system.NativeStart.main(Native Method)
09-05 15:39:31.998: WARN/ActivityManager(70): Force finishing activity task.list/.Msgactivity
09-05 15:39:32.528: WARN/ActivityManager(70): Activity pause timeout for HistoryRecord{406a9190 task.list/.Msgactivity}
09-05 15:39:32.698: INFO/dalvikvm(70): Jit: resizing JitTable from 1024 to 2048
09-05 15:39:34.609: INFO/Process(374): Sending signal. PID: 374 SIG: 9
09-05 15:39:34.629: INFO/ActivityManager(70): Process task.list (pid 374) has died.
09-05 15:39:34.649: ERROR/InputDispatcher(70): channel '406de700 task.list/task.list.DolistActivity (server)' ~ Consumer closed input channel or an error
occurred. events=0x8
09-05 15:39:34.649: ERROR/InputDispatcher(70): channel '406de700 task.list/task.list.DolistActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
09-05 15:39:34.678: INFO/WindowManager(70): WIN DEATH: Window{406de700 task.list/task.list.DolistActivity paused=false}
09-05 15:39:34.729: INFO/WindowManager(70): WIN DEATH: Window{40713818 task.list/task.list.Msgactivity paused=false}
09-05 15:39:34.799: ERROR/InputDispatcher(70): Received spurious receive callback for unknown input channel. fd=162, events=0x8
09-05 15:39:35.089: WARN/InputManagerService(70): Got RemoteException sending setActive(false) notification to pid 374 uid 10043
Thanks in advance
09-05 15:39:31.988: ERROR/AndroidRuntime(374): FATAL EXCEPTION: main
09-05 15:39:31.988: ERROR/AndroidRuntime(374):
java.lang.IllegalArgumentException: Invalid destinationAddress
That's the reason. "Invalid destinationAddress"