我有一个奇怪的问题VideoView
。我正在显示三个视频。当一个完成后,我选择下一个,依此类推。
它可以完美运行大约三天。然后视频在最开始,按下播放 MediaController 播放按钮(显示暂停符号)但没有发生任何事情。当我尝试单击播放按钮时,keyDispatchingTimedOut
出现错误。
任何想法可能会发生什么以及我如何解决这个问题?
编辑:
我重新启动了应用程序,但没有重新启动设备。当我调用包含 的活动时,VideoView
我得到一个ANR
. 此外,整个设备的反应比平时慢一点……
I/InputDispatcher( 2381): Application is not responding: Window{41319d40 com.android.myapp/com.android.myapp.MainActivity paused=false}. 5003.9ms since event, 5003.2ms since wait started
I/WindowManager( 2381): Input event dispatching timed out sending to com.android.myapp/com.android.myapp.MainActivity
I/Process ( 2381): Sending signal. PID: 7704 SIG: 3
I/dalvikvm( 7704): threadid=3: reacting to signal 3
I/dalvikvm( 7704): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 2381): Sending signal. PID: 2381 SIG: 3
I/dalvikvm( 2381): threadid=3: reacting to signal 3
I/dalvikvm( 2381): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 2381): Sending signal. PID: 2454 SIG: 3
I/dalvikvm( 2454): threadid=3: reacting to signal 3
I/dalvikvm( 2454): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 2381): Sending signal. PID: 2535 SIG: 3
I/dalvikvm( 2535): threadid=3: reacting to signal 3
I/dalvikvm( 2535): Wrote stack traces to '/data/anr/traces.txt'
D/dalvikvm( 2381): GC_CONCURRENT freed 644K, 10% free 9566K/10567K, paused 3ms+17ms
D/dalvikvm( 2381): GC_EXPLICIT freed 411K, 9% free 9668K/10567K, paused 2ms+6ms
E/ActivityManager( 2381): ANR in com.android.myapp (com.android.myapp/.MainActivity)
E/ActivityManager( 2381): Reason: keyDispatchingTimedOut
E/ActivityManager( 2381): Load: 6.45 / 6.46 / 6.33
E/ActivityManager( 2381): CPU usage from 7152ms to 1372ms ago:
E/ActivityManager( 2381): 99% 2282/mediaserver: 99% user + 0% kernel / faults: 3 minor
E/ActivityManager( 2381): 7.4% 1318/mmcqd/0: 0% user + 7.4% kernel
E/ActivityManager( 2381): 24% 7704/com.android.myapp: 19% user + 5.3% kernel / faults: 245 minor
E/ActivityManager( 2381): 1.2% 2381/system_server: 1.2% user + 0% kernel / faults: 24 minor
E/ActivityManager( 2381): 1.2% 7563/kworker/0:1: 0% user + 1.2% kernel
E/ActivityManager( 2381): 1% 2279/surfaceflinger: 0.5% user + 0.5% kernel
E/ActivityManager( 2381): 0.3% 7204/kworker/0:3: 0% user + 0.3% kernel
E/ActivityManager( 2381): 0% 1271/galcore daemon : 0% user + 0% kernel
E/ActivityManager( 2381): 0% 2288/magd: 0% user + 0% kernel / faults: 2 minor
E/ActivityManager( 2381): 0% 7464/kworker/u:1: 0% user + 0% kernel
E/ActivityManager( 2381): 0% 7731/kworker/1:0: 0% user + 0% kernel
E/ActivityManager( 2381): 92% TOTAL: 59% user + 28% kernel + 4.9% iowait
E/ActivityManager( 2381): CPU usage from 1006ms to 1524ms later:
E/ActivityManager( 2381): 96% 2282/mediaserver: 96% user + 0% kernel
E/ActivityManager( 2381): 96% 6962/Binder Thread #: 96% user + 0% kernel
E/ActivityManager( 2381): 38% 1318/mmcqd/0: 0% user + 38% kernel
E/ActivityManager( 2381): 19% 7704/com.android.myapp: 13% user + 5.8% kernel
E/ActivityManager( 2381): 19% 7704/.ai.mediaplayer: 13% user + 5.8% kernel
E/ActivityManager( 2381): 7.8% 7204/kworker/0:3: 0% user + 7.8% kernel
E/ActivityManager( 2381): 1.1% 2279/surfaceflinger: 0% user + 1.1% kernel
E/ActivityManager( 2381): 100% TOTAL: 54% user + 28% kernel + 15% iowait + 0.9% softirq
W/ActivityManager( 2381): Force finishing activity com.android.myapp/.MainActivity
W/audio_hw_primary( 2282): start_output_stream...
W/audio_hw_primary( 2282): headphone 8 ,headset 0 ,speaker 0, earpiece 0,
W/audio_hw_primary( 2282): card 0, port 0 device 8
I/ActivityManager( 2381): Killing ProcessRecord{41316378 7704:com.android.myapp/10043}: user's request
I/WindowManager( 2381): WIN DEATH: Window{41319d40 com.android.myapp/com.android.myapp.MainActivity paused=true}
I/ActivityManager( 2381): Process com.android.myapp (pid 7704) has died.
W/InputManagerService( 2381): Got RemoteException sending setActive(false) notification to pid 7704 uid 10043
D/dalvikvm( 2454): GC_FOR_ALLOC freed 294K, 82% free 7775K/41799K, paused 44ms
I/dalvikvm-heap( 2454): Grow heap (frag case) to 17.027MB for 9830416-byte allocation
D/dalvikvm( 2454): GC_CONCURRENT freed 4K, 59% free 17370K/41799K, paused 4ms+8ms
W/audio_hw_primary( 2282): do_out_standby...
D/dalvikvm( 2454): GC_FOR_ALLOC freed 0K, 59% free 17370K/41799K, paused 26ms
I/dalvikvm-heap( 2454): Grow heap (frag case) to 38.884MB for 22924816-byte allocation
D/dalvikvm( 2454): GC_CONCURRENT freed 0K, 5% free 39758K/41799K, paused 3ms+6ms
I/ActivityManager( 2381): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=org.jtb.alogcat cmp=org.jtb.alogcat/.LogActivity bnds=[528,94][624,190]} from pid 2560