Situation
I am using a VideoView which I show when I want to play a video. After playing the video I hide it again. So I do not recreate the VideoView each time.
Exception
Every once in a while the app crashes when I try to start playing a video (sometimes after I have already played several videos using the VideoView before).
I get the stacktrace you can find below. I have tried almost everything but without luck. Maybe you struggled with this issue as well or even know the reason?
02-23 15:10:52.362 22834-22890/com.app.example D/dalvikvm: GC_EXPLICIT freed 189K, 27% free 11296K/15368K, paused 0ms+0ms, total 10ms
02-23 15:10:52.422 22834-22890/com.app.example D/dalvikvm: GC_EXPLICIT freed 189K, 27% free 11296K/15368K, paused 0ms+0ms, total 10ms
02-23 15:12:19.832 22834-22890/com.app.example W/PGA: [22890] egl: eglDestroySurface (0x5583a7a0, 0x7956ad40)
02-23 15:12:19.832 22834-22890/com.app.example W/PGA: [22890] egl: eglDestroySurface (0x5583a7a0, 0x7956ad40) returned
02-23 15:12:19.872 22834-22843/com.app.example E/MediaPlayer: error (1, -2147483648)
02-23 15:12:20.182 22834-22834/com.app.example D/AndroidRuntime: Shutting down VM
02-23 15:12:20.182 22834-22834/com.app.example W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x64d77b20)
02-23 15:12:20.182 22834-22847/com.app.example W/AudioSystem: AudioFlinger server died!
02-23 15:12:20.182 22834-22847/com.app.example W/IMediaDeathNotifier: media server died
02-23 15:12:20.182 22834-22847/com.app.example E/MediaPlayer: error (100, 0)
02-23 15:12:20.182 22834-22847/com.app.example E/MediaPlayer: error (100, 0)
02-23 15:12:20.182 22834-22847/com.app.example E/MediaPlayer: error (100, 0)
02-23 15:12:20.182 22834-22847/com.app.example E/MediaPlayer: error (100, 0)
02-23 15:12:20.182 22834-22847/com.app.example E/MediaPlayer: error (100, 0)
02-23 15:12:20.182 22834-22847/com.app.example W/AudioSystem: AudioPolicyService server died!
02-23 15:12:20.322 22834-22834/com.app.example I/Process: Sending signal. PID: 22834 SIG: 9
02-23 15:12:20.322 22834-22834/com.app.example D/AndroidRuntime: procName from cmdline: com.app.example
02-23 15:12:20.322 22834-22834/com.app.example E/AndroidRuntime: in writeCrashedAppName, pkgName :com.app.example
02-23 15:12:20.322 22834-22834/com.app.example D/AndroidRuntime: file written successfully with content: com.app.example StringBuffer : ;com.app.example
02-23 15:12:20.322 22834-22834/com.app.example E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.app.example, PID: 22834
java.lang.RuntimeException: failure code: -32
at android.media.MediaPlayer.invoke(MediaPlayer.java:664)
at android.media.MediaPlayer.getInbandTrackInfo(MediaPlayer.java:1692)
at android.media.MediaPlayer.scanInternalSubtitleTracks(MediaPlayer.java:1851)
at android.media.MediaPlayer.access$600(MediaPlayer.java:529)
at android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:2198)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5021)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:827)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:643)
at dalvik.system.NativeStart.main(Native Method)
Your problem seems to have been encountered by others.
One solution would be this
mVideoView.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
#Override
public void onCompletion(MediaPlayer mp) {
if( mp != null ) {
mp.setDisplay(null);
mp.reset();
mp.setDisplay(mMovieView.getHolder());
}
}
});
Another would be to update SDK
Or recreating the VideoView for each media content source
All of them suggest it is happening on Android KitKat 4.4.x.
Related
I want to run my android app from ADB So I run this command
adb -s emulator-5554 shell am start -W -S -n com.example.myproj/.MainActivity
My application starts in emulator but it force closed and the message unfortunately stopped working showed on emulator screen. I try both genymotion and eclipse emulator and got same error.But when I run it from eclipse directly it does not any force close problem.
I should mention that I use ubuntu 14.04 32bit.
Please help me and say what is my mistake and how I can fix it?
ok I use logcat as result I have very long log I just put last part which I can see from command line and seems to relevant to my app
D/gralloc ( 51): Registering a buffer in the process that created it.
This may cause memory ordering problems.
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/SurfaceFlinger( 51): glCheckFramebufferStatusOES error 1304732677
E/SurfaceFlinger( 51): got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
W/WindowManager( 361): Screenshot failure taking screenshot for (266x425) to layer 21005
D/AndroidRuntime( 1133): Shutting down VM
I/ActivityManager( 361): Start proc com.example.myproj for activity com.example.myproj/.MainActivity: pid=1144 uid=10051 gids={50051, 1028, 1015}
D/dalvikvm( 1133): GC_CONCURRENT freed 96K, 15% free 585K/684K, paused 22ms+12ms, total 59ms
D/dalvikvm( 1144): Not late-enabling CheckJNI (already on)
I/Choreographer( 531): Skipped 32 frames! The application may be doing too much work on its main thread.
I/Choreographer( 361): Skipped 33 frames! The application may be doing too much work on its main thread.
W/dalvikvm( 1144): VFY: register1 v4 holds uninitialized ref
W/dalvikvm( 1144): VFY: bad arg 0 (into Ljava/lang/Object;)
W/dalvikvm( 1144): VFY: rejecting call to Lacteve/symbolic/Util;.write (Ljava/lang/Object;I)V
W/dalvikvm( 1144): VFY: rejecting opcode 0x71 at 0x000a
W/dalvikvm( 1144): VFY: rejected Lcom/example/myproj/MainActivity$1;.<init> (Lcom/example/myproj/MainActivity;)V
W/dalvikvm( 1144): Verifier rejected class Lcom/example/myproj/MainActivity$1;
D/AndroidRuntime( 1144): Shutting down VM
W/dalvikvm( 1144): threadid=1: thread exiting with uncaught exception (group=0xb3ae0b90)
E/AndroidRuntime( 1144): FATAL EXCEPTION: main
E/AndroidRuntime( 1144): Process: com.example.myproj, PID: 1144
E/AndroidRuntime( 1144): java.lang.VerifyError: com/example/myproj/MainActivity$1
E/AndroidRuntime( 1144): at com.example.myproj.MainActivity.dol(MainActivity.java:24)
E/AndroidRuntime( 1144): at com.example.myproj.MainActivity.onCreate(MainActivity.java:17)
E/AndroidRuntime( 1144): at android.app.Activity.performCreate(Activity.java:5243)
E/AndroidRuntime( 1144): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
E/AndroidRuntime( 1144): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2140)
E/AndroidRuntime( 1144): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226)
E/AndroidRuntime( 1144): at android.app.ActivityThread.access$700(ActivityThread.java:135)
E/AndroidRuntime( 1144): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
E/AndroidRuntime( 1144): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 1144): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 1144): at android.app.ActivityThread.main(ActivityThread.java:4998)
E/AndroidRuntime( 1144): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1144): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 1144): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
E/AndroidRuntime( 1144): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
E/AndroidRuntime( 1144): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 361): Force finishing activity com.example.myproj/.MainActivity
I/WindowManager( 361): Screenshot max retries 4 of Token{b40b44d0 ActivityRecord{b40181a0 u0 com.example.myproj/.MainActivity t7 f}} appWin=Window{b41a0fe8 u0 Starting com.example.myproj} drawState=4
W/WindowManager( 361): Screenshot failure taking screenshot for (800x1280) to layer 21010
W/ActivityManager( 361): Activity pause timeout for ActivityRecord{b40181a0 u0 com.example.myproj/.MainActivity t7 f}
I/Process ( 1144): Sending signal. PID: 1144 SIG: 9
I/ActivityManager( 361): Process com.example.myproj (pid 1144) has died.
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressStandard.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressStandard.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressSpacebar.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressSpacebar.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressDelete.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressDelete.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressReturn.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressReturn.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressInvalid.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressInvalid.ogg
W/AudioService( 361): onLoadSoundEffects(), Error -1 while loading samples
I/Choreographer( 361): Skipped 40 frames! The application may be doing too much work on its main thread.
W/InputMethodManagerService( 361): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#b417b3a0 attribute=null, token = android.os.BinderProxy#b404fb70
D/AndroidRuntime( 1161):
D/AndroidRuntime( 1161): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
D/AndroidRuntime( 1161): CheckJNI is ON
D/dalvikvm( 1161): Trying to load lib libjavacore.so 0x0
D/dalvikvm( 1161): Added shared lib libjavacore.so 0x0
D/dalvikvm( 1161): Trying to load lib libnativehelper.so 0x0
D/dalvikvm( 1161): Added shared lib libnativehelper.so 0x0
D/dalvikvm( 1161): No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
D/dalvikvm( 1161): Note: class Landroid/app/ActivityManagerNative; has 179 unimplemented (abstract) methods
E/memtrack( 1161): Couldn't load memtrack module (No such file or directory)
E/android.os.Debug( 1161): failed to load memtrack module: -2
D/AndroidRuntime( 1161): Calling main entry com.android.commands.am.Am
I/ActivityManager( 361): Force stopping com.example.myproj appid=10051 user=0: from pid 1161
I/ActivityManager( 361): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.example.myproj/.MainActivity} from pid 1161
D/gralloc ( 51): Registering a buffer in the process that created it. This may cause memory ordering problems.
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/SurfaceFlinger( 51): glCheckFramebufferStatusOES error 1304732677
E/SurfaceFlinger( 51): got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
W/WindowManager( 361): Screenshot failure taking screenshot for (266x425) to layer 21005
D/AndroidRuntime( 1161): Shutting down VM
D/dalvikvm( 1161): GC_CONCURRENT freed 96K, 15% free 589K/688K, paused 23ms+32ms, total 71ms
D/dalvikvm( 1172): Not late-enabling CheckJNI (already on)
I/ActivityManager( 361): Start proc com.example.myproj for activity com.example.myproj/.MainActivity: pid=1172 uid=10051 gids={50051, 1028, 1015}
I/Choreographer( 361): Skipped 39 frames! The application may be doing too much work on its main thread.
I/Choreographer( 361): Skipped 34 frames! The application may be doing too much work on its main thread.
W/dalvikvm( 1172): VFY: register1 v4 holds uninitialized ref
W/dalvikvm( 1172): VFY: bad arg 0 (into Ljava/lang/Object;)
W/dalvikvm( 1172): VFY: rejecting call to Lacteve/symbolic/Util;.write (Ljava/lang/Object;I)V
W/dalvikvm( 1172): VFY: rejecting opcode 0x71 at 0x000a
W/dalvikvm( 1172): VFY: rejected Lcom/example/myproj/MainActivity$1;.<init> (Lcom/example/myproj/MainActivity;)V
W/dalvikvm( 1172): Verifier rejected class Lcom/example/myproj/MainActivity$1;
D/AndroidRuntime( 1172): Shutting down VM
W/dalvikvm( 1172): threadid=1: thread exiting with uncaught exception (group=0xb3ae0b90)
E/AndroidRuntime( 1172): FATAL EXCEPTION: main
E/AndroidRuntime( 1172): Process: com.example.myproj, PID: 1172
E/AndroidRuntime( 1172): java.lang.VerifyError: com/example/myproj/MainActivity$1
E/AndroidRuntime( 1172): at com.example.myproj.MainActivity.dol(MainActivity.java:24)
E/AndroidRuntime( 1172): at com.example.myproj.MainActivity.onCreate(MainActivity.java:17)
E/AndroidRuntime( 1172): at android.app.Activity.performCreate(Activity.java:5243)
E/AndroidRuntime( 1172): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
E/AndroidRuntime( 1172): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2140)
E/AndroidRuntime( 1172): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226)
E/AndroidRuntime( 1172): at android.app.ActivityThread.access$700(ActivityThread.java:135)
E/AndroidRuntime( 1172): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
E/AndroidRuntime( 1172): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 1172): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 1172): at android.app.ActivityThread.main(ActivityThread.java:4998)
E/AndroidRuntime( 1172): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1172): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 1172): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
E/AndroidRuntime( 1172): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
E/AndroidRuntime( 1172): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 361): Force finishing activity com.example.myproj/.MainActivity
I/WindowManager( 361): Screenshot max retries 4 of Token{b4186bf8 ActivityRecord{b4186a98 u0 com.example.myproj/.MainActivity t8 f}} appWin=Window{b417dc10 u0 Starting com.example.myproj} drawState=4
W/WindowManager( 361): Screenshot failure taking screenshot for (800x1280) to layer 21010
W/ActivityManager( 361): Activity pause timeout for ActivityRecord{b4186a98 u0 com.example.myproj/.MainActivity t8 f}
I/Process ( 1172): Sending signal. PID: 1172 SIG: 9
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressStandard.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressStandard.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressSpacebar.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressSpacebar.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressDelete.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressDelete.ogg
I/dalvikvm( 361): Jit: resizing JitTable from 4096 to 8192
I/ActivityManager( 361): Process com.example.myproj (pid 1172) has died.
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressReturn.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressReturn.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressInvalid.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressInvalid.ogg
W/AudioService( 361): onLoadSoundEffects(), Error -1 while loading samples
D/LightsService( 361): Excessive delay setting light: 444ms
D/LightsService( 361): Excessive delay setting light: 102ms
W/InputMethodManagerService( 361): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#b421b110 attribute=null, token = android.os.BinderProxy#b404fb70
D/dalvikvm( 361): GC_CONCURRENT freed 660K, 10% free 6734K/7468K, paused 7ms+17ms, total 344ms
D/AndroidRuntime( 1189):
D/AndroidRuntime( 1189): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
D/AndroidRuntime( 1189): CheckJNI is ON
D/dalvikvm( 1189): Trying to load lib libjavacore.so 0x0
D/dalvikvm( 1189): Added shared lib libjavacore.so 0x0
D/dalvikvm( 1189): Trying to load lib libnativehelper.so 0x0
D/dalvikvm( 1189): Added shared lib libnativehelper.so 0x0
D/dalvikvm( 1189): No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
D/dalvikvm( 1189): Note: class Landroid/app/ActivityManagerNative; has 179 unimplemented (abstract) methods
E/memtrack( 1189): Couldn't load memtrack module (No such file or directory)
E/android.os.Debug( 1189): failed to load memtrack module: -2
D/AndroidRuntime( 1189): Calling main entry com.android.commands.am.Am
I/ActivityManager( 361): Force stopping com.example.myproj appid=10051 user=0: from pid 1189
I/ActivityManager( 361): START u0 {flg=0x10000000 cmp=com.example.myproj/.MainActivity} from pid 1189
D/gralloc ( 51): Registering a buffer in the process that created it. This may cause memory ordering problems.
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/SurfaceFlinger( 51): glCheckFramebufferStatusOES error 1304732677
E/SurfaceFlinger( 51): got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
W/WindowManager( 361): Screenshot failure taking screenshot for (266x425) to layer 21005
I/ActivityManager( 361): Start proc com.example.myproj for activity com.example.myproj/.MainActivity: pid=1200 uid=10051 gids={50051, 1028, 1015}
D/dalvikvm( 1200): Not late-enabling CheckJNI (already on)
I/Choreographer( 361): Skipped 37 frames! The application may be doing too much work on its main thread.
I/Choreographer( 361): Skipped 33 frames! The application may be doing too much work on its main thread.
I/Choreographer( 531): Skipped 84 frames! The application may be doing too much work on its main thread.
W/dalvikvm( 1200): VFY: register1 v4 holds uninitialized ref
W/dalvikvm( 1200): VFY: bad arg 0 (into Ljava/lang/Object;)
W/dalvikvm( 1200): VFY: rejecting call to Lacteve/symbolic/Util;.write (Ljava/lang/Object;I)V
W/dalvikvm( 1200): VFY: rejecting opcode 0x71 at 0x000a
W/dalvikvm( 1200): VFY: rejected Lcom/example/myproj/MainActivity$1;.<init> (Lcom/example/myproj/MainActivity;)V
W/dalvikvm( 1200): Verifier rejected class Lcom/example/myproj/MainActivity$1;
D/AndroidRuntime( 1200): Shutting down VM
W/dalvikvm( 1200): threadid=1: thread exiting with uncaught exception (group=0xb3ae0b90)
E/AndroidRuntime( 1200): FATAL EXCEPTION: main
E/AndroidRuntime( 1200): Process: com.example.myproj, PID: 1200
E/AndroidRuntime( 1200): java.lang.VerifyError: com/example/myproj/MainActivity$1
E/AndroidRuntime( 1200): at com.example.myproj.MainActivity.dol(MainActivity.java:24)
E/AndroidRuntime( 1200): at com.example.myproj.MainActivity.onCreate(MainActivity.java:17)
E/AndroidRuntime( 1200): at android.app.Activity.performCreate(Activity.java:5243)
E/AndroidRuntime( 1200): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
E/AndroidRuntime( 1200): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2140)
E/AndroidRuntime( 1200): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226)
E/AndroidRuntime( 1200): at android.app.ActivityThread.access$700(ActivityThread.java:135)
E/AndroidRuntime( 1200): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
E/AndroidRuntime( 1200): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 1200): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 1200): at android.app.ActivityThread.main(ActivityThread.java:4998)
E/AndroidRuntime( 1200): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1200): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 1200): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
E/AndroidRuntime( 1200): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
E/AndroidRuntime( 1200): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 361): Force finishing activity com.example.myproj/.MainActivity
I/WindowManager( 361): Screenshot max retries 4 of Token{b4083168 ActivityRecord{b3ffc9c8 u0 com.example.myproj/.MainActivity t9 f}} appWin=Window{b401a348 u0 Starting com.example.myproj} drawState=4
W/WindowManager( 361): Screenshot failure taking screenshot for (800x1280) to layer 21010
W/ActivityManager( 361): Activity pause timeout for ActivityRecord{b3ffc9c8 u0 com.example.myproj/.MainActivity t9 f}
I/Choreographer( 361): Skipped 31 frames! The application may be doing too much work on its main thread.
E/WindowManager( 361): Starting window AppWindowToken{b41c65a8 token=Token{b4083168 ActivityRecord{b3ffc9c8 u0 com.example.myproj/.MainActivity t9}}} timed out
W/ActivityManager( 361): Activity destroy timeout for ActivityRecord{b3ffc9c8 u0 com.example.myproj/.MainActivity t9 f}
D/dalvikvm( 531): GC_CONCURRENT freed 894K, 16% free 5380K/6392K, paused 78ms+17ms, total 167ms
D/dalvikvm( 515): GC_CONCURRENT freed 322K, 12% free 3340K/3780K, paused 6ms+7ms, total 64ms
I/Process ( 1200): Sending signal. PID: 1200 SIG: 9
W/InputMethodManagerService( 361): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#b404f558 attribute=null, token = android.os.BinderProxy#b404fb70
I/ActivityManager( 361): Process com.example.myproj (pid 1200) has died.
D/ConnectivityService( 361): Sampling interval elapsed, updating statistics ..
D/ConnectivityService( 361): Done.
D/ConnectivityService( 361): Setting timer for 720seconds
D/dalvikvm( 515): GC_CONCURRENT freed 436K, 14% free 3290K/3792K, paused 4ms+5ms, total 41ms
D/AndroidRuntime( 1240):
D/AndroidRuntime( 1240): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
D/AndroidRuntime( 1240): CheckJNI is ON
D/dalvikvm( 1240): Trying to load lib libjavacore.so 0x0
D/dalvikvm( 1240): Added shared lib libjavacore.so 0x0
D/dalvikvm( 1240): Trying to load lib libnativehelper.so 0x0
D/dalvikvm( 1240): Added shared lib libnativehelper.so 0x0
D/dalvikvm( 1240): No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
D/dalvikvm( 1240): Note: class Landroid/app/ActivityManagerNative; has 179 unimplemented (abstract) methods
E/memtrack( 1240): Couldn't load memtrack module (No such file or directory)
E/android.os.Debug( 1240): failed to load memtrack module: -2
D/AndroidRuntime( 1240): Calling main entry com.android.commands.am.Am
I/ActivityManager( 361): Force stopping com.example.myproj appid=10051 user=0: from pid 1240
I/ActivityManager( 361): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=logcat cmp=com.example.myproj/.MainActivity} from pid 1240
D/gralloc ( 51): Registering a buffer in the process that created it. This may cause memory ordering problems.
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/SurfaceFlinger( 51): glCheckFramebufferStatusOES error 1304732677
E/SurfaceFlinger( 51): got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
W/WindowManager( 361): Screenshot failure taking screenshot for (266x425) to layer 21005
I/ActivityManager( 361): Start proc com.example.myproj for activity com.example.myproj/.MainActivity: pid=1251 uid=10051 gids={50051, 1028, 1015}
D/dalvikvm( 1251): Not late-enabling CheckJNI (already on)
I/Choreographer( 361): Skipped 44 frames! The application may be doing too much work on its main thread.
W/dalvikvm( 1251): VFY: register1 v4 holds uninitialized ref
W/dalvikvm( 1251): VFY: bad arg 0 (into Ljava/lang/Object;)
W/dalvikvm( 1251): VFY: rejecting call to Lacteve/symbolic/Util;.write (Ljava/lang/Object;I)V
W/dalvikvm( 1251): VFY: rejecting opcode 0x71 at 0x000a
W/dalvikvm( 1251): VFY: rejected Lcom/example/myproj/MainActivity$1;.<init> (Lcom/example/myproj/MainActivity;)V
W/dalvikvm( 1251): Verifier rejected class Lcom/example/myproj/MainActivity$1;
D/AndroidRuntime( 1251): Shutting down VM
W/dalvikvm( 1251): threadid=1: thread exiting with uncaught exception (group=0xb3ae0b90)
E/AndroidRuntime( 1251): FATAL EXCEPTION: main
E/AndroidRuntime( 1251): Process: com.example.myproj, PID: 1251
E/AndroidRuntime( 1251): java.lang.VerifyError: com/example/myproj/MainActivity$1
E/AndroidRuntime( 1251): at com.example.myproj.MainActivity.dol(MainActivity.java:24)
E/AndroidRuntime( 1251): at com.example.myproj.MainActivity.onCreate(MainActivity.java:17)
E/AndroidRuntime( 1251): at android.app.Activity.performCreate(Activity.java:5243)
E/AndroidRuntime( 1251): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
E/AndroidRuntime( 1251): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2140)
E/AndroidRuntime( 1251): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226)
E/AndroidRuntime( 1251): at android.app.ActivityThread.access$700(ActivityThread.java:135)
E/AndroidRuntime( 1251): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
E/AndroidRuntime( 1251): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 1251): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 1251): at android.app.ActivityThread.main(ActivityThread.java:4998)
E/AndroidRuntime( 1251): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1251): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 1251): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
E/AndroidRuntime( 1251): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
E/AndroidRuntime( 1251): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 361): Force finishing activity com.example.myproj/.MainActivity
I/WindowManager( 361): Screenshot max retries 4 of Token{b41deb30 ActivityRecord{b4232990 u0 com.example.myproj/.MainActivity t10 f}} appWin=Window{b423e4b0 u0 Starting com.example.myproj} drawState=4
W/WindowManager( 361): Screenshot failure taking screenshot for (800x1280) to layer 21010
D/dalvikvm( 361): GC_CONCURRENT freed 1117K, 16% free 6529K/7720K, paused 16ms+34ms, total 347ms
W/ActivityManager( 361): Activity pause timeout for ActivityRecord{b4232990 u0 com.example.myproj/.MainActivity t10 f}
I/Choreographer( 531): Skipped 46 frames! The application may be doing too much work on its main thread.
D/LightsService( 361): Excessive delay setting light: 82ms
D/LightsService( 361): Excessive delay setting light: 426ms
I/Choreographer( 361): Skipped 37 frames! The application may be doing too much work on its main thread.
D/LightsService( 361): Excessive delay setting light: 1681ms
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressStandard.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressStandard.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressSpacebar.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressSpacebar.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressDelete.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressDelete.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressReturn.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressReturn.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressInvalid.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressInvalid.ogg
W/AudioService( 361): onLoadSoundEffects(), Error -1 while loading samples
I/Process ( 1251): Sending signal. PID: 1251 SIG: 9
D/LightsService( 361): Excessive delay setting light: 320ms
D/LightsService( 361): Excessive delay setting light: 190ms
D/LightsService( 361): Excessive delay setting light: 73ms
I/ActivityManager( 361): Process com.example.myproj (pid 1251) has died.
W/InputMethodManagerService( 361): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#b3f8b170 attribute=null, token = android.os.BinderProxy#b404fb70
E/WindowManager( 361): Starting window AppWindowToken{b4233820 token=Token{b41deb30 ActivityRecord{b4232990 u0 com.example.myproj/.MainActivity t10}}} timed out
I/ActivityManager( 361): Killing 564:com.android.printspooler/u0a38 (adj 15): empty for 1807s
I/ProcessStatsService( 361): Prepared write state in 25ms
I/ProcessStatsService( 361): Prepared write state in 16ms
I am getting the following error in nexus 5 when I play the video for 5-10 minutes.This error is not occurring always.It is working in nexus 9 and samsung duos.
10-08 09:03:14.033 14588-14599 W/AudioSystem﹕ AudioFlinger server died!
10-08 09:03:14.033 14588-14778 W/IMediaDeathNotifier﹕ media server died
10-08 09:03:14.043 14588-14778 E/MediaPlayer﹕ error (100, 0)
10-08 09:03:14.043 14588-14588 D/AndroidRuntime﹕ Shutting down VM
10-08 09:03:14.043 14588-14588 W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41849ba8)
10-08 09:03:14.043 14588-14588 E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: , PID: 14588
java.lang.RuntimeException: failure code: -32
at android.media.MediaPlayer.invoke(MediaPlayer.java:664)
at android.media.MediaPlayer.getInbandTrackInfo(MediaPlayer.java:1692)
at android.media.MediaPlayer.scanInternalSubtitleTracks(MediaPlayer.java:1851)
at android.media.MediaPlayer.access$600(MediaPlayer.java:529)
at android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:2198)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
It is working in nexus 5 emulator also.What might be the problem?and how to solve it?
Main reasons is memory issues, second could be mutlithread access on MediaPlayer. Do you have the code so we can elaborate more?
I am creating an app on Android, which involves an Activity and a service. One of the components of the service is meant to send a signal to the MainActivity, which will execute some specific code. The problem is, trying to send the intent makes the app crash.
Here is the code that sends the intent. Note that it resides in the inside of a doInBackground function of an AsyncTask object, which resides inside the said service:
#Override
protected String doInBackground(Socket... client) {
Intent received = new Intent();
received.setAction("com.mycompany.Messenger.MESSAGE_RECEIVED");
sendBroadcast(received);
}
Note that if I comment out sendBroadcast(received), the app does not crash.
Here is the handler of the Intent inside MainActivity (which has the name ChatBubbleActivity in my app):
public class MessageReceiver extends BroadcastReceiver {
#Override
public void onReceive(Context context, Intent intent) {
if(intent.getAction().equals(MESSAGE_RECEIVED)) {
String current_message = "Intent works!";
TextView textView = (TextView) findViewById(R.id.myText);
textView.setText(current_message);
}
}
}
And this is the declaration of the Receiver in manifest:
<receiver android:name=".ChatBubbleActivity$MessageReceiver">
<intent-filter>
<action android:name="com.mycompany.Messenger.MESSAGE_RECEIVED"/>
</intent-filter>
</receiver>
, inside the <activity> chunk.
What is it that I might be missing?
EDIT:New version of code based on answers, still crashing.
EDIT logcat:
02-04 16:17:32.444 487-489/? D/dalvikvm﹕ GC_CONCURRENT freed 1662K, 22% free 6885K/8728K, paused 2ms+2ms, total 42ms
02-04 16:17:32.876 1275-1275/? D/AndroidRuntime﹕ >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
02-04 16:17:32.912 1275-1275/? D/AndroidRuntime﹕ CheckJNI is OFF
02-04 16:17:32.960 1275-1275/? D/dalvikvm﹕ Trying to load lib libjavacore.so 0x0
02-04 16:17:32.964 1275-1275/? D/dalvikvm﹕ Added shared lib libjavacore.so 0x0
02-04 16:17:32.968 1275-1275/? D/dalvikvm﹕ Trying to load lib libnativehelper.so 0x0
02-04 16:17:32.972 1275-1275/? D/dalvikvm﹕ Added shared lib libnativehelper.so 0x0
02-04 16:17:32.972 1275-1275/? D/dalvikvm﹕ No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
02-04 16:17:33.020 1275-1275/? D/dalvikvm﹕ Note: class Landroid/app/ActivityManagerNative; has 179 unimplemented (abstract) methods
02-04 16:17:33.128 1275-1275/? E/memtrack﹕ Couldn't load memtrack module (No such file or directory)
02-04 16:17:33.132 1275-1275/? E/android.os.Debug﹕ failed to load memtrack module: -2
02-04 16:17:33.264 1275-1275/? D/AndroidRuntime﹕ Calling main entry com.android.commands.am.Am
02-04 16:17:33.284 487-617/? I/ActivityManager﹕ START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.mycompany.messenger/com.mycompany.Messenger.ChatBubbleActivity} from pid 1275
02-04 16:17:33.692 1275-1275/? D/AndroidRuntime﹕ Shutting down VM
02-04 16:17:33.692 1275-1279/? D/dalvikvm﹕ GC_CONCURRENT freed 95K, 15% free 576K/676K, paused 1ms+0ms, total 1ms
02-04 16:17:33.884 487-538/? I/ActivityManager﹕ Start proc com.mycompany.messenger for activity com.mycompany.messenger/com.mycompany.Messenger.ChatBubbleActivity: pid=1286 uid=10059 gids={50059, 3003}
02-04 16:17:33.932 1286-1286/? D/dalvikvm﹕ Late-enabling CheckJNI
02-04 16:17:34.228 1286-1286/? D/dalvikvm﹕ GC_FOR_ALLOC freed 60K, 4% free 2873K/2992K, paused 6ms, total 7ms
02-04 16:17:34.236 1286-1286/? I/dalvikvm-heap﹕ Grow heap (frag case) to 3.338MB for 500412-byte allocation
02-04 16:17:34.248 1286-1295/? D/dalvikvm﹕ GC_FOR_ALLOC freed <1K, 4% free 3362K/3484K, paused 11ms, total 11ms
02-04 16:17:34.252 1286-1290/? D/dalvikvm﹕ GC_CONCURRENT freed 0K, 4% free 3362K/3484K, paused 1ms+0ms, total 5ms
02-04 16:17:34.696 1286-1286/? D/libEGL﹕ loaded /system/lib/egl/libEGL_genymotion.so
02-04 16:17:34.708 1286-1286/? D/﹕ HostConnection::get() New Host Connection established 0xb7944cb0, tid 1286
02-04 16:17:34.744 1286-1286/? D/libEGL﹕ loaded /system/lib/egl/libGLESv1_CM_genymotion.so
02-04 16:17:34.744 1286-1286/? D/libEGL﹕ loaded /system/lib/egl/libGLESv2_genymotion.so
02-04 16:17:34.816 1286-1286/? W/EGL_genymotion﹕ eglSurfaceAttrib not implemented
02-04 16:17:34.820 1286-1286/? E/OpenGLRenderer﹕ Getting MAX_TEXTURE_SIZE from GradienCache
02-04 16:17:34.824 1286-1286/? E/OpenGLRenderer﹕ MAX_TEXTURE_SIZE: 8192
02-04 16:17:34.848 1286-1286/? E/OpenGLRenderer﹕ Getting MAX_TEXTURE_SIZE from Caches::initConstraints()
02-04 16:17:34.848 1286-1286/? E/OpenGLRenderer﹕ MAX_TEXTURE_SIZE: 8192
02-04 16:17:34.852 1286-1286/? D/OpenGLRenderer﹕ Enabling debug mode 0
02-04 16:17:34.932 1286-1300/? W/dalvikvm﹕ threadid=12: thread exiting with uncaught exception (group=0xa4d31b20)
02-04 16:17:34.932 1286-1300/? E/AndroidRuntime﹕ FATAL EXCEPTION: AsyncTask #2
Process: com.mycompany.messenger, PID: 1286
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:300)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
Caused by: android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
at android.app.ContextImpl.startActivity(ContextImpl.java:1050)
at android.app.ContextImpl.startActivity(ContextImpl.java:1037)
at android.content.ContextWrapper.startActivity(ContextWrapper.java:311)
at com.mycompany.Messenger.LocalService$DownloadWebpageTask2.doInBackground(LocalService.java:118)
at com.mycompany.Messenger.LocalService$DownloadWebpageTask2.doInBackground(LocalService.java:113)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
02-04 16:17:34.936 487-617/? W/ActivityManager﹕ Force finishing activity com.mycompany.messenger/com.mycompany.Messenger.ChatBubbleActivity
02-04 16:17:35.180 487-840/? W/InputMethodManagerService﹕ Focus gain on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy#529ef2ac (uid=10059 pid=1286)
02-04 16:17:35.288 487-617/? I/WindowManager﹕ Screenshot max retries 4 of Token{52998cec ActivityRecord{5294f214 u0 com.mycompany.messenger/com.mycompany.Messenger.ChatBubbleActivity t4 f}} appWin=Window{52948c58 u0 Starting com.mycompany.messenger} drawState=4
02-04 16:17:35.288 487-617/? W/WindowManager﹕ Screenshot failure taking screenshot for (800x1280) to layer 21015
02-04 16:17:38.512 487-502/? I/Choreographer﹕ Skipped 188 frames! The application may be doing too much work on its main thread.
02-04 16:17:38.516 711-711/? I/Choreographer﹕ Skipped 185 frames! The application may be doing too much work on its main thread.
02-04 16:17:39.708 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:17:40.536 711-711/? W/EGL_genymotion﹕ eglSurfaceAttrib not implemented
02-04 16:17:41.260 487-502/? I/Choreographer﹕ Skipped 35 frames! The application may be doing too much work on its main thread.
02-04 16:17:49.560 1286-1300/? I/Process﹕ Sending signal. PID: 1286 SIG: 9
02-04 16:17:49.580 487-616/? W/InputMethodManagerService﹕ Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#52963b68 attribute=null, token = android.os.BinderProxy#5290713c
02-04 16:17:49.644 487-840/? I/ActivityManager﹕ Process com.mycompany.messenger (pid 1286) has died.
02-04 16:17:49.716 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:17:59.720 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:18:09.728 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:18:19.736 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:18:29.744 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:18:39.752 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:18:49.756 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:18:59.764 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:19:09.772 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:19:19.780 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:19:29.788 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:19:39.792 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:19:49.800 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
Do you want to start an activity or send a broadcast? I don't understand your code.
You are starting an activity from a background thread, that's not allowed.
In your AsyncTask, the method protected String doInBackground(Socket... client) is the only one that doesn't run in the UI thread.
When ever you want to start your Broadcast Receiver you don't call it as an acitivty
Your Method
Intent received = new Intent(ChatBubbleActivity.MESSAGE_RECEIVED);
received.putExtra("current", "Intent is working!!");
startActivity(received);
What it should be
Intent intent = new Intent();
intent.setAction("com.tutorialspoint.CUSTOM_INTENT");
sendBroadcast(intent);
Have a look at these tutorials
Vogella
TutorialsPoint
I've got problem with camera app installed on emulator. Every time I want to launch camera I got such nasty thing. USing Intellij Idea (newest version) I'm creating new hardware with both cameras included, byt non of these works. I'm aware of errors printed below, but I don't have idea how to fix it (it hurts me especially while developing apps using capturing photos).
What I should do to make use for fake-camera and capture fake image produced in emulator for camera functionality?
11-25 13:31:12.527: E/CameraService(927): CameraService::connect X (pid 2426) rejected (invalid cameraId 0).
11-25 13:31:12.527: W/CameraBase(2426): An error occurred while connecting to camera: 0
11-25 13:31:12.527: E/CameraHolder(2426): fail to connect Camera
11-25 13:31:12.527: E/CameraHolder(2426): java.lang.RuntimeException: Fail to connect to camera service
11-25 13:31:12.527: E/CameraHolder(2426): at android.hardware.Camera.native_setup(Native Method)
11-25 13:31:12.527: E/CameraHolder(2426): at android.hardware.Camera.<init>(Camera.java:350)
11-25 13:31:12.527: E/CameraHolder(2426): at android.hardware.Camera.open(Camera.java:309)
11-25 13:31:12.527: E/CameraHolder(2426): at com.android.camera.CameraHolder.open(CameraHolder.java:131)
11-25 13:31:12.527: E/CameraHolder(2426): at com.android.camera.Util.openCamera(Util.java:267)
11-25 13:31:12.527: E/CameraHolder(2426): at com.android.camera.Camera$4.run(Camera.java:1100)
11-25 13:31:12.527: E/CameraHolder(2426): at java.lang.Thread.run(Thread.java:841)
11-25 13:31:12.527: W/dalvikvm(2426): threadid=11: thread exiting with uncaught exception (group=0xb1d37b20)
11-25 13:31:12.527: E/AndroidRuntime(2426): FATAL EXCEPTION: Thread-93
11-25 13:31:12.527: E/AndroidRuntime(2426): Process: com.android.camera, PID: 2426
11-25 13:31:12.527: E/AndroidRuntime(2426): java.lang.RuntimeException: openCamera failed
11-25 13:31:12.527: E/AndroidRuntime(2426): at com.android.camera.Util.openCamera(Util.java:272)
11-25 13:31:12.527: E/AndroidRuntime(2426): at com.android.camera.Camera$4.run(Camera.java:1100)
11-25 13:31:12.527: E/AndroidRuntime(2426): at java.lang.Thread.run(Thread.java:841)
11-25 13:31:12.527: E/AndroidRuntime(2426): Caused by: com.android.camera.CameraHardwareException: java.lang.RuntimeException: Fail to connect to camera service
11-25 13:31:12.527: E/AndroidRuntime(2426): at com.android.camera.CameraHolder.open(CameraHolder.java:135)
11-25 13:31:12.527: E/AndroidRuntime(2426): at com.android.camera.Util.openCamera(Util.java:267)
11-25 13:31:12.527: E/AndroidRuntime(2426): ... 2 more
11-25 13:31:12.527: E/AndroidRuntime(2426): Caused by: java.lang.RuntimeException: Fail to connect to camera service
11-25 13:31:12.527: E/AndroidRuntime(2426): at android.hardware.Camera.native_setup(Native Method)
11-25 13:31:12.527: E/AndroidRuntime(2426): at android.hardware.Camera.<init>(Camera.java:350)
11-25 13:31:12.527: E/AndroidRuntime(2426): at android.hardware.Camera.open(Camera.java:309)
11-25 13:31:12.527: E/AndroidRuntime(2426): at com.android.camera.CameraHolder.open(CameraHolder.java:131)
11-25 13:31:12.527: E/AndroidRuntime(2426): ... 3 more
11-25 13:31:12.557: W/ActivityManager(1261): Force finishing activity com.android.camera/.Camera
11-25 13:31:12.567: D/dalvikvm(2426): GC_FOR_ALLOC freed 212K, 8% free 3387K/3680K, paused 6ms, total 7ms
11-25 13:31:12.567: E/gralloc_goldfish(924): gralloc_alloc: Mismatched usage flags: 492 x 874, usage 333
11-25 13:31:12.567: W/GraphicBufferAllocator(924): alloc(492, 874, 1, 00000333, ...) failed -22 (Invalid argument)
11-25 13:31:12.567: E/(924): GraphicBufferAlloc::createGraphicBuffer(w=492, h=874) failed (Invalid argument), handle=0x0
11-25 13:31:12.567: E/BufferQueue(1261): [ScreenshotClient] dequeueBuffer: SurfaceComposer::createGraphicBuffer failed
11-25 13:31:12.567: W/WindowManager(1261): Screenshot failure taking screenshot for (492x874) to layer 21010
11-25 13:31:12.607: D/dalvikvm(2426): GC_FOR_ALLOC freed 18K, 7% free 3570K/3836K, paused 2ms, total 2ms
11-25 13:31:12.607: I/dalvikvm-heap(2426): Grow heap (frag case) to 4.978MB for 1490412-byte allocation
11-25 13:31:12.637: D/dalvikvm(2426): GC_FOR_ALLOC freed 2K, 6% free 5023K/5292K, paused 17ms, total 17ms
11-25 13:31:12.667: D/dalvikvm(2426): GC_FOR_ALLOC freed 14K, 5% free 5444K/5692K, paused 3ms, total 3ms
11-25 13:31:12.677: D/dalvikvm(2426): GC_FOR_ALLOC freed 9K, 5% free 5768K/6012K, paused 4ms, total 5ms
11-25 13:31:12.687: D/dalvikvm(2426): GC_FOR_ALLOC freed 3K, 4% free 6446K/6688K, paused 4ms, total 4ms
11-25 13:31:13.087: W/ActivityManager(1261): Activity pause timeout for ActivityRecord{b27fac48 u0 com.android.camera/.Camera t7 f}
11-25 13:31:13.127: W/EGL_emulation(1415): eglSurfaceAttrib not implemented
11-25 13:31:22.217: E/WindowManager(1261): Starting window AppWindowToken{b27ff320 token=Token{b27fada8 ActivityRecord{b27fac48 u0 com.android.camera/.Camera t7}}} timed out
11-25 13:31:23.197: W/ActivityManager(1261): Activity destroy timeout for ActivityRecord{b27fac48 u0 com.android.camera/.Camera t7 f}
11-25 13:31:41.508: I/Process(2426): Sending signal. PID: 2426 SIG: 9
11-25 13:31:41.508: I/ActivityManager(1261): Process com.android.camera (pid 2426) has died.
11-25 13:31:41.528: E/SoundPool(1261): error loading /system/media/audio/ui/Effect_Tick.ogg
11-25 13:31:41.528: W/AudioService(1261): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
11-25 13:31:41.528: E/SoundPool(1261): error loading /system/media/audio/ui/Effect_Tick.ogg
11-25 13:31:41.528: W/AudioService(1261): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
11-25 13:31:41.528: E/SoundPool(1261): error loading /system/media/audio/ui/Effect_Tick.ogg
11-25 13:31:41.528: W/AudioService(1261): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
11-25 13:31:41.528: E/SoundPool(1261): error loading /system/media/audio/ui/Effect_Tick.ogg
11-25 13:31:41.528: W/AudioService(1261): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
11-25 13:31:41.528: E/SoundPool(1261): error loading /system/media/audio/ui/Effect_Tick.ogg
11-25 13:31:41.528: W/AudioService(1261): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
11-25 13:31:41.528: E/SoundPool(1261): error loading /system/media/audio/ui/KeypressStandard.ogg
11-25 13:31:41.528: W/AudioService(1261): Soundpool could not load file: /system/media/audio/ui/KeypressStandard.ogg
11-25 13:31:41.528: E/SoundPool(1261): error loading /system/media/audio/ui/KeypressSpacebar.ogg
11-25 13:31:41.528: W/AudioService(1261): Soundpool could not load file: /system/media/audio/ui/KeypressSpacebar.ogg
11-25 13:31:41.528: E/SoundPool(1261): error loading /system/media/audio/ui/KeypressDelete.ogg
11-25 13:31:41.528: W/AudioService(1261): Soundpool could not load file: /system/media/audio/ui/KeypressDelete.ogg
11-25 13:31:41.528: E/SoundPool(1261): error loading /system/media/audio/ui/KeypressReturn.ogg
11-25 13:31:41.528: W/AudioService(1261): Soundpool could not load file: /system/media/audio/ui/KeypressReturn.ogg
11-25 13:31:41.528: E/SoundPool(1261): error loading /system/media/audio/ui/KeypressInvalid.ogg
11-25 13:31:41.528: W/AudioService(1261): Soundpool could not load file: /system/media/audio/ui/KeypressInvalid.ogg
11-25 13:31:41.528: W/AudioService(1261): onLoadSoundEffects(), Error -1 while loading samples
11-25 13:31:41.528: W/InputMethodManagerService(1261): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#b2882de8 attribute=null, token = android.os.BinderProxy#b23d9688
11-25 13:34:01.090: D/dalvikvm(1261): GC_FOR_ALLOC freed 1204K, 11% free 10400K/11684K, paused 15ms, total 16ms
11-25 13:38:44.164: D/dalvikvm(1400): GC_FOR_ALLOC freed 541K, 15% free 3672K/4284K, paused 10ms, total 21ms
My app runs fine on phone crashes on start up on tablets. It runs fine on my phone running 2.3.7 and my sister's phone running 4.0.3. But it crashes on my 10.1" tablet running 4.0.4. I tried it on a Nexus 7 AVD running 4.2 and it crashes there too.
This is the Log
12-26 23:11:55.350: E/Trace(845): error opening trace file: No such file or directory (2)
12-26 23:11:55.350: W/Trace(845): Unexpected value from nativeGetEnabledTags: 0
12-26 23:11:55.350: W/Trace(845): Unexpected value from nativeGetEnabledTags: 0
12-26 23:11:55.350: W/Trace(845): Unexpected value from nativeGetEnabledTags: 0
12-26 23:11:55.560: W/Trace(845): Unexpected value from nativeGetEnabledTags: 0
12-26 23:11:55.560: W/Trace(845): Unexpected value from nativeGetEnabledTags: 0
12-26 23:11:56.741: D/dalvikvm(845): GC_CONCURRENT freed 217K, 12% free 2635K/2984K, paused 70ms+14ms, total 139ms
12-26 23:11:56.751: D/dalvikvm(845): WAIT_FOR_CONCURRENT_GC blocked 4ms
12-26 23:11:56.813: D/dalvikvm(845): GC_FOR_ALLOC freed 68K, 14% free 2666K/3084K, paused 52ms, total 53ms
12-26 23:11:56.821: I/dalvikvm-heap(845): Grow heap (frag case) to 3.333MB for 635812-byte allocation
12-26 23:11:56.881: D/dalvikvm(845): GC_FOR_ALLOC freed <1K, 12% free 3286K/3708K, paused 57ms, total 57ms
12-26 23:11:56.931: D/dalvikvm(845): GC_CONCURRENT freed <1K, 12% free 3287K/3708K, paused 9ms+3ms, total 52ms
12-26 23:11:56.931: D/dalvikvm(845): WAIT_FOR_CONCURRENT_GC blocked 12ms
12-26 23:11:56.931: I/dalvikvm-heap(845): Grow heap (frag case) to 3.811MB for 500416-byte allocation
12-26 23:11:57.011: D/dalvikvm(845): GC_FOR_ALLOC freed <1K, 11% free 3775K/4200K, paused 49ms, total 49ms
12-26 23:11:57.223: D/AndroidRuntime(845): Shutting down VM
12-26 23:11:57.223: W/dalvikvm(845): threadid=1: thread exiting with uncaught exception (group=0x40a70930)
12-26 23:11:57.231: E/AndroidRuntime(845): FATAL EXCEPTION: main
12-26 23:11:57.231: E/AndroidRuntime(845): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.brandsonicinc.brandsonic.web.mobile/com.brandsonicinc.brandsonic.web.mobile.MainActivity}: java.lang.NullPointerException
12-26 23:11:57.231: E/AndroidRuntime(845): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
12-26 23:11:57.231: E/AndroidRuntime(845): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
12-26 23:11:57.231: E/AndroidRuntime(845): at android.app.ActivityThread.access$600(ActivityThread.java:141)
12-26 23:11:57.231: E/AndroidRuntime(845): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
12-26 23:11:57.231: E/AndroidRuntime(845): at android.os.Handler.dispatchMessage(Handler.java:99)
12-26 23:11:57.231: E/AndroidRuntime(845): at android.os.Looper.loop(Looper.java:137)
12-26 23:11:57.231: E/AndroidRuntime(845): at android.app.ActivityThread.main(ActivityThread.java:5039)
12-26 23:11:57.231: E/AndroidRuntime(845): at java.lang.reflect.Method.invokeNative(Native Method)
12-26 23:11:57.231: E/AndroidRuntime(845): at java.lang.reflect.Method.invoke(Method.java:511)
12-26 23:11:57.231: E/AndroidRuntime(845): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
12-26 23:11:57.231: E/AndroidRuntime(845): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
12-26 23:11:57.231: E/AndroidRuntime(845): at dalvik.system.NativeStart.main(Native Method)
12-26 23:11:57.231: E/AndroidRuntime(845): Caused by: java.lang.NullPointerException
12-26 23:11:57.231: E/AndroidRuntime(845): at com.brandsonicinc.brandsonic.web.mobile.MainActivity.onCreate(MainActivity.java:84)
12-26 23:11:57.231: E/AndroidRuntime(845): at android.app.Activity.performCreate(Activity.java:5104)
12-26 23:11:57.231: E/AndroidRuntime(845): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
12-26 23:11:57.231: E/AndroidRuntime(845): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
12-26 23:11:57.231: E/AndroidRuntime(845): ... 11 more
12-26 23:12:02.487: W/chromium(845): external/chromium/net/disk_cache/backend_impl.cc:1835: [1226/231202:WARNING:backend_impl.cc(1835)] Destroying invalid entry.
12-26 23:12:02.500: E/chromium(845): external/chromium/net/disk_cache/backend_impl.cc:1107: [1226/231202:ERROR:backend_impl.cc(1107)] Critical error found -8
12-26 23:12:02.820: W/chromium(845): external/chromium/net/disk_cache/storage_block-inl.h:119: [1226/231202:WARNING:storage_block-inl.h(119)] Failed data load.
12-26 23:12:02.820: W/chromium(845): external/chromium/net/disk_cache/storage_block-inl.h:119: [1226/231202:WARNING:storage_block-inl.h(119)] Failed data load.
12-26 23:12:02.840: W/chromium(845): external/chromium/net/disk_cache/storage_block-inl.h:119: [1226/231202:WARNING:storage_block-inl.h(119)] Failed data load.
12-26 23:12:02.881: W/chromium(845): external/chromium/net/disk_cache/storage_block-inl.h:119: [1226/231202:WARNING:storage_block-inl.h(119)] Failed data load.
12-26 23:12:02.966: E/chromium(845): external/chromium/net/disk_cache/entry_impl.cc:904: [1226/231202:ERROR:entry_impl.cc(904)] Failed to save user data
12-26 23:12:02.971: E/chromium(845): external/chromium/net/disk_cache/entry_impl.cc:904: [1226/231202:ERROR:entry_impl.cc(904)] Failed to save user data
12-26 23:12:04.361: I/Process(845): Sending signal. PID: 845 SIG: 9
Please help this is very frustrating. It used to run fine on tablets. Could it have something to do with the layouts?
try to put all your xml files in layout folder and no need to remove it from other if it already there.
If xml files are in folders like layout-sw600dp then the device will fail to load the specified xml file if screen width is less than 600dp. this is just example in your case it may be different
I have read your log, there is a bug on finding directory, have you use some directory method, to retrieve file from a particular location, tablet have internal storage instead of sd card might be problem in that.
But I can better understand if you post the code.