Drop event when select OK to restart Launcher when ANR occurs - android

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.

Related

MonkeyRunner causing Android Settings to Crash

I've been trying to turn on an Accessibility Service using Android's. I run an emulator using Android Studio (Nexus S API 19, armabi-v7). I'm able to open the accessibility settings when the emulator is running. (By clicking on the circled submenu)
Setting Screen with Accessibility Sub-Menu highlighted
Yet when I run try to attach monkeyrunner by opening an interactive monkeyrunner terminal and running:
>> from android.com.monkeyrunner import MonkeyRunner, MonkeyDevice
>> d = MonkeyRunner.waitForConnection()
I'm unable to get navigate to the accessibility settings screen and get the error message
Result of selecting accessibility sub-menu from settings when MonkeyDevice is attached
as soon as I detach the monkeyDevice, I'm able to get to the accessibility settings screen again. Any idea what could cause it?
snippet from the logs when there's an error:
##Logs from Failure ## I/ActivityManager( 357): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.settings/.Settings} from pid 519 ... I/ActivityManager( 357): START u0 {act=android.intent.action.MAIN cmp=com.android.settings/.SubSettings (has extras)} from pid 751
...
D/SubSettings( 751): Launching fragment com.android.settings.accessibility.AccessibilitySettings ... E/AndroidRuntime( 751): FATAL EXCEPTION: main
E/AndroidRuntime( 751): Process: com.android.settings, PID: 751
E/AndroidRuntime( 751): java.lang.RuntimeException: Unable to resume activity {com.android.settings/com.android.settings.SubSettings}: java.lang.NullPointerException
E/AndroidRuntime( 751): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2774)
E/AndroidRuntime( 751): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2803)
E/AndroidRuntime( 751): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2238)
E/AndroidRuntime( 751): at android.app.ActivityThread.access$800(ActivityThread.java:135)
E/AndroidRuntime( 751): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
E/AndroidRuntime( 751): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 751): at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime( 751): at android.app.ActivityThread.main(ActivityThread.java:5001)
E/AndroidRuntime( 751): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 751): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 751): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
E/AndroidRuntime( 751): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
E/AndroidRuntime( 751): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 751): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 751): at com.android.settings.accessibility.AccessibilitySettings.loadInstalledServices(AccessibilitySettings.java:641)
E/AndroidRuntime( 751): at com.android.settings.accessibility.AccessibilitySettings.onResume(AccessibilitySettings.java:214)
E/AndroidRuntime( 751): at android.app.Fragment.performResume(Fragment.java:1743)
E/AndroidRuntime( 751): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:924)
E/AndroidRuntime( 751): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1062)
E/AndroidRuntime( 751): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1044)
E/AndroidRuntime( 751): at android.app.FragmentManagerImpl.dispatchResume(FragmentManager.java:1863)
E/AndroidRuntime( 751): at android.app.Activity.performResume(Activity.java:5320)
E/AndroidRuntime( 751): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2764)
E/AndroidRuntime( 751): ... 12 more
W/ActivityManager( 357): Force finishing activity com.android.settings/.SubSettings
W/ActivityManager( 357): Force finishing activity com.android.settings/.Settings ... W/ActivityManager( 357): Activity pause timeout for ActivityRecord{b3ea9e08 u0 com.android.settings/.SubSettings t2 f}
There seems to be a NullPointer exception, but I don't know what could cause that
##Log Snippet Without Failure I/ActivityManager( 357): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.settings/.Settings} from pid 519
I/ActivityManager( 357): Start proc com.android.settings for activity com.android.settings/.Settings: pid=1095 uid=1000 gids={41000, 1028, 1015, 3002, 3001, 3003}
D/dalvikvm( 59): GC_EXPLICIT freed 40K, 5% free 2777K/2900K, paused 15ms+3ms, total 96ms
D/dalvikvm( 59): GC_EXPLICIT freed <1K, 5% free 2777K/2900K, paused 3ms+14ms, total 67ms
D/dalvikvm( 59): GC_EXPLICIT freed <1K, 5% free 2777K/2900K, paused 7ms+14ms, total 76ms
D/dalvikvm( 1095): GC_FOR_ALLOC freed 118K, 7% free 2987K/3188K, paused 35ms, total 37ms
I/dalvikvm-heap( 1095): Grow heap (frag case) to 3.602MB for 635812-byte allocation
D/dalvikvm( 1095): GC_FOR_ALLOC freed 3K, 6% free 3605K/3812K, paused 44ms, total 44ms
D/dalvikvm( 1095): GC_CONCURRENT freed <1K, 6% free 3605K/3812K, paused 4ms+2ms, total 53ms
E/BluetoothAdapter( 1095): Bluetooth binder is null
D/dalvikvm( 1095): GC_CONCURRENT freed 209K, 8% free 3793K/4088K, paused 2ms+16ms, total 65ms
D/ ( 1095): HostConnection::get() New Host Connection established 0xb82ef4c0, tid 1095
W/EGL_emulation( 1095): eglSurfaceAttrib not implemented
D/OpenGLRenderer( 1095): Enabling debug mode 0
I/ActivityManager( 357): Displayed com.android.settings/.Settings:
+2s599ms
D/dalvikvm( 1095): GC_CONCURRENT freed 124K, 5% free 4057K/4268K, paused 15ms+5ms, total 101ms
I/ActivityManager( 357): START u0 {act=android.intent.action.MAIN cmp=com.android.settings/.SubSettings (has extras)} from pid 1095
D/SubSettings( 1095): Launching fragment com.android.settings.accessibility.AccessibilitySettings
W/EGL_emulation( 1095): eglSurfaceAttrib not implemented
D/dalvikvm( 1095): GC_CONCURRENT freed 223K, 7% free 4267K/4576K, paused 20ms+65ms, total 345ms
I/Choreographer( 1095): Skipped 120 frames! The application may be doing too much work on its main thread.
I/ActivityManager( 357): Displayed com.android.settings/.SubSettings:
+3s235ms

