Android App Force Closes When Opened from the Store - android

I have an Android app created using Titanium's 1.8.2 SDK. I recently got it into the market (or Google Play store or whatever the kids are calling it these days) and was getting some complaints about the app force closing when first launched.
After hours of not seeing it, I finally figured out that every time I open the installed app from within Google Play...it crashes and the reopens itself just fine. If I open from the apps list or from a home screen it skips the whole crashing drama and just opens right up.
Any idea what might be going on that makes the context of opening so important to whether the app opens? This issue has been lingering for a couple of days now and I can't seem to get a handle on it.
Any insight would be much appreciated.
Thanks.
UPDATE
Just for the sake of adding new info, here are the errors generated by my app when opening from the market:
06-21 12:04:19.619 I/ActivityManager( 129): Starting activity: Intent { act=android.intent.action.MAIN flg=0x10000000 cmp=org.inova.mobile/.VisitInovaActivity } from pid 540
06-21 12:04:19.649 D/Volley ( 540): [13] DiskBasedCache.put: Could not clean up file /data/data/com.android.vending/cache/main/1576876231-2119069592
06-21 12:04:19.779 I/ActivityManager( 129): Start proc org.inova.mobile for activity org.inova.mobile/.VisitInovaActivity: pid=7860 uid=10131 gids={1015, 3003}
06-21 12:04:19.889 D/StatusBarPolicy( 196): onSignalStrengthsChanged
06-21 12:04:19.889 D/StatusBarPolicy( 196): iconIndex=1
06-21 12:04:19.889 V/StatusBarPolicy( 196): cdmaLevel:2;max:4
06-21 12:04:19.889 D/StatusBarPolicy( 196): iconLevel:2
06-21 12:04:19.889 D/StatusBarService( 196): updateIcon slot=phone_signal index=20 viewIndex=14 old=StatusBarIcon(pkg=com.android.systemui id=0x7f020009 level=0 visible=true num=0 ) icon=StatusBarIcon(pkg=com.android.systemui id=0x7f020009 level=0 visible=true num=0 )
06-21 12:04:19.909 I/TiApplication( 7860): (main) [0,0] checkpoint, app created.
06-21 12:04:19.969 I/TiApplication( 7860): (main) [68,68] Titanium 1.8.2 (2012/02/23 17:46 59b3a90)
06-21 12:04:20.069 D/dalvikvm( 7860): GC_CONCURRENT freed 300K, 47% free 3033K/5639K, external 0K/0K, paused 2ms+3ms
06-21 12:04:20.129 D/Volley ( 540): [14] DiskBasedCache.put: Could not clean up file /data/data/com.android.vending/cache/main/-743566663-837635707
06-21 12:04:20.129 D/Volley ( 540): [13] DiskBasedCache.put: Could not clean up file /data/data/com.android.vending/cache/main/-743566663-826319580
06-21 12:04:20.160 D/Database( 7860): dbopen(): path = /data/data/org.inova.mobile/databases/Titanium, flag = 6, file size = 4096
06-21 12:04:20.160 D/MediaPlayer( 540): reset() in
06-21 12:04:20.160 V/MediaPlayer( 540): reset
06-21 12:04:20.160 D/MediaPlayer( 540): reset() out
06-21 12:04:20.200 D/Database( 7860): dbopen(): path = /data/data/org.inova.mobile/databases/Titanium, mode: wal, disk free size: 16 M, handle: 0x341758
06-21 12:04:20.250 D/Database( 7860): dbopen(): path = /data/data/org.inova.mobile/databases/Titanium, flag = 6, file size = 4096
06-21 12:04:20.330 D/Database( 7860): dbopen(): path = /data/data/org.inova.mobile/databases/Titanium, mode: wal, disk free size: 16 M, handle: 0x345838
06-21 12:04:20.380 I/TiApplication( 7860): (main) [406,474] Titanium Javascript runtime: v8
06-21 12:04:20.380 D/dalvikvm( 7860): Trying to load lib /data/data/org.inova.mobile/lib/libstlport_shared.so 0x4051bc80
06-21 12:04:20.390 D/dalvikvm( 7860): Added shared lib /data/data/org.inova.mobile/lib/libstlport_shared.so 0x4051bc80
06-21 12:04:20.390 D/dalvikvm( 7860): No JNI_OnLoad found in /data/data/org.inova.mobile/lib/libstlport_shared.so 0x4051bc80, skipping init
06-21 12:04:20.390 D/dalvikvm( 7860): Trying to load lib /data/data/org.inova.mobile/lib/libkroll-v8.so 0x4051bc80
06-21 12:04:20.420 D/dalvikvm( 7860): Added shared lib /data/data/org.inova.mobile/lib/libkroll-v8.so 0x4051bc80
06-21 12:04:20.910 E/TiLaunchActivity( 7860): (main) [535,1009] Android issue 2373 detected (missing intent CATEGORY_LAUNCHER), restarting app. org.inova.mobile.VisitInovaActivity#4052faa0
06-21 12:04:20.910 E/TiApplication( 7860): (KrollRuntimeThread) [0,1009] APP PROXY: ti.modules.titanium.app.AppModule#40530ac0
06-21 12:04:21.020 D/ATRecorder( 7860): com.htc.autotest.dlib.RecordEngine in loader dalvik.system.DexClassLoader#4058a280
06-21 12:04:21.020 I/TiRootActivity( 7860): (main) [0,0] checkpoint, on root activity resume. activity = org.inova.mobile.VisitInovaActivity#4052faa0
06-21 12:04:21.020 D/AndroidRuntime( 7860): Shutting down VM
06-21 12:04:21.020 W/dalvikvm( 7860): threadid=1: thread exiting with uncaught exception (group=0x4001d5a0)
06-21 12:04:21.030 E/TiApplication( 7860): (main) [3,3] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to resume activity {org.inova.mobile/org.inova.mobile.VisitInovaActivity}: java.lang.ClassCastException: java.lang.String; Titanium 1.8.2,2012/02/23 17:46,59b3a90
06-21 12:04:21.030 E/TiApplication( 7860): java.lang.RuntimeException: Unable to resume activity {org.inova.mobile/org.inova.mobile.VisitInovaActivity}: java.lang.ClassCastException: java.lang.String
06-21 12:04:21.030 E/TiApplication( 7860): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2460)
06-21 12:04:21.030 E/TiApplication( 7860): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2481)
06-21 12:04:21.030 E/TiApplication( 7860): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1847)
06-21 12:04:21.030 E/TiApplication( 7860): at android.app.ActivityThread.access$1500(ActivityThread.java:132)
06-21 12:04:21.030 E/TiApplication( 7860): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1038)
06-21 12:04:21.030 E/TiApplication( 7860): at android.os.Handler.dispatchMessage(Handler.java:99)
06-21 12:04:21.030 E/TiApplication( 7860): at android.os.Looper.loop(Looper.java:150)
06-21 12:04:21.030 E/TiApplication( 7860): at android.app.ActivityThread.main(ActivityThread.java:4263)
06-21 12:04:21.030 E/TiApplication( 7860): at java.lang.reflect.Method.invokeNative(Native Method)
06-21 12:04:21.030 E/TiApplication( 7860): at java.lang.reflect.Method.invoke(Method.java:507)
06-21 12:04:21.030 E/TiApplication( 7860): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
06-21 12:04:21.030 E/TiApplication( 7860): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
06-21 12:04:21.030 E/TiApplication( 7860): at dalvik.system.NativeStart.main(Native Method)
06-21 12:04:21.030 E/TiApplication( 7860): Caused by: java.lang.ClassCastException: java.lang.String
06-21 12:04:21.030 E/TiApplication( 7860): at android.app.ContextImpl$SharedPreferencesImpl.getBoolean(ContextImpl.java:3034)
06-21 12:04:21.030 E/TiApplication( 7860): at org.appcelerator.titanium.TiProperties.getBool(TiProperties.java:108)
06-21 12:04:21.030 E/TiApplication( 7860): at org.appcelerator.titanium.TiLaunchActivity.alertMissingLauncher(TiLaunchActivity.java:195)
06-21 12:04:21.030 E/TiApplication( 7860): at org.appcelerator.titanium.TiLaunchActivity.onResume(TiLaunchActivity.java:345)
06-21 12:04:21.030 E/TiApplication( 7860): at org.appcelerator.titanium.TiRootActivity.onResume(TiRootActivity.java:73)
06-21 12:04:21.030 E/TiApplication( 7860): at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1242)
06-21 12:04:21.030 E/TiApplication( 7860): at android.app.Activity.performResume(Activity.java:3957)
06-21 12:04:21.030 E/TiApplication( 7860): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2450)
06-21 12:04:21.030 E/TiApplication( 7860): ... 12 more
06-21 12:04:21.591 D/StatusBarPolicy( 196): hasService()=true ,mDataState=2 ,mPhone.htcModemLinkOn()=false ,mDataActivity=0
06-21 12:04:21.591 D/StatusBarPolicy( 196): slotType[0]=empty
06-21 12:04:21.591 D/StatusBarService( 196): updateIcon slot=data_connection index=18 viewIndex=13 old=StatusBarIcon(pkg=com.android.systemui id=0x7f020020 level=0 visible=true num=0 ) icon=StatusBarIcon(pkg=com.android.systemui id=0x7f020015 level=0 visible=true num=0 )
06-21 12:04:22.632 D/Finsky ( 540): [1] 1.run: Referrer for org.inova.mobile cleared
06-21 12:04:26.616 D/StatusBarPolicy( 196): onSignalStrengthsChanged
06-21 12:04:26.626 D/StatusBarPolicy( 196): iconIndex=1
06-21 12:04:26.626 V/StatusBarPolicy( 196): cdmaLevel:2;max:4
06-21 12:04:26.626 D/StatusBarPolicy( 196): iconLevel:2
06-21 12:04:26.636 D/StatusBarService( 196): updateIcon slot=phone_signal index=20 viewIndex=14 old=StatusBarIcon(pkg=com.android.systemui id=0x7f020009 level=0 visible=true num=0 ) icon=StatusBarIcon(pkg=com.android.systemui id=0x7f020009 level=0 visible=true num=0 )
06-21 12:04:27.417 D/skia ( 267): purging 183K from font cache [22 entries]
06-21 12:04:27.447 D/StatusBarPolicy( 196): hasService()=true ,mDataState=2 ,mPhone.htcModemLinkOn()=false ,mDataActivity=4
06-21 12:04:27.447 D/StatusBarPolicy( 196): slotType[0]=empty
06-21 12:04:27.447 D/StatusBarService( 196): updateIcon slot=data_connection index=18 viewIndex=13 old=StatusBarIcon(pkg=com.android.systemui id=0x7f020015 level=0 visible=true num=0 ) icon=StatusBarIcon(pkg=com.android.systemui id=0x7f020015 level=0 visible=true num=0 )
06-21 12:04:27.477 D/dalvikvm( 267): GC_EXPLICIT freed 204K, 53% free 4090K/8647K, external 16896K/18944K, paused 70ms
06-21 12:04:28.468 D/PowerManagerService( 129): New lightsensor value:225, lcdValue:164
06-21 12:04:28.468 D/PowerManagerService( 129): lightSensorChangedLocked, buttonValue >= 0, mPowerState = 3
06-21 12:04:29.619 W/ActivityManager( 129): Launch timeout has expired, giving up wake lock!
06-21 12:04:29.859 W/ActivityManager( 129): Activity idle timeout for HistoryRecord{409e15c0 org.inova.mobile/.VisitInovaActivity}
06-21 12:04:34.924 D/dalvikvm( 540): GC_EXPLICIT freed 884K, 45% free 5802K/10503K, external 4915K/6227K, paused 73ms
06-21 12:04:39.919 D/dalvikvm( 267): GC_EXPLICIT freed 1K, 53% free 4089K/8647K, external 16896K/18944K, paused 54ms
06-21 12:04:44.904 D/dalvikvm( 1661): GC_EXPLICIT freed 2K, 47% free 3397K/6343K, external 0K/0K, paused 47ms
06-21 12:04:55.744 D/StatusBarPolicy( 196): onSignalStrengthsChanged
06-21 12:04:55.744 D/StatusBarPolicy( 196): iconIndex=1
06-21 12:04:55.744 V/StatusBarPolicy( 196): cdmaLevel:2;max:4
06-21 12:04:55.754 D/StatusBarPolicy( 196): iconLevel:2
06-21 12:04:55.764 D/StatusBarService( 196): updateIcon slot=phone_signal index=20 viewIndex=14 old=StatusBarIcon(pkg=com.android.systemui id=0x7f020009 level=0 visible=true num=0 ) icon=StatusBarIcon(pkg=com.android.systemui id=0x7f020009 level=0 visible=true num=0 )
06-21 12:04:59.338 I/InputDispatcher( 129): Application is not responding: AppWindowToken{40cf9910 token=HistoryRecord{409e15c0 org.inova.mobile/.VisitInovaActivity}}. 15015.5ms since event, 15015.4ms since wait started
06-21 12:04:59.338 I/WindowManager( 129): Input event dispatching timed out sending to application AppWindowToken{40cf9910 token=HistoryRecord{409e15c0 org.inova.mobile/.VisitInovaActivity}}
06-21 12:04:59.418 I/Process ( 129): Sending signal. PID: 7860 SIG: 3
06-21 12:04:59.418 I/dalvikvm( 7860): threadid=4: reacting to signal 3
06-21 12:04:59.448 I/dalvikvm( 7860): Wrote stack traces to '/data/anr/traces.txt'
06-21 12:04:59.448 I/Process ( 129): Sending signal. PID: 129 SIG: 3
06-21 12:04:59.448 I/dalvikvm( 129): threadid=4: reacting to signal 3
06-21 12:04:59.578 I/dalvikvm( 129): Wrote stack traces to '/data/anr/traces.txt'
06-21 12:04:59.578 I/Process ( 129): Sending signal. PID: 255 SIG: 3
06-21 12:04:59.578 I/dalvikvm( 255): threadid=4: reacting to signal 3
06-21 12:04:59.588 I/dalvikvm( 255): Wrote stack traces to '/data/anr/traces.txt'
06-21 12:04:59.588 I/Process ( 129): Sending signal. PID: 252 SIG: 3
06-21 12:04:59.588 I/dalvikvm( 252): threadid=4: reacting to signal 3
06-21 12:04:59.638 I/dalvikvm( 252): Wrote stack traces to '/data/anr/traces.txt'
06-21 12:04:59.638 I/Process ( 129): Sending signal. PID: 196 SIG: 3
06-21 12:04:59.638 I/dalvikvm( 196): threadid=4: reacting to signal 3
06-21 12:04:59.638 I/dalvikvm( 196): Wrote stack traces to '/data/anr/traces.txt'
06-21 12:05:00.088 D/dalvikvm( 129): GC_CONCURRENT freed 1756K, 31% free 9570K/13767K, external 5619K/7016K, paused 3ms+9ms
06-21 12:05:00.259 D/dalvikvm( 129): GC_EXPLICIT freed 123K, 31% free 9550K/13767K, external 5619K/7016K, paused 113ms
06-21 12:05:00.299 D/StatusBarPolicy( 196): onSignalStrengthsChanged
06-21 12:05:00.309 D/StatusBarPolicy( 196): iconIndex=1
06-21 12:05:00.309 V/StatusBarPolicy( 196): cdmaLevel:2;max:4
06-21 12:05:00.309 D/StatusBarPolicy( 196): iconLevel:2
06-21 12:05:00.309 D/StatusBarService( 196): updateIcon slot=phone_signal index=20 viewIndex=14 old=StatusBarIcon(pkg=com.android.systemui id=0x7f020009 level=0 visible=true num=0 ) icon=StatusBarIcon(pkg=com.android.systemui id=0x7f020009 level=0 visible=true num=0 )
06-21 12:05:00.849 E/ActivityManager( 129): ANR in org.inova.mobile (org.inova.mobile/.VisitInovaActivity), time=44542709
06-21 12:05:00.849 E/ActivityManager( 129): Reason: keyDispatchingTimedOut
06-21 12:05:00.849 E/ActivityManager( 129): Load: 1.54 / 1.66 / 1.88
06-21 12:05:00.849 E/ActivityManager( 129): CPU usage from 15071ms to 0ms ago:
06-21 12:05:00.849 E/ActivityManager( 129): 0.9% 88/akmd: 0% user + 0.9% kernel
06-21 12:05:00.849 E/ActivityManager( 129): 0.8% 129/system_server: 0.4% user + 0.3% kernel / faults: 2 minor
06-21 12:05:00.849 E/ActivityManager( 129): 0.6% 68/emmc-qd: 0% user + 0.5% kernel + 0% iowait
06-21 12:05:00.849 E/ActivityManager( 129): 0% 1661/com.htc.bgp: 0% user + 0% kernel / faults: 59 minor
06-21 12:05:00.849 E/ActivityManager( 129): 0.1% 5/events/0: 0% user + 0.1% kernel
06-21 12:05:00.849 E/ActivityManager( 129): 0.1% 15/kondemand/0: 0% user + 0.1% kernel
06-21 12:05:00.849 E/ActivityManager( 129): 0% 11/bdi-default: 0% user + 0% kernel
06-21 12:05:00.849 E/ActivityManager( 129): 0% 59/atmel_wq: 0% user + 0% kernel
06-21 12:05:00.849 E/ActivityManager( 129): 0% 267/com.htc.launcher: 0% user + 0% kernel
06-21 12:05:00.849 E/ActivityManager( 129): 0% 311/com.swype.android.inputmethod:SwypeConnect: 0% user + 0% kernel
06-21 12:05:00.849 E/ActivityManager( 129): 0% 5527/com.lookout: 0% user + 0% kernel
06-21 12:05:00.849 E/ActivityManager( 129): 0% 70/kjournald: 0% user + 0% kernel + 0% iowait
06-21 12:05:00.849 E/ActivityManager( 129): 2.7% TOTAL: 1% user + 1.6% kernel
06-21 12:05:00.849 E/ActivityManager( 129): CPU usage from 918ms to 1448ms later:
06-21 12:05:00.849 E/ActivityManager( 129): 12% 129/system_server: 1.8% user + 10% kernel / faults: 3 minor
06-21 12:05:00.849 E/ActivityManager( 129): 9% 163/InputDispatcher: 0% user + 9% kernel
06-21 12:05:00.849 E/ActivityManager( 129): 1.8% 130/HeapWorker: 1.8% user + 0% kernel
06-21 12:05:00.849 E/ActivityManager( 129): 1.8% 3847/Binder Thread #: 0% user + 1.8% kernel
06-21 12:05:00.849 E/ActivityManager( 129): 0.8% 5/events/0: 0% user + 0.8% kernel
06-21 12:05:00.849 E/ActivityManager( 129): 0.8% 15/kondemand/0: 0% user + 0.8% kernel
06-21 12:05:00.849 E/ActivityManager( 129): 0.9% 88/akmd: 0% user + 0.9% kernel
06-21 12:05:00.849 E/ActivityManager( 129): 0.9% 7858/akmd: 0% user + 0.9% kernel
06-21 12:05:00.849 E/ActivityManager( 129): 11% TOTAL: 3.8% user + 7.6% kernel
06-21 12:05:01.019 I/InputDispatcher( 129): Dropping event because the pointer is not down.
06-21 12:05:01.019 I/InputDispatcher( 129): Dropping event because the pointer is not down.
06-21 12:05:05.394 D/dalvikvm( 634): GC_EXPLICIT freed 10K, 47% free 2913K/5447K, external 0K/0K, paused 80ms
06-21 12:05:05.494 W/ActivityManager( 129): Force finishing activity org.inova.mobile/.VisitInovaActivity
06-21 12:05:05.494 I/Process ( 129): Sending signal. PID: 7860 SIG: 9
UPDATE
At the request of #pogo2065, I've attached the xmltree dump of the AndroidManifest file as extracted using the aapt tool:
N: android=http://schemas.android.com/apk/res/android
E: manifest (line=1)
A: android:versionCode(0x0101021b)=(type 0x10)0x6
A: android:versionName(0x0101021c)="1.0.6" (Raw: "1.0.6")
A: package="org.inova.mobile" (Raw: "org.inova.mobile")
E: supports-screens (line=2)
A: android:anyDensity(0x0101026c)=(type 0x12)0xffffffff
A: android:smallScreens(0x01010284)=(type 0x12)0x0
A: android:normalScreens(0x01010285)=(type 0x12)0xffffffff
A: android:largeScreens(0x01010286)=(type 0x12)0xffffffff
E: uses-sdk (line=2)
A: android:minSdkVersion(0x0101020c)=(type 0x10)0x8
E: application (line=6)
A: android:label(0x01010001)="Visit Inova" (Raw: "Visit Inova")
A: android:icon(0x01010002)=#0x7f020000
A: android:name(0x01010003)="VisitInovaApplication" (Raw: "VisitInovaApplication")
A: android:debuggable(0x0101000f)=(type 0x12)0x0
E: activity (line=10)
A: android:theme(0x01010000)=#0x7f050000
A: android:label(0x01010001)="Visit Inova" (Raw: "Visit Inova")
A: android:name(0x01010003)=".VisitInovaActivity" (Raw: ".VisitInovaActivity")
A: android:configChanges(0x0101001f)=(type 0x11)0xa0
E: intent-filter (line=11)
E: action (line=12)
A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
E: category (line=13)
A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")
E: activity (line=17)
A: android:name(0x01010003)="ti.modules.titanium.map.TiMapActivity" (Raw: "ti.modules.titanium.map.TiMapActivity")
A: android:launchMode(0x0101001d)=(type 0x10)0x2
A: android:configChanges(0x0101001f)=(type 0x11)0xa0
E: uses-library (line=18)
A: android:name(0x01010003)="com.google.android.maps" (Raw: "com.google.android.maps")
E: activity (line=20)
A: android:name(0x01010003)="org.appcelerator.titanium.TiActivity" (Raw: "org.appcelerator.titanium.TiActivity")
A: android:configChanges(0x0101001f)=(type 0x11)0xa0
E: activity (line=21)
A: android:theme(0x01010000)=#0x103000f
A: android:name(0x01010003)="org.appcelerator.titanium.TiTranslucentActivity" (Raw: "org.appcelerator.titanium.TiTranslucentActivity")
A: android:configChanges(0x0101001f)=(type 0x11)0xa0
E: activity (line=22)
A: android:theme(0x01010000)=#0x103000f
A: android:name(0x01010003)="org.appcelerator.titanium.TiModalActivity" (Raw: "org.appcelerator.titanium.TiModalActivity")
A: android:configChanges(0x0101001f)=(type 0x11)0xa0
E: activity (line=23)
A: android:name(0x01010003)="ti.modules.titanium.ui.TiTabActivity" (Raw: "ti.modules.titanium.ui.TiTabActivity")
A: android:configChanges(0x0101001f)=(type 0x11)0xa0
E: activity (line=24)
A: android:name(0x01010003)="ti.modules.titanium.ui.android.TiPreferencesActivity" (Raw: "ti.modules.titanium.ui.android.TiPreferencesActivity")
E: service (line=26)
A: android:name(0x01010003)="org.appcelerator.titanium.analytics.TiAnalyticsService" (Raw: "org.appcelerator.titanium.analytics.TiAnalyticsService")
A: android:exported(0x01010010)=(type 0x12)0x0
E: uses-permission (line=31)
A: android:name(0x01010003)="android.permission.ACCESS_NETWORK_STATE" (Raw: "android.permission.ACCESS_NETWORK_STATE")
E: uses-permission (line=32)
A: android:name(0x01010003)="android.permission.WRITE_EXTERNAL_STORAGE" (Raw: "android.permission.WRITE_EXTERNAL_STORAGE")
E: uses-permission (line=33)
A: android:name(0x01010003)="android.permission.ACCESS_WIFI_STATE" (Raw: "android.permission.ACCESS_WIFI_STATE")
E: uses-permission (line=34)
A: android:name(0x01010003)="android.permission.ACCESS_COARSE_LOCATION" (Raw: "android.permission.ACCESS_COARSE_LOCATION")
E: uses-permission (line=35)
A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")
E: uses-permission (line=36)
A: android:name(0x01010003)="android.permission.ACCESS_FINE_LOCATION" (Raw: "android.permission.ACCESS_FINE_LOCATION")