ADB shell am start force close error

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

How to connect the Bluetooth device in Android

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.

can not load native library

I am developing a epub reader application, when I am loading it it shows a error that the reader cannot load native library, below I am attaching the log cat of the file.
11-05 15:41:01.980: I/Process(445): Sending signal. PID: 445 SIG: 9
11-05 15:41:02.090: I/ActivityManager(70): Process org.geometerplus.zlibrary.ui.android (pid 445) has died.
11-05 15:41:02.115: E/InputDispatcher(70): channel '406f9968 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader (server)' ~ Consumer closed input channel or an error occurred. events=0x8
11-05 15:41:02.115: E/InputDispatcher(70): channel '406f9968 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader (server)' ~ Channel is unrecoverably broken and will be disposed!
11-05 15:41:02.175: I/WindowManager(70): WIN DEATH: Window{406f9968 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader paused=true}
11-05 15:41:02.235: I/WindowManager(70): WIN DEATH: Window{406ffa08 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader paused=true}
11-05 15:41:02.425: I/WindowManager(70): WIN DEATH: Window{40705430 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader paused=true}
11-05 15:41:02.565: E/InputDispatcher(70): Received spurious receive callback for unknown input channel. fd=181, events=0x8
11-05 15:41:02.565: E/InputDispatcher(70): Received spurious receive callback for unknown input channel. fd=185, events=0x8
11-05 15:41:02.785: I/ActivityManager(70): Start proc org.geometerplus.zlibrary.ui.android:crash for activity org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.crash.MissingNativeLibraryActivity: pid=468 uid=10044 gids={3003, 1015}
11-05 15:41:06.005: I/ActivityManager(70): Displayed org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.crash.MissingNativeLibraryActivity: +3s304ms (total +18s82ms)
11-05 15:41:13.185: D/dalvikvm(328): GC_EXPLICIT freed 321K, 54% free 2540K/5511K, external 1625K/2137K, paused 107ms
11-05 15:41:15.705: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 15:41:21.855: D/dalvikvm(285): GC_EXPLICIT freed 9K, 55% free 2595K/5767K, external 1625K/2137K, paused 74ms
11-05 15:45:38.435: I/ActivityManager(70): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader } from pid 145
11-05 15:45:38.855: I/ActivityManager(70): Start proc org.geometerplus.zlibrary.ui.android for activity org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader: pid=477 uid=10044 gids={3003, 1015}
11-05 15:45:44.916: D/dalvikvm(70): GREF has increased to 401
11-05 15:45:45.376: D/dalvikvm(477): GC_EXPLICIT freed 435K, 51% free 3062K/6151K, external 1625K/2137K, paused 117ms
11-05 15:45:45.555: D/dalvikvm(477): GC_EXPLICIT freed 5K, 51% free 3057K/6151K, external 1625K/2137K, paused 109ms
11-05 15:45:45.685: D/dalvikvm(477): GC_EXPLICIT freed 13K, 51% free 3048K/6151K, external 1625K/2137K, paused 83ms
11-05 15:45:45.836: D/dalvikvm(477): GC_EXTERNAL_ALLOC freed 1K, 51% free 3057K/6151K, external 1625K/2137K, paused 114ms
11-05 15:45:46.345: I/ActivityManager(70): Displayed org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader: +7s531ms
11-05 15:45:48.975: W/dalvikvm(477): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lorg/geometerplus/fbreader/formats/PluginCollection;
11-05 15:45:48.985: W/dalvikvm(477): threadid=9: thread exiting with uncaught exception (group=0x40015560)
11-05 15:45:49.046: W/System.err(477): java.lang.ExceptionInInitializerError
11-05 15:45:49.067: W/System.err(477): at org.geometerplus.fbreader.library.Book.getPlugin(Book.java:159)
11-05 15:45:49.067: W/System.err(477): at org.geometerplus.fbreader.library.Book.<init>(Book.java:135)
11-05 15:45:49.075: W/System.err(477): at org.geometerplus.fbreader.library.Book.getByFile(Book.java:96)
11-05 15:45:49.086: W/System.err(477): at org.geometerplus.fbreader.fbreader.FBReaderApp.openBookInternal(FBReaderApp.java:233)
11-05 15:45:49.115: W/System.err(477): at org.geometerplus.fbreader.fbreader.FBReaderApp$1.run(FBReaderApp.java:157)
11-05 15:45:49.115: W/System.err(477): at org.geometerplus.android.util.UIUtil$3$1.run(UIUtil.java:120)
11-05 15:45:49.125: W/System.err(477): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load NativeFormats-v2: findLibrary returned null
11-05 15:45:49.125: W/System.err(477): at java.lang.Runtime.loadLibrary(Runtime.java:429)
11-05 15:45:49.146: W/System.err(477): at java.lang.System.loadLibrary(System.java:554)
11-05 15:45:49.146: W/System.err(477): at org.geometerplus.fbreader.formats.PluginCollection.<clinit>(PluginCollection.java:33)
11-05 15:45:49.166: W/System.err(477): ... 6 more
11-05 15:45:49.177: I/ActivityManager(70): Starting: Intent { act=android.fbreader.action.CRASH dat=ExceptionInInitializerError: cmp=org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.crash.MissingNativeLibraryActivity } from pid 477
11-05 15:45:49.325: I/Process(477): Sending signal. PID: 477 SIG: 9
11-05 15:45:49.578: I/ActivityManager(70): Process org.geometerplus.zlibrary.ui.android (pid 477) has died.
11-05 15:45:49.586: E/InputDispatcher(70): channel '407cc278 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader (server)' ~ Consumer closed input channel or an error occurred. events=0x8
11-05 15:45:49.586: E/InputDispatcher(70): channel '407cc278 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader (server)' ~ Channel is unrecoverably broken and will be disposed!
11-05 15:45:49.805: W/ActivityManager(70): Activity pause timeout for HistoryRecord{406e37c0 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader}
11-05 15:45:49.975: I/WindowManager(70): WIN DEATH: Window{407cc278 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader paused=true}
11-05 15:45:50.146: I/WindowManager(70): WIN DEATH: Window{407e92f0 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader paused=true}
11-05 15:45:50.265: E/InputDispatcher(70): Received spurious receive callback for unknown input channel. fd=152, events=0x8
11-05 15:45:50.746: D/dalvikvm(468): GC_EXTERNAL_ALLOC freed 312K, 50% free 2954K/5895K, external 2032K/2137K, paused 229ms
11-05 15:45:51.055: W/InputManagerService(70): Got RemoteException sending setActive(false) notification to pid 477 uid 10044
11-05 15:45:53.208: I/ActivityManager(70): Displayed org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.crash.MissingNativeLibraryActivity: +2s884ms
11-05 15:45:57.405: W/IInputConnectionWrapper(145): showStatusIcon on inactive InputConnection
11-05 15:46:05.297: D/dalvikvm(456): GC_EXPLICIT freed 76K, 52% free 2633K/5379K, external 1625K/2137K, paused 143ms
11-05 15:46:10.276: D/dalvikvm(468): GC_EXPLICIT freed 13K, 50% free 2964K/5895K, external 2379K/2971K, paused 111ms
11-05 15:46:15.775: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 15:50:04.305: I/ActivityManager(70): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader } from pid 145
11-05 15:50:04.495: I/ActivityManager(70): Start proc org.geometerplus.zlibrary.ui.android for activity org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader: pid=491 uid=10044 gids={3003, 1015}
11-05 15:50:09.456: D/dalvikvm(491): GC_EXPLICIT freed 454K, 51% free 3062K/6151K, external 1625K/2137K, paused 139ms
11-05 15:50:09.765: D/dalvikvm(491): GC_EXPLICIT freed 7K, 51% free 3057K/6151K, external 1625K/2137K, paused 148ms
11-05 15:50:09.945: D/dalvikvm(491): GC_EXPLICIT freed 1K, 51% free 3057K/6151K, external 1625K/2137K, paused 146ms
11-05 15:50:10.435: D/dalvikvm(491): GC_EXTERNAL_ALLOC freed 11K, 51% free 3057K/6151K, external 1625K/2137K, paused 424ms
11-05 15:50:11.325: I/ActivityManager(70): Displayed org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader: +6s905ms
11-05 15:50:13.985: W/dalvikvm(491): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lorg/geometerplus/fbreader/formats/PluginCollection;
11-05 15:50:13.997: W/dalvikvm(491): threadid=9: thread exiting with uncaught exception (group=0x40015560)
11-05 15:50:14.166: W/System.err(491): java.lang.ExceptionInInitializerError
11-05 15:50:14.166: W/System.err(491): at org.geometerplus.fbreader.library.Book.getPlugin(Book.java:159)
11-05 15:50:14.166: W/System.err(491): at org.geometerplus.fbreader.library.Book.<init>(Book.java:135)
11-05 15:50:14.166: W/System.err(491): at org.geometerplus.fbreader.library.Book.getByFile(Book.java:96)
11-05 15:50:14.175: W/System.err(491): at org.geometerplus.fbreader.fbreader.FBReaderApp.openBookInternal(FBReaderApp.java:233)
11-05 15:50:14.175: W/System.err(491): at org.geometerplus.fbreader.fbreader.FBReaderApp$1.run(FBReaderApp.java:157)
11-05 15:50:14.185: W/System.err(491): at org.geometerplus.android.util.UIUtil$3$1.run(UIUtil.java:120)
11-05 15:50:14.185: W/System.err(491): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load NativeFormats-v2: findLibrary returned null
11-05 15:50:14.185: W/System.err(491): at java.lang.Runtime.loadLibrary(Runtime.java:429)
11-05 15:50:14.235: W/System.err(491): at java.lang.System.loadLibrary(System.java:554)
11-05 15:50:14.235: W/System.err(491): at org.geometerplus.fbreader.formats.PluginCollection.<clinit>(PluginCollection.java:33)
11-05 15:50:14.235: W/System.err(491): ... 6 more
11-05 15:50:14.365: I/ActivityManager(70): Starting: Intent { act=android.fbreader.action.CRASH dat=ExceptionInInitializerError: cmp=org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.crash.MissingNativeLibraryActivity } from pid 491
11-05 15:50:14.456: I/Process(491): Sending signal. PID: 491 SIG: 9
11-05 15:50:14.621: I/ActivityManager(70): Process org.geometerplus.zlibrary.ui.android (pid 491) has died.
11-05 15:50:14.665: E/InputDispatcher(70): channel '4076a8e0 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader (server)' ~ Consumer closed input channel or an error occurred. events=0x8
11-05 15:50:14.665: E/InputDispatcher(70): channel '4076a8e0 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader (server)' ~ Channel is unrecoverably broken and will be disposed!
11-05 15:50:14.786: I/WindowManager(70): WIN DEATH: Window{4076a8e0 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader paused=true}
11-05 15:50:14.936: W/ActivityManager(70): Activity pause timeout for HistoryRecord{40613df0 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader}
11-05 15:50:15.376: I/WindowManager(70): WIN DEATH: Window{40611fa0 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader paused=true}
11-05 15:50:15.697: E/InputDispatcher(70): Received spurious receive callback for unknown input channel. fd=152, events=0x8
11-05 15:50:16.796: W/InputManagerService(70): Got RemoteException sending setActive(false) notification to pid 491 uid 10044
11-05 15:50:19.055: I/ActivityManager(70): Displayed org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.crash.MissingNativeLibraryActivity: +3s151ms
11-05 15:50:24.215: D/dalvikvm(145): GC_EXPLICIT freed 170K, 50% free 3020K/6023K, external 6250K/7660K, paused 141ms
11-05 15:50:29.247: D/dalvikvm(456): GC_EXPLICIT freed 3K, 52% free 2632K/5379K, external 1625K/2137K, paused 130ms
11-05 15:51:15.785: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 15:56:15.819: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 16:01:15.875: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 16:06:17.818: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 16:11:17.846: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 16:16:17.860: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 16:21:17.887: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 16:26:17.895: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 16:30:38.037: D/PerformBackupThread(70): starting agent for backup of BackupRequest{app=ApplicationInfo{405c2c30 com.android.providers.settings} full=false}
11-05 16:30:38.138: D/BackupManagerService(70): awaiting agent for ApplicationInfo{405c2c30 com.android.providers.settings}
11-05 16:30:38.145: D/BackupManagerService(70): agentConnected pkg=com.android.providers.settings agent=android.app.backup.BackupAgent$BackupServiceBinder#40701198
11-05 16:30:38.445: V/LocalTransport(70): finishBackup()
11-05 16:31:17.939: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 16:36:17.975: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 16:41:18.036: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 16:46:18.105: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 16:47:00.296: D/dalvikvm(127): GC_CONCURRENT freed 353K, 53% free 2745K/5767K, external 2179K/2672K, paused 24ms+8ms
11-05 16:51:18.136: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 16:56:18.147: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 16:56:52.975: I/dalvikvm(70): Jit: resizing JitTable from 2048 to 4096
11-05 16:58:48.395: D/dalvikvm(70): GC_CONCURRENT freed 972K, 51% free 4474K/9095K, external 3125K/3903K, paused 34ms+16ms
11-05 17:01:18.197: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol

ListView not getting displayed?

I have a activity which uses a listview element as follows
public class List1 extends Activity
{
Context context=this;
#Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.listview);
try{
//DB
final SQLiteDatabase db;
db = openOrCreateDatabase(
"Secret.db"
, SQLiteDatabase.CREATE_IF_NECESSARY
, null
);
db.setVersion(1);
db.setLocale(Locale.getDefault());
db.setLockingEnabled(true);
Cursor cur = db.query("tbl_user",null,null,null,null,null,null);
//DB Over
ListView listView = (ListView) findViewById(R.id.mylist);
listView.setTextFilterEnabled(true);
final String[] values = new String[50];
int i=0;
while(cur.moveToNext())
{
values[i]=Integer.toString(cur.getInt(0))+":"+cur.getString(1)+":"+cur.getString(2);
i++;
}
cur.close();
ArrayAdapter<String> adapter = new ArrayAdapter<String>(context,R.layout.list_item,values);
listView.setAdapter(adapter);
listView.setVisibility(0);
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View view, int position,long id)
//public void onItemClick(ListView<?> listview, View view, int position,long id)
{
try
{
Intent i=new Intent(List1.this,Form1.class);
i.putExtra("uid","85");
startActivity(i);
finish();
}
catch(Exception e)
{
String insert2="insert into login values("+"\""+e.toString()+"\""+");";
db.execSQL(insert2);
}
}
});
db.close();
//required
}
catch(Exception e)
{
Toast.makeText(getApplicationContext(), e.toString(), Toast.LENGTH_LONG).show();}
}
}
This is my listview.xml file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ListView
android:id="#+id/mylist"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
</ListView>
</RelativeLayout>
This is my list_item.xml file which has the required textview
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="#+id/tv1"
android:padding="10dp"
android:background="#drawable/textview1"
style="#style/textview_text"
android:textSize="16dp">
</TextView>
But the ListView is not working. I mean after coming to this activity the app is showing error showing "APP_NAME is stopped unexpectedly". The same code works for one or two times and then shows the above error continuously after that. May I kno why is it happening?
EDIT
This is logcat file
W/dalvikvm( 2694): threadid=3: thread exiting with uncaught exception (group=0x4
001b188)
E/AndroidRuntime( 2694): Uncaught handler: thread main exiting due to uncaught e
xception
E/AndroidRuntime( 2694): java.lang.NullPointerException
E/AndroidRuntime( 2694): at android.widget.ArrayAdapter.createViewFromRes
ource(ArrayAdapter.java:355)
E/AndroidRuntime( 2694): at android.widget.ArrayAdapter.getView(ArrayAdap
ter.java:323)
E/AndroidRuntime( 2694): at android.widget.AbsListView.obtainView(AbsList
View.java:1274)
E/AndroidRuntime( 2694): at android.widget.ListView.makeAndAddView(ListVi
ew.java:1668)
E/AndroidRuntime( 2694): at android.widget.ListView.fillDown(ListView.jav
a:637)
E/AndroidRuntime( 2694): at android.widget.ListView.fillFromTop(ListView.
java:694)
E/AndroidRuntime( 2694): at android.widget.ListView.layoutChildren(ListVi
ew.java:1521)
E/AndroidRuntime( 2694): at android.widget.AbsListView.onLayout(AbsListVi
ew.java:1113)
E/AndroidRuntime( 2694): at android.view.View.layout(View.java:6830)
E/AndroidRuntime( 2694): at android.widget.RelativeLayout.onLayout(Relati
veLayout.java:900)
E/AndroidRuntime( 2694): at android.view.View.layout(View.java:6830)
E/AndroidRuntime( 2694): at android.widget.FrameLayout.onLayout(FrameLayo
ut.java:333)
E/AndroidRuntime( 2694): at android.view.View.layout(View.java:6830)
E/AndroidRuntime( 2694): at android.widget.LinearLayout.setChildFrame(Lin
earLayout.java:1119)
E/AndroidRuntime( 2694): at android.widget.LinearLayout.layoutVertical(Li
nearLayout.java:998)
E/AndroidRuntime( 2694): at android.widget.LinearLayout.onLayout(LinearLa
yout.java:918)
E/AndroidRuntime( 2694): at android.view.View.layout(View.java:6830)
E/AndroidRuntime( 2694): at android.widget.FrameLayout.onLayout(FrameLayo
ut.java:333)
E/AndroidRuntime( 2694): at android.view.View.layout(View.java:6830)
E/AndroidRuntime( 2694): at android.view.ViewRoot.performTraversals(ViewR
oot.java:996)
E/AndroidRuntime( 2694): at android.view.ViewRoot.handleMessage(ViewRoot.
java:1633)
E/AndroidRuntime( 2694): at android.os.Handler.dispatchMessage(Handler.ja
va:99)
E/AndroidRuntime( 2694): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 2694): at android.app.ActivityThread.main(ActivityThrea
d.java:4363)
E/AndroidRuntime( 2694): at java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime( 2694): at java.lang.reflect.Method.invoke(Method.java:5
21)
E/AndroidRuntime( 2694): at com.android.internal.os.ZygoteInit$MethodAndA
rgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime( 2694): at com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:618)
E/AndroidRuntime( 2694): at dalvik.system.NativeStart.main(Native Method)
D/dalvikvm( 2694): GC freed 6621 objects / 343272 bytes in 126ms
I/dalvikvm( 2694): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 2694): Ljava/lang/IllegalStateException;: Finalizing cursor android.
database.sqlite.SQLiteCursor#44c60cd0 on login that has not been deactivated or
closed
I/dalvikvm( 2694): at android.database.sqlite.SQLiteCursor.finalize(SQLiteC
ursor.java:596)
I/dalvikvm( 2694): at dalvik.system.NativeStart.run(Native Method)
I/dalvikvm( 2694): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 2694): Ljava/lang/IllegalStateException;: Finalizing cursor android.
database.sqlite.SQLiteCursor#44c58028 on login that has not been deactivated or
closed
I/dalvikvm( 2694): at android.database.sqlite.SQLiteCursor.finalize(SQLiteC
ursor.java:596)
I/dalvikvm( 2694): at dalvik.system.NativeStart.run(Native Method)
I/dalvikvm( 2694): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 2694): Ljava/lang/IllegalStateException;: Finalizing cursor android.
database.sqlite.SQLiteCursor#44c37fa0 on login that has not been deactivated or
closed
I/dalvikvm( 2694): at android.database.sqlite.SQLiteCursor.finalize(SQLiteC
ursor.java:596)
I/dalvikvm( 2694): at dalvik.system.NativeStart.run(Native Method)
I/Process ( 52): Sending signal. PID: 2694 SIG: 3
I/dalvikvm( 2694): threadid=7: reacting to signal 3
I/dalvikvm( 2694): Wrote stack trace to '/data/anr/traces.txt'
I/Process ( 2694): Sending signal. PID: 2694 SIG: 9
I/ActivityManager( 52): Process com.notification (pid 2694) has died.
I/WindowManager( 52): WIN DEATH: Window{44d90538 com.notification/com.notifica
tion.List1 paused=false}
I/UsageStats( 52): Unexpected resume of com.android.launcher while already res
umed in com.notification
W/InputManagerService( 52): Window already focused, ignoring focus gain of: co
m.android.internal.view.IInputMethodClient$Stub$Proxy#44d933c8
I/ActivityManager( 52): Start proc com.notification for broadcast com.notifica
tion/.AlarmReceiver: pid=2706 uid=10034 gids={3003}
D/ddm-heap( 2706): Got feature list request
D/dalvikvm( 1152): GC freed 194 objects / 8728 bytes in 88ms
I/ActivityManager( 52): Starting activity: Intent { act=android.intent.action.
MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.notification/
.NotificationActivity }
I/ActivityManager( 52): Starting activity: Intent { cmp=com.notification/.Back
ground }
I/ActivityManager( 52): Displayed activity com.notification/.Background: 262 m
s (total 8081 ms)
D/dalvikvm( 234): GC freed 44 objects / 2064 bytes in 134ms
D/AndroidRuntime( 2718):
D/AndroidRuntime( 2718): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime( 2718): CheckJNI is ON
D/AndroidRuntime( 2718): --- registering native functions ---
D/ddm-heap( 2718): Got feature list request
D/PackageParser( 52): Scanning package: /data/app/vmdl67950.tmp
I/PackageManager( 52): Removing non-system package:com.notification
D/PackageManager( 52): Removing package com.notification
D/PackageManager( 52): Services: com.notification.BackService
D/PackageManager( 52): Receivers: com.notification.AlarmReceiver
D/PackageManager( 52): Activities: com.notification.NotificationActivity com
.notification.Form1 com.notification.Background com.notification.Bg com.notifica
tion.List1
W/InputManagerService( 52): Window already focused, ignoring focus gain of: co
m.android.internal.view.IInputMethodClient$Stub$Proxy#44eb1868
D/PackageManager( 52): Scanning package com.notification
I/PackageManager( 52): /data/app/vmdl67950.tmp changed; unpacking
D/installd( 32): DexInv: --- BEGIN '/data/app/vmdl67950.tmp' ---
D/dalvikvm( 2724): DexOpt: load 40ms, verify 159ms, opt 2ms
D/installd( 32): DexInv: --- END '/data/app/vmdl67950.tmp' (success) ---
D/PackageManager( 52): Services: com.notification.BackService
D/PackageManager( 52): Receivers: com.notification.AlarmReceiver
D/PackageManager( 52): Activities: com.notification.NotificationActivity com
.notification.Form1 com.notification.Background com.notification.Bg com.notifica
tion.List1
D/ActivityManager( 52): Uninstalling process com.notification
D/ActivityManager( 52): Force removing process ProcessRecord{44e9eb48 2706:com
.notification/10034} (com.notification/10034)
I/Process ( 52): Sending signal. PID: 2706 SIG: 9
D/ActivityManager( 52): Received spurious death notification for thread androi
d.os.BinderProxy#44eec8b8
I/installd( 32): move /data/dalvik-cache/data#app#vmdl67950.tmp#classes.dex ->
/data/dalvik-cache/data#app#com.notification.apk#classes.dex
D/PackageManager( 52): New package installed in /data/app/com.notification.apk
D/AndroidRuntime( 2718): Shutting down VM
D/dalvikvm( 2718): DestroyJavaVM waiting for non-daemon threads to exit
D/dalvikvm( 2718): DestroyJavaVM shutting VM down
D/dalvikvm( 2718): HeapWorker thread shutting down
D/dalvikvm( 2718): HeapWorker thread has shut down
D/jdwp ( 2718): JDWP shutting down net...
I/dalvikvm( 2718): Debugger has detached; object registry had 1 entries
D/dalvikvm( 2718): VM cleaning up
D/dalvikvm( 2718): LinearAlloc 0x0 used 623916 of 5242880 (11%)
D/ActivityManager( 52): Uninstalling process com.notification
I/dalvikvm( 2718): JNI: AttachCurrentThread (from ???.???)
E/AndroidRuntime( 2718): ERROR: thread attach failed
W/ResourceType( 52): Resources don't contain package for resource number 0x7f0
700e5
W/ResourceType( 52): Resources don't contain package for resource number 0x7f0
20031
W/ResourceType( 52): Resources don't contain package for resource number 0x7f0
20030
W/ResourceType( 52): Resources don't contain package for resource number 0x7f0
50000
W/ResourceType( 52): Resources don't contain package for resource number 0x7f0
60000
W/ResourceType( 52): Resources don't contain package for resource number 0x7f0
60001
D/dalvikvm( 1152): GC freed 139 objects / 5928 bytes in 230ms
D/dalvikvm( 52): GC freed 14606 objects / 863536 bytes in 259ms
W/ResourceType( 52): Resources don't contain package for resource number 0x7f0
700e5
W/ResourceType( 52): Resources don't contain package for resource number 0x7f0
20031
W/ResourceType( 52): Resources don't contain package for resource number 0x7f0
20030
W/ResourceType( 52): Resources don't contain package for resource number 0x7f0
50000
D/dalvikvm( 52): GC freed 425 objects / 17320 bytes in 275ms
W/ResourceType( 52): Resources don't contain package for resource number 0x7f0
60000
W/ResourceType( 52): Resources don't contain package for resource number 0x7f0
60001
D/AndroidRuntime( 2729):
D/AndroidRuntime( 2729): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime( 2729): CheckJNI is ON
D/AndroidRuntime( 2729): --- registering native functions ---
D/ddm-heap( 2729): Got feature list request
I/ActivityManager( 52): Starting activity: Intent { act=android.intent.action.
MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.notification/
.NotificationActivity }
I/ActivityManager( 52): Start proc com.notification for activity com.notificat
ion/.NotificationActivity: pid=2735 uid=10034 gids={3003}
D/AndroidRuntime( 2729): Shutting down VM
D/dalvikvm( 2729): DestroyJavaVM waiting for non-daemon threads to exit
D/dalvikvm( 2729): DestroyJavaVM shutting VM down
D/dalvikvm( 2729): HeapWorker thread shutting down
D/dalvikvm( 2729): HeapWorker thread has shut down
D/jdwp ( 2729): JDWP shutting down net...
I/dalvikvm( 2729): Debugger has detached; object registry had 1 entries
D/dalvikvm( 2729): VM cleaning up
E/AndroidRuntime( 2729): ERROR: thread attach failed
D/dalvikvm( 2729): LinearAlloc 0x0 used 639500 of 5242880 (12%)
D/dalvikvm( 30): GC freed 299 objects / 11576 bytes in 264ms
D/ddm-heap( 2735): Got feature list request
D/dalvikvm( 30): GC freed 57 objects / 2432 bytes in 160ms
D/dalvikvm( 30): GC freed 2 objects / 48 bytes in 360ms
I/ActivityManager( 52): Displayed activity com.notification/.NotificationActiv
ity: 1204 ms (total 1204 ms)
W/KeyCharacterMap( 2735): No keyboard for id 0
W/KeyCharacterMap( 2735): Using default keymap: /system/usr/keychars/qwerty.kcm.
bin
I/ActivityManager( 52): Starting activity: Intent { cmp=com.notification/.Bg (
has extras) }
I/ActivityManager( 52): Displayed activity com.notification/.Bg: 329 ms (total
329 ms)
D/dalvikvm( 1152): GC freed 2454 objects / 141000 bytes in 600ms
I/ActivityManager( 52): Starting activity: Intent { cmp=com.notification/.List
1 bnds=[0,152][480,248] }
W/ActivityManager( 52): startActivity called from non-Activity context; forcin
g Intent.FLAG_ACTIVITY_NEW_TASK for: Intent { cmp=com.notification/.List1 bnds=[
0,152][480,248] }
D/AndroidRuntime( 2735): Shutting down VM
W/dalvikvm( 2735): threadid=3: thread exiting with uncaught exception (group=0x4
001b188)
E/AndroidRuntime( 2735): Uncaught handler: thread main exiting due to uncaught e
xception
E/AndroidRuntime( 2735): java.lang.NullPointerException
E/AndroidRuntime( 2735): at android.widget.ArrayAdapter.createViewFromRes
ource(ArrayAdapter.java:355)
E/AndroidRuntime( 2735): at android.widget.ArrayAdapter.getView(ArrayAdap
ter.java:323)
E/AndroidRuntime( 2735): at android.widget.AbsListView.obtainView(AbsList
View.java:1256)
E/AndroidRuntime( 2735): at android.widget.ListView.measureHeightOfChildr
en(ListView.java:1147)
E/AndroidRuntime( 2735): at android.widget.ListView.onMeasure(ListView.ja
va:1060)
E/AndroidRuntime( 2735): at android.view.View.measure(View.java:7964)
E/AndroidRuntime( 2735): at android.widget.RelativeLayout.measureChild(Re
lativeLayout.java:554)
E/AndroidRuntime( 2735): at android.widget.RelativeLayout.onMeasure(Relat
iveLayout.java:377)
E/AndroidRuntime( 2735): at android.view.View.measure(View.java:7964)
E/AndroidRuntime( 2735): at android.view.ViewGroup.measureChildWithMargin
s(ViewGroup.java:3023)
E/AndroidRuntime( 2735): at android.widget.FrameLayout.onMeasure(FrameLay
out.java:245)
E/AndroidRuntime( 2735): at android.view.View.measure(View.java:7964)
E/AndroidRuntime( 2735): at android.widget.LinearLayout.measureVertical(L
inearLayout.java:464)
E/AndroidRuntime( 2735): at android.widget.LinearLayout.onMeasure(LinearL
ayout.java:278)
E/AndroidRuntime( 2735): at android.view.View.measure(View.java:7964)
E/AndroidRuntime( 2735): at android.view.ViewGroup.measureChildWithMargin
s(ViewGroup.java:3023)
E/AndroidRuntime( 2735): at android.widget.FrameLayout.onMeasure(FrameLay
out.java:245)
E/AndroidRuntime( 2735): at android.view.View.measure(View.java:7964)
E/AndroidRuntime( 2735): at android.view.ViewRoot.performTraversals(ViewR
oot.java:763)
E/AndroidRuntime( 2735): at android.view.ViewRoot.handleMessage(ViewRoot.
java:1633)
E/AndroidRuntime( 2735): at android.os.Handler.dispatchMessage(Handler.ja
va:99)
E/AndroidRuntime( 2735): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 2735): at android.app.ActivityThread.main(ActivityThrea
d.java:4363)
E/AndroidRuntime( 2735): at java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime( 2735): at java.lang.reflect.Method.invoke(Method.java:5
21)
E/AndroidRuntime( 2735): at com.android.internal.os.ZygoteInit$MethodAndA
rgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime( 2735): at com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:618)
E/AndroidRuntime( 2735): at dalvik.system.NativeStart.main(Native Method)
I/Process ( 52): Sending signal. PID: 2735 SIG: 3
I/dalvikvm( 2735): threadid=7: reacting to signal 3
I/dalvikvm( 2735): Wrote stack trace to '/data/anr/traces.txt'
W/ActivityManager( 52): Launch timeout has expired, giving up wake lock!
W/ActivityManager( 52): Activity idle timeout for HistoryRecord{44dcace0 com.n
otification/.List1}
I/Process ( 2735): Sending signal. PID: 2735 SIG: 9
I/ActivityManager( 52): Process com.notification (pid 2735) has died.
I/WindowManager( 52): WIN DEATH: Window{44d8db78 com.notification/com.notifica
tion.List1 paused=false}
I/UsageStats( 52): Unexpected resume of com.android.launcher while already res
umed in com.notification
I/ActivityManager( 52): Start proc com.notification for broadcast com.notifica
tion/.AlarmReceiver: pid=2745 uid=10034 gids={3003}
W/InputManagerService( 52): Window already focused, ignoring focus gain of: co
m.android.internal.view.IInputMethodClient$Stub$Proxy#44f2e3d8
E/gralloc ( 52): [unregister] handle 0x423290 still locked (state=40000001)
D/ddm-heap( 2745): Got feature list request
D/dalvikvm( 1152): GC freed 212 objects / 9560 bytes in 82ms
I/ActivityManager( 52): Starting activity: Intent { act=android.intent.action.
MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.notification/
.NotificationActivity }
I/ActivityManager( 52): Starting activity: Intent { cmp=com.notification/.Back
ground }
I/ActivityManager( 52): Displayed activity com.notification/.Background: 240 m
s (total 16387 ms)
D/dalvikvm( 234): GC freed 43 objects / 2024 bytes in 152ms
i think your adapter should know which textViewResourceId it should use.
So try this out: ArrayAdapter<String> adapter = new ArrayAdapter<String>(context,R.layout.list_item, R.id.tv1,values);
Change this to
<ListView
android:id="#+id/mylist"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
this
<ListView
android:id="#+id/mylist"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
And why do you need listView.setVisibility(0)?
final String[] values = new String[50];
int i=0;
while(cur.moveToNext())
{
values[i]=Integer.toString(cur.getInt(0))+":"+cur.getString(1)+":"+cur.getString(2);
i++;
}
cur.close();
Starting from the this spinet of code.
When the db.query returns you should rewind the cursor before starting to use it in the while loop. What if the query returns more the 50 results? Your app will crash with ArrayOutBoundException

Categories

Resources