Looks like Titanium Mobile SDK 2.1.2 and 2.2.0 have fixes for this issue.
https://jira.appcelerator.org/browse/TIMOB-9285

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

Change Attached Source [duplicate]

This question already has answers here:
Source not found Android?
(5 answers)
Closed 9 years ago.
I have been debugging my android project but when i am trying to step into a braekpoint then a screen comes which says SOURCE NOT FOUND ....plz suggest a solution..i have seen previous suggestions but those didnt work....there is an option provided-- CHANGE ATTACHED SOURCE.. which source i have to provide?? i am providing the link for the video..it is ellaborated in the video..plz help...thanks in advance for ur answers
https://docs.google.com/file/d/0B_I2kWyZePW6VnhOLUxjTFhpTk0/edit?usp=sharing
this is what the log cat says:
04-15 11:15:02.380: D/AndroidRuntime(379): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
04-15 11:15:02.380: D/AndroidRuntime(379): CheckJNI is ON
04-15 11:15:02.490: D/AndroidRuntime(379): --- registering native functions ---
04-15 11:15:03.250: D/dalvikvm(284): GC_EXPLICIT freed 523 objects / 29592 bytes in 131ms
04-15 11:15:03.490: D/PackageParser(59): Scanning package: /data/app/vmdl55176.tmp
04-15 11:15:03.960: D/dalvikvm(59): GC_FOR_MALLOC freed 18707 objects / 974816 bytes in 89ms
04-15 11:15:04.030: I/PackageManager(59): Removing non-system package:com.drugindexx.demo
04-15 11:15:04.030: I/ActivityManager(59): Force stopping package com.drugindexx.demo uid=10040
04-15 11:15:04.030: I/Process(59): Sending signal. PID: 362 SIG: 9
04-15 11:15:04.050: W/InputManagerService(59): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#4507a590
04-15 11:15:04.440: D/PackageManager(59): Scanning package com.drugindexx.demo
04-15 11:15:04.440: I/PackageManager(59): Package com.drugindexx.demo codePath changed from /data/app/com.drugindexx.demo-1.apk to /data/app/com.drugindexx.demo- 2.apk; Retaining data and using new
04-15 11:15:04.450: I/PackageManager(59): /data/app/com.drugindexx.demo-2.apk changed; unpacking
04-15 11:15:04.471: D/installd(35): DexInv: --- BEGIN '/data/app/com.drugindexx.demo-2.apk' ---
04-15 11:15:04.820: D/dalvikvm(386): DexOpt: load 42ms, verify 205ms, opt 7ms
04-15 11:15:04.830: D/installd(35): DexInv: --- END '/data/app/com.drugindexx.demo-2.apk' (success) ---
04-15 11:15:04.830: W/PackageManager(59): Code path for pkg : com.drugindexx.demo changing from /data/app/com.drugindexx.demo-1.apk to /data/app/com.drugindexx.demo-2.apk
04-15 11:15:04.830: W/PackageManager(59): Resource path for pkg : com.drugindexx.demo changing from /data/app/com.drugindexx.demo-1.apk to /data/app/com.drugindexx.demo-2.apk
04-15 11:15:04.830: D/PackageManager(59): Activities: com.drugindexx.demo.jsonparsngactivity com.drugindexx.demo.LoginPage com.drugindexx.demo.Registration com.drugindexx.demo.UserDetails com.drugindexx.demo.MenuOptions com.drugindexx.demo.SarchIndx com.drugindexx.demo.jsonparsngactivity com.drugindexx.demo.Showdetails com.drugindexx.demo.SmsEx com.drugindexx.demo.Settings com.drugindexx.demo.AdvancedSearch com.drugindexx.demo.Gmap com.drugindexx.demo.MyItemizedOverlay com.drugindexx.demo.G
04-15 11:15:04.850: I/ActivityManager(59): Force stopping package com.drugindexx.demo uid=10040
04-15 11:15:04.950: I/installd(35): move /data/dalvik-cache/data#app#com.drugindexx.demo-2.apk#classes.dex -> /data/dalvik-cache/data#app#com.drugindexx.demo-2.apk#classes.dex
04-15 11:15:04.950: D/PackageManager(59): New package installed in /data/app/com.drugindexx.demo-2.apk
04-15 11:15:05.080: I/ActivityManager(59): Force stopping package com.drugindexx.demo uid=10040
04-15 11:15:05.140: D/dalvikvm(134): GC_EXPLICIT freed 69 objects / 2728 bytes in 50ms
04-15 11:15:05.390: W/RecognitionManagerService(59): no available voice recognition services found
04-15 11:15:05.490: D/dalvikvm(155): GC_EXPLICIT freed 1809 objects / 92640 bytes in 328ms
04-15 11:15:05.710: D/dalvikvm(59): GC_EXPLICIT freed 8511 objects / 535000 bytes in 199ms
04-15 11:15:05.710: I/installd(35): unlink /data/dalvik-cache/data#app#com.drugindexx.demo-1.apk#classes.dex
04-15 11:15:05.710: D/AndroidRuntime(379): Shutting down VM
04-15 11:15:05.741: D/dalvikvm(379): Debugger has detached; object registry had 1 entries
04-15 11:15:05.760: I/dalvikvm(379): JNI: AttachCurrentThread (from ???.???)
04-15 11:15:05.760: I/AndroidRuntime(379): NOTE: attach of thread 'Binder Thread #3' failed
04-15 11:15:06.220: D/AndroidRuntime(392): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
04-15 11:15:06.220: D/AndroidRuntime(392): CheckJNI is ON
04-15 11:15:06.330: D/AndroidRuntime(392): --- registering native functions ---
04-15 11:15:06.850: I/ActivityManager(59): Force stopping package com.drugindexx.demo uid=10040
04-15 11:15:06.850: I/ActivityManager(59): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.drugindexx.demo/.jsonparsngactivity }
04-15 11:15:06.960: D/AndroidRuntime(392): Shutting down VM
04-15 11:15:06.969: I/ActivityManager(59): Start proc com.drugindexx.demo for activity com.drugindexx.demo/.jsonparsngactivity: pid=398 uid=10040 gids={3003}
04-15 11:15:06.980: D/jdwp(392): Got wake-up signal, bailing out of select
04-15 11:15:06.980: D/dalvikvm(392): Debugger has detached; object registry had 1 entries
04-15 11:15:07.260: W/ActivityThread(398): Application com.drugindexx.demo is waiting for the debugger on port 8100...
04-15 11:15:07.280: I/System.out(398): Sending WAIT chunk
04-15 11:15:07.290: I/dalvikvm(398): Debugger is active
04-15 11:15:07.310: I/System.out(398): Debugger has connected
04-15 11:15:07.310: I/System.out(398): waiting for debugger to settle...
04-15 11:15:07.519: I/System.out(398): waiting for debugger to settle...
04-15 11:15:07.719: I/System.out(398): waiting for debugger to settle...
04-15 11:15:07.919: I/System.out(398): waiting for debugger to settle...
04-15 11:15:08.119: I/System.out(398): waiting for debugger to settle...
04-15 11:15:08.320: I/System.out(398): waiting for debugger to settle...
04-15 11:15:08.519: I/System.out(398): waiting for debugger to settle...
04-15 11:15:08.719: I/System.out(398): waiting for debugger to settle...
04-15 11:15:08.919: I/System.out(398): waiting for debugger to settle...
04-15 11:15:09.149: I/System.out(398): waiting for debugger to settle...
04-15 11:15:09.356: I/System.out(398): waiting for debugger to settle...
04-15 11:15:09.564: I/System.out(398): waiting for debugger to settle...
04-15 11:15:09.772: I/System.out(398): debugger has settled (1408)
04-15 11:15:13.110: W/System.err(398): java.lang.NullPointerException
04-15 11:15:13.129: W/System.err(398): at java.net.URI$Helper.parseURI(URI.java:314)
04-15 11:15:13.129: W/System.err(398): at java.net.URI$Helper.access$100(URI.java:302)
04-15 11:15:13.140: W/System.err(398): at java.net.URI.<init>(URI.java:87)
04-15 11:15:13.140: W/System.err(398): at com.drugindexx.others.JSONParser.getStringContent(JSONParser.java:37)
04-15 11:15:13.140: W/System.err(398): at com.drugindexx.demo.jsonparsngactivity$FindStoreLocators.doInBackground(jsonparsngactivity.java:237)
04-15 11:15:13.150: W/System.err(398): at com.drugindexx.demo.jsonparsngactivity$FindStoreLocators.doInBackground(jsonparsngactivity.java:1)
04-15 11:15:13.150: W/System.err(398): at android.os.AsyncTask$2.call(AsyncTask.java:185)
04-15 11:15:13.160: W/System.err(398): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
04-15 11:15:13.170: W/System.err(398): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
04-15 11:15:13.170: W/System.err(398): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
04-15 11:15:13.181: W/System.err(398): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
04-15 11:15:13.181: W/System.err(398): at java.lang.Thread.run(Thread.java:1096)
04-15 11:15:16.922: W/ActivityManager(59): Launch timeout has expired, giving up wake lock!
04-15 11:15:17.221: W/ActivityManager(59): Activity idle timeout for HistoryRecord{44eb0d10 com.drugindexx.demo/.jsonparsngactivity}
04-15 11:15:22.391: D/dalvikvm(284): GC_EXPLICIT freed 216 objects / 14432 bytes in 106ms
04-15 11:15:27.490: D/dalvikvm(295): GC_EXPLICIT freed 848 objects / 58536 bytes in 148ms
04-15 11:15:32.220: D/dalvikvm(398): threadid=7: still suspended after undo (sc=1 dc=1 s=Y)
04-15 11:15:32.500: D/SntpClient(59): request time failed: java.net.SocketException: Address family not supported by protocol
04-15 11:15:32.521: D/dalvikvm(248): GC_EXPLICIT freed 317 objects / 17472 bytes in 135ms
04-15 11:15:37.489: D/dalvikvm(134): GC_EXPLICIT freed 784 objects / 44784 bytes in 48ms
04-15 11:17:27.744: D/dalvikvm(398): threadid=7: still suspended after undo (sc=1 dc=1 s=Y)
I think what you are trying to do is to debug android sources.
And if you want to do that you need to attach the sources check out :
http://code.google.com/p/adt-addons/
But be aware: It's very unlikely that you are really needed to debug the sources, because more likely you did something wrong (Exception) BEFORE the "class not found..." Window pops up.

Activity is not responding

my application was working fine
suddenly its stopped working and whenever i am trying to run it it says this in the error log , kindly fill in your experience
i am using http post client to get response from a web service , which till now was working fine , it has some sudden effect , initially i thought my bad internet connction is affecting but it seems to linger in the good net connection also
10-18 19:06:21.554: D/AndroidRuntime(311): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
10-18 19:06:21.554: D/AndroidRuntime(311): CheckJNI is ON
10-18 19:06:21.653: D/AndroidRuntime(311): --- registering native functions ---
10-18 19:06:22.073: D/AndroidRuntime(311): Shutting down VM
10-18 19:06:22.073: D/dalvikvm(311): Debugger has detached; object registry had 1 entries
10-18 19:06:22.083: I/AndroidRuntime(311): NOTE: attach of thread 'Binder Thread #3' failed
10-18 19:06:22.423: D/AndroidRuntime(319): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
10-18 19:06:22.423: D/AndroidRuntime(319): CheckJNI is ON
10-18 19:06:22.523: D/AndroidRuntime(319): --- registering native functions ---
10-18 19:06:22.943: I/ActivityManager(58): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.gt_google_svn/.Auth }
10-18 19:06:22.953: D/AndroidRuntime(319): Shutting down VM
10-18 19:06:22.953: D/dalvikvm(319): Debugger has detached; object registry had 1 entries
10-18 19:06:22.963: I/AndroidRuntime(319): NOTE: attach of thread 'Binder Thread #3' failed
10-18 19:06:44.220: W/WindowManager(58): Key dispatching timed out sending to com.gt_google_svn/com.gt_google_svn.Auth
10-18 19:06:44.220: W/WindowManager(58): Previous dispatch state: null
10-18 19:06:44.224: W/WindowManager(58): Current dispatch state: {{null to Window{45080188 com.gt_google_svn/com.gt_google_svn.Auth paused=false} # 1350567404223 lw=Window{45080188 com.gt_google_svn/com.gt_google_svn.Auth paused=false} lb=android.os.BinderProxy#4500e0f8 fin=false gfw=true ed=true tts=0 wf=false fp=false mcf=Window{45080188 com.gt_google_svn/com.gt_google_svn.Auth paused=false}}}
10-18 19:06:44.244: I/Process(58): Sending signal. PID: 301 SIG: 3
10-18 19:06:44.244: I/dalvikvm(301): threadid=3: reacting to signal 3
10-18 19:06:44.284: I/dalvikvm(301): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.284: I/Process(58): Sending signal. PID: 58 SIG: 3
10-18 19:06:44.284: I/dalvikvm(58): threadid=3: reacting to signal 3
10-18 19:06:44.324: I/dalvikvm(58): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.324: I/Process(58): Sending signal. PID: 124 SIG: 3
10-18 19:06:44.324: I/dalvikvm(124): threadid=3: reacting to signal 3
10-18 19:06:44.334: I/dalvikvm(124): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.334: I/Process(58): Sending signal. PID: 285 SIG: 3
10-18 19:06:44.334: I/dalvikvm(285): threadid=3: reacting to signal 3
10-18 19:06:44.345: I/dalvikvm(285): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.345: I/Process(58): Sending signal. PID: 256 SIG: 3
10-18 19:06:44.345: I/dalvikvm(256): threadid=3: reacting to signal 3
10-18 19:06:44.354: I/dalvikvm(256): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.354: I/Process(58): Sending signal. PID: 195 SIG: 3
10-18 19:06:44.354: I/dalvikvm(195): threadid=3: reacting to signal 3
10-18 19:06:44.364: I/dalvikvm(195): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.364: I/Process(58): Sending signal. PID: 201 SIG: 3
10-18 19:06:44.364: I/dalvikvm(201): threadid=3: reacting to signal 3
10-18 19:06:44.374: I/dalvikvm(201): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.374: I/Process(58): Sending signal. PID: 253 SIG: 3
10-18 19:06:44.374: I/dalvikvm(253): threadid=3: reacting to signal 3
10-18 19:06:44.384: I/dalvikvm(253): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.384: I/Process(58): Sending signal. PID: 108 SIG: 3
10-18 19:06:44.384: I/dalvikvm(108): threadid=3: reacting to signal 3
10-18 19:06:44.404: I/dalvikvm(108): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.404: I/Process(58): Sending signal. PID: 112 SIG: 3
10-18 19:06:44.404: I/dalvikvm(112): threadid=3: reacting to signal 3
10-18 19:06:44.424: I/dalvikvm(112): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.424: I/Process(58): Sending signal. PID: 207 SIG: 3
10-18 19:06:44.424: I/dalvikvm(207): threadid=3: reacting to signal 3
10-18 19:06:44.434: I/dalvikvm(207): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.434: I/Process(58): Sending signal. PID: 160 SIG: 3
10-18 19:06:44.434: I/dalvikvm(160): threadid=3: reacting to signal 3
10-18 19:06:44.464: I/dalvikvm(160): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.464: I/Process(58): Sending signal. PID: 175 SIG: 3
10-18 19:06:44.464: I/dalvikvm(175): threadid=3: reacting to signal 3
10-18 19:06:44.474: I/dalvikvm(175): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.474: I/Process(58): Sending signal. PID: 216 SIG: 3
10-18 19:06:44.484: I/dalvikvm(216): threadid=3: reacting to signal 3
10-18 19:06:44.494: I/dalvikvm(216): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.494: I/Process(58): Sending signal. PID: 269 SIG: 3
10-18 19:06:44.494: I/dalvikvm(269): threadid=3: reacting to signal 3
10-18 19:06:44.504: I/dalvikvm(269): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.504: I/Process(58): Sending signal. PID: 232 SIG: 3
10-18 19:06:44.504: I/dalvikvm(232): threadid=3: reacting to signal 3
10-18 19:06:44.515: I/dalvikvm(232): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.515: I/Process(58): Sending signal. PID: 144 SIG: 3
10-18 19:06:44.515: I/dalvikvm(144): threadid=3: reacting to signal 3
10-18 19:06:44.534: I/dalvikvm(144): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.534: I/Process(58): Sending signal. PID: 125 SIG: 3
10-18 19:06:44.534: I/dalvikvm(125): threadid=3: reacting to signal 3
10-18 19:06:44.544: I/dalvikvm(125): Wrote stack traces to '/data/anr/traces.txt'
10-18 19:06:44.574: E/ActivityManager(58): ANR in com.gt_google_svn (com.gt_google_svn/.Auth)
10-18 19:06:44.574: E/ActivityManager(58): Reason: keyDispatchingTimedOut
10-18 19:06:44.574: E/ActivityManager(58): Load: 0.59 / 0.48 / 0.2
10-18 19:06:44.574: E/ActivityManager(58): CPU usage from 44545ms to 18ms ago:
10-18 19:06:44.574: E/ActivityManager(58): system_server: 2% = 1% user + 0% kernel / faults: 119 minor 4 major
10-18 19:06:44.574: E/ActivityManager(58): adbd: 0% = 0% user + 0% kernel / faults: 28 minor
10-18 19:06:44.574: E/ActivityManager(58): m.android.phone: 0% = 0% user + 0% kernel / faults: 156 minor
10-18 19:06:44.574: E/ActivityManager(58): m.gt_google_svn: 0% = 0% user + 0% kernel / faults: 27 minor 6 major
10-18 19:06:44.574: E/ActivityManager(58): qemud: 0% = 0% user + 0% kernel
10-18 19:06:44.574: E/ActivityManager(58): re-initialized>: 0% = 0% user + 0% kernel / faults: 146 minor 1 major
10-18 19:06:44.574: E/ActivityManager(58): events/0: 0% = 0% user + 0% kernel
10-18 19:06:44.574: E/ActivityManager(58): putmethod.latin: 0% = 0% user + 0% kernel / faults: 172 minor 1 major
10-18 19:06:44.574: E/ActivityManager(58): ndroid.launcher: 0% = 0% user + 0% kernel / faults: 39 minor
10-18 19:06:44.574: E/ActivityManager(58): ndroid.settings: 0% = 0% user + 0% kernel / faults: 109 minor
10-18 19:06:44.574: E/ActivityManager(58): roid.alarmclock: 0% = 0% user + 0% kernel / faults: 77 minor
10-18 19:06:44.574: E/ActivityManager(58): android.protips: 0% = 0% user + 0% kernel / faults: 76 minor
10-18 19:06:44.574: E/ActivityManager(58): .quicksearchbox: 0% = 0% user + 0% kernel / faults: 323 minor
10-18 19:06:44.574: E/ActivityManager(58): d.process.media: 0% = 0% user + 0% kernel / faults: 268 minor
10-18 19:06:44.574: E/ActivityManager(58): com.android.mms: 0% = 0% user + 0% kernel / faults: 92 minor 1 major
10-18 19:06:44.574: E/ActivityManager(58): id.defcontainer: 0% = 0% user + 0% kernel / faults: 78 minor
10-18 19:06:44.574: E/ActivityManager(58): s:FriendService: 0% = 0% user + 0% kernel / faults: 77 minor
10-18 19:06:44.574: E/ActivityManager(58): m.android.email: 0% = 0% user + 0% kernel / faults: 98 minor
10-18 19:06:44.574: E/ActivityManager(58): com.svox.pico: 0% = 0% user + 0% kernel / faults: 26 minor
10-18 19:06:44.574: E/ActivityManager(58): TOTAL: 8% = 5% user + 2% kernel + 0% softirq
10-18 19:06:44.604: W/WindowManager(58): No window to dispatch pointer action 1
10-18 19:06:44.624: W/WindowManager(58): No window to dispatch pointer action 1
10-18 19:06:44.624: W/WindowManager(58): No window to dispatch pointer action 0
10-18 19:06:44.634: W/WindowManager(58): No window to dispatch pointer action 1
10-18 19:06:44.634: W/WindowManager(58): No window to dispatch pointer action 0
10-18 19:06:44.634: W/WindowManager(58): No window to dispatch pointer action 1
10-18 19:06:44.634: W/WindowManager(58): No window to dispatch pointer action 0
10-18 19:06:44.634: W/WindowManager(58): No window to dispatch pointer action 1
10-18 19:06:44.634: W/WindowManager(58): No window to dispatch pointer action 0
10-18 19:06:44.634: W/WindowManager(58): No window to dispatch pointer action 1
10-18 19:06:44.634: W/WindowManager(58): No window to dispatch pointer action 0
10-18 19:06:44.634: W/WindowManager(58): No window to dispatch pointer action 1
10-18 19:06:44.734: W/KeyCharacterMap(58): No keyboard for id 0
10-18 19:06:44.734: W/KeyCharacterMap(58): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
10-18 19:06:45.014: I/ARMAssembler(58): generated scanline__00000077:03515104_00000000_00000000 [ 33 ipp] (47 ins) at [0x3250d0:0x32518c] in 326428 ns
Use AsyncTask and take off your long running task from your UI thread. Read the posts below for more concrete information
http://android-developers.blogspot.com/2010/07/multithreading-for-performance.html
http://android-developers.blogspot.com/2009/05/painless-threading.html
http://developer.android.com/reference/android/os/NetworkOnMainThreadException.html

Drop event when select OK to restart Launcher when ANR occurs

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.

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