Can someone help me figure out what is the following crash about? Thanks.
I/DEBUG ( 3007): Build fingerprint: 'samsung/zerofltetmo/zerofltetmo:5.1.1/LMY47X/G920TUVU2COF8:user/release-keys'
I/DEBUG ( 3007): Revision: '11'
I/DEBUG ( 3007): ABI: 'arm'
I/DEBUG ( 3007): pid: 19656, tid: 21303, name: MediaCodec_loop >>> com.******.**** <<<
I/DEBUG ( 3007): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x14
I/DEBUG ( 3007): r0 f4a23e40 r1 00000003 r2 ca10ab30 r3 00000000
I/DEBUG ( 3007): r4 ca10ab30 r5 ca10ab60 r6 f4b14ea0 r7 000003f5
I/DEBUG ( 3007): r8 f7207df4 r9 f5fea030 sl ca10ac74 fp ca10ac80
I/DEBUG ( 3007): ip f723fe3c sp ca10ab28 lr f722d3a9 pc f722d3b4 cpsr 200b0030
I/DEBUG ( 3007):
I/DEBUG ( 3007): backtrace:
I/DEBUG ( 3007): #00 pc 0001d3b4 /system/lib/libbinder.so
I/DEBUG ( 3007): #01 pc 000ac0c9 /system/lib/libstagefright.so (android::MediaCodec::BatteryNotifier::noteStartVideo()+28)
I/DEBUG ( 3007): #02 pc 000ac5f7 /system/lib/libstagefright.so (android::MediaCodec::updateBatteryStat()+126)
I/DEBUG ( 3007): #03 pc 000ae657 /system/lib/libstagefright.so (android::MediaCodec::setState(android::MediaCodec::State)+194)
I/DEBUG ( 3007): #04 pc 000af3a7 /system/lib/libstagefright.so (android::MediaCodec::onMessageReceived(android::sp<android::AMessage> const&)+1410)
I/DEBUG ( 3007): #05 pc 0000c6a3 /system/lib/libstagefright_foundation.so (android::ALooperRoster::deliverMessage(android::sp<android::AMessage> const&)+166)
I/DEBUG ( 3007): #06 pc 0000c025 /system/lib/libstagefright_foundation.so (android::ALooper::loop()+220)
I/DEBUG ( 3007): #07 pc 00010665 /system/lib/libutils.so (android::Thread::_threadLoop(void*)+112)
I/DEBUG ( 3007): #08 pc 00066535 /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+72)
I/DEBUG ( 3007): #09 pc 000101d5 /system/lib/libutils.so
I/DEBUG ( 3007): #10 pc 000174e7 /system/lib/libc.so (__pthread_start(void*)+30)
I/DEBUG ( 3007): #11 pc 00015503 /system/lib/libc.so (__start_thread+6)
I/DEBUG ( 3007):
I/DEBUG ( 3007): Tombstone written to: /data/tombstones/tombstone_01
E/ ( 3007): ro.product_ship = true
E/ ( 3007): ro.debug_level = 0x4f4c
E/audit ( 5283): type=1701 msg=audit(1443022086.863:298): auid=4294967295 uid=10259 gid=10259 ses=4294967295 subj=u:r:untrusted_app:s0 pid=21303 comm="MediaCodec_loop" reason="memory violation" sig=11
Related
Could anyone shed some light on the following crash report? Is there a way to prevent such crashes?
Build fingerprint: 'samsung/kltexx/klte:5.0/LRX21T/G900FXXU1BNL9:user/release-keys'
Revision: '14'
ABI: 'arm'
pid: 13847, tid: 16899, name: MediaCodec_loop >>> net.mydomain.myapp <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'frameworks/av/media/libstagefright/MediaCodec.cpp:967 CHECK_EQ( mState,CONFIGURING) failed: 9 vs. 3'
r0 00000000 r1 00004203 r2 00000006 r3 00000000
r4 9b2ffdb8 r5 00000006 r6 00000000 r7 0000010c
r8 00000000 r9 b55fa024 sl 9b2ffc74 fp 9b2ffc80
ip 00004203 sp 9b2ff7e0 lr b6f2ffd5 pc b6f53978 cpsr 600d0010
backtrace:
#00 pc 00037978 /system/lib/libc.so (tgkill+12)
#01 pc 00013fd1 /system/lib/libc.so (pthread_kill+52)
#02 pc 00014bef /system/lib/libc.so (raise+10)
#03 pc 00011531 /system/lib/libc.so (__libc_android_abort+36)
#04 pc 0000fcbc /system/lib/libc.so (abort+4)
#05 pc 00007af1 /system/lib/libcutils.so (__android_log_assert+88)
#06 pc 00098c8b /system/lib/libstagefright.so (android::MediaCodec::onMessageReceived(android::sp<android::AMessage> const&)+486)
#07 pc 0000a5a3 /system/lib/libstagefright_foundation.so (android::ALooperRoster::deliverMessage(android::sp<android::AMessage> const&)+166)
#08 pc 00009f25 /system/lib/libstagefright_foundation.so (android::ALooper::loop()+220)
#09 pc 0000ef11 /system/lib/libutils.so (android::Thread::_threadLoop(void*)+112)
#10 pc 000603bd /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+72)
#11 pc 0000ea81 /system/lib/libutils.so
#12 pc 000137bb /system/lib/libc.so (__pthread_start(void*)+30)
#13 pc 0001189b /system/lib/libc.so (__start_thread+6)
I'm having android app that heavily uses ffmpeg ported to android. It works pretty well on most devices but crashes on Galaxy Tab 10:
06-20 13:16:36.136 505-561/? D/CrashAnrDetector﹕ Build: samsung/espresso10rfxx/espresso10rf:4.2.2/JDQ39/P5100XXDMJ2:user/release-keys
Hardware: piranha
Revision: 9
Bootloader: unknown
Radio: unknown
Kernel: Linux version 3.0.31-1919150 (se.infra#SEP-107) (gcc version 4.4.1 (Sourcery G++ Lite 2010q1-202) ) #1 SMP PREEMPT Fri Oct 18 15:31:19 KST 2013
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'samsung/espresso10rfxx/espresso10rf:4.2.2/JDQ39/P5100XXDMJ2:user/release-keys'
Revision: '9'
pid: 22003, tid: 22003, name: om.company.project >>> com.company.project <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadbaad
r0 00000027 r1 deadbaad r2 401b5258 r3 00000000
r4 00000000 r5 bebb936c r6 00000004 r7 40d63400
r8 00000000 r9 409d81b0 sl 4000c0d8 fp 00000001
ip 62675144 sp bebb9368 lr 4018854d pc 40184be2 cpsr 60000030
d0 65706d666662696c d1 732e6e6f656e2d67
d2 732e30323763692e d3 2f322d6c6f6f6863
d4 ff00edc0e4c09680 d5 000c000c000c000c
d6 03fc0378033000e0 d7 3f8000003f800000
d8 41c0000000000000 d9 000000a13f000000
d10 0000000000000000 d11 0000000000000000
d12 0000000000000000 d13 0000000000000000
d14 0000000000000000 d15 0000000000000000
d16 00ffffffffffffff d17 004c481a004aca6e
d18 004f4372004dc5c6 d19 00523eca0050c11e
d20 00f5403e00ef803c d21 0101404100fb403f
d22 0000004400000042 d23 0000004700000045
d24 010d404401074042 d25 0119404701134045
d26 0000004300000041 d27 0000004600000044
d28 00f5400000ef8000 d29 0101400000fb4000
d30 0000000100000001 d31 0000000100000001
scr 60000010
backtrace:
#00 pc 0001abe2 /system/lib/libc.so
#01 pc 00018208 /system/lib/libc.so (abort+4)
#02 pc 0066b8e0 /data/app-lib/com.company.project-2/libffmpeg-neon.so
#03 pc 000032b3 /system/bin/linker
#04 pc 0000510b /system/bin/linker
#05 pc 0004f973 /system/lib/libdvm.so (dvmLoadNativeCode(char const*, Object*, char**)+186)
#06 pc 0006681d /system/lib/libdvm.so
#07 pc 000276e0 /system/lib/libdvm.so
#08 pc 0002b5c4 /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
#09 pc 0005fc79 /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+272)
#10 pc 0005fca3 /system/lib/libdvm.so (dvmCallMethod(Thread*, Method const*, Object*, JValue*, ...)+20)
#11 pc 0006ad49 /system/lib/libdvm.so (dvmInitClass+1036)
#12 pc 000225dc /system/lib/libdvm.so (dvmAsmSisterStart+412)
#13 pc 0002b5c4 /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
#14 pc 0005ff4f /system/lib/libdvm.so (dvmInvokeMethod(Object*, Method const*, ArrayObject*, ArrayObject*, ClassObject*, bool)+374)
#15 pc 00067879 /system/lib/libdvm.so
#16 pc 000276e0 /system/lib/libdvm.so
#17 pc 0002b5c4 /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
#18 pc 0005fc79 /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+272)
#19 pc 00049a43 /system/lib/libdvm.so
#20 pc 00047f43 /system/lib/libandroid_runtime.so
#21 pc 000492df /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, char const*)+390)
#22 pc 00000db7 /system/bin/app_process
#23 pc 0001287f /system/lib/libc.so (__libc_init+38)
#24 pc 00000ae8 /system/bin/app_process
stack:
bebb9328 f930001d
bebb932c 5f7a1cc8
bebb9330 4015bcf8 /system/bin/linker
bebb9334 4015bf40 /system/bin/linker
bebb9338 4015c4f4
bebb933c 4015b0ac /system/bin/linker
bebb9340 401b2254 /system/lib/libc.so
bebb9344 401b21b4 /system/lib/libc.so
bebb9348 00000000
bebb934c 4018854d /system/lib/libc.so (_fwalk+32)
bebb9350 00000001
bebb9354 bebb936c [stack]
bebb9358 00000004
bebb935c 40d63400 [heap]
bebb9360 df0027ad
bebb
Since no app symbols are in output (no my methods in JNI code) how can i understand what's wrong? Is it missing .so lib that should be loaded before loading libffmpeg.so ?
Look at the address- DEADBAAD. Notice its in english? That means it was set that way purposely (the odds against it are astronomical). In particular its a value used by the JVM to overwrite pointers inside Java references that are no longer valid. So you're passing a value to C code that is no longer valid, or the C code is holding onto a reference without properly telling the VM it's doing so by incrementing its reference count. This can frequently be a result of a race condition if your code is multithreaded.
You can utilize ndk-stack tool provided by Android NDK.
The details can be found from NDK doc:
android-ndk-r10d\docs\Programmers_Guide\html\md_3__key__topics__debugging__n_d_k-_s_t_a_c_k.htm
This tool basically helps you convert the content in the memory into human-readable debug information. Sometimes, it is extremely helpful.
The following is copied from the NDK document:
The tool can convert the following information
I/DEBUG ( 31): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 31): Build fingerprint: 'generic/google_sdk/generic/:2.2/FRF91/43546:eng/test-keys'
I/DEBUG ( 31): pid: 351, tid: 351 %gt;%gt;%gt; /data/local/ndk-tests/crasher <<<
I/DEBUG ( 31): signal 11 (SIGSEGV), fault addr 0d9f00d8
I/DEBUG ( 31): r0 0000af88 r1 0000a008 r2 baadf00d r3 0d9f00d8
I/DEBUG ( 31): r4 00000004 r5 0000a008 r6 0000af88 r7 00013c44
I/DEBUG ( 31): r8 00000000 r9 00000000 10 00000000 fp 00000000
I/DEBUG ( 31): ip 0000959c sp be956cc8 lr 00008403 pc 0000841e cpsr 60000030
I/DEBUG ( 31): #00 pc 0000841e /data/local/ndk-tests/crasher
I/DEBUG ( 31): #01 pc 000083fe /data/local/ndk-tests/crasher
I/DEBUG ( 31): #02 pc 000083f6 /data/local/ndk-tests/crasher
I/DEBUG ( 31): #03 pc 000191ac /system/lib/libc.so
I/DEBUG ( 31): #04 pc 000083ea /data/local/ndk-tests/crasher
I/DEBUG ( 31): #05 pc 00008458 /data/local/ndk-tests/crasher
I/DEBUG ( 31): #06 pc 0000d362 /system/lib/libc.so
I/DEBUG ( 31):
into the more readable output:
********** Crash dump: **********
Build fingerprint: 'generic/google_sdk/generic/:2.2/FRF91/43546:eng/test-keys'
pid: 351, tid: 351 >>> /data/local/ndk-tests/crasher <<<
signal 11 (SIGSEGV), fault addr 0d9f00d8
Stack frame #00 pc 0000841e /data/local/ndk-tests/crasher : Routine zoo in /tmp/foo/crasher/jni/zoo.c:13
Stack frame #01 pc 000083fe /data/local/ndk-tests/crasher : Routine bar in /tmp/foo/crasher/jni/bar.c:5
Stack frame #02 pc 000083f6 /data/local/ndk-tests/crasher : Routine my_comparison in /tmp/foo/crasher/jni/foo.c:9
Stack frame #03 pc 000191ac /system/lib/libc.so
Stack frame #04 pc 000083ea /data/local/ndk-tests/crasher : Routine foo in /tmp/foo/crasher/jni/foo.c:14
Stack frame #05 pc 00008458 /data/local/ndk-tests/crasher : Routine main in /tmp/foo/crasher/jni/main.c:19
Stack frame #06 pc 0000d362 /system/lib/libc.so
In my project I have a requirement to play live streaming video. I have seen many comments that "live streaming is supported only from 3.0" so that I have to use emulator 3.0. But it does not play. Can anybody help for me.. This is my code:
String SrcPath="http://akamedia2.lsops.net/live/smil:cnbc_en.smil/playlist.m3u8";
myVideoView = new VideoView(this);
myVideoView.setVideoURI(Uri.parse(SrcPath));
setContentView(myVideoView);
myVideoView.setMediaController(new MediaController(this));
myVideoView.requestFocus();
myVideoView.setOnErrorListener(new OnErrorListener() {
public boolean onError(MediaPlayer mp, int what, int extra) {
// TODO Auto-generated method stub
return false;
}
});
myVideoView.setOnPreparedListener(new OnPreparedListener() {
public void onPrepared(MediaPlayer mp) {
// TODO Auto-generated method stub
myVideoView.start();
}
});
The following logcat for this:
Generated scanline__00000177:03515104_00001002_00000000 [ 87 ipp] (110 ins) at [0x477ba6f0:0x477ba8a8] in 606126 ns
V/TLINE ( 360): new: android.text.TextLine#40643358
D/MediaPlayer( 360): Couldn't open file on client side, trying server side
I/ActivityManager( 65): Displayed com.leadapps.android/.LivestreamTest: +1s834ms
D/MediaPlayer( 360): getMetadata
E/MediaPlayerService( 33): getMetadata failed -38
I/LiveSession( 33): onConnect 'http://akamedia2.lsops.net/live/smil:cnbc_en.smil/playlist.m3u8'
I/NuHTTPDataSource( 33): connect to akamedia2.lsops.net:80/live/smil:cnbc_en.smil/playlist.m3u8 #0
D/dalvikvm( 144): GC_EXPLICIT freed 929K, 13% free 14528K/16583K, paused 3ms+3ms
I/NuHTTPDataSource( 33): connect to akamedia2.lsops.net:80/live/smil:cnbc_en.smil/chunklist-b33000.m3u8?wowzasessionid=1036169757 #0
I/NuHTTPDataSource( 33): connect to akamedia2.lsops.net:80/live/smil:cnbc_en.smil/media-b33000_7023.aac?wowzasessionid=1036169757 #0
E/LiveSession( 33): This doesn't look like a transport stream...
I/LiveSession( 33): Retrying with a different bandwidth stream.
I/NuHTTPDataSource( 33): connect to akamedia2.lsops.net:80/live/smil:cnbc_en.smil/chunklist-b120000.m3u8?wowzasessionid=1036169757 #0
I/NuHTTPDataSource( 33): connect to akamedia2.lsops.net:80/live/smil:cnbc_en.smil/media-b120000_7092.ts?wowzasessionid=1036169757 #0
D/dalvikvm( 192): GC_EXPLICIT freed 148K, 5% free 6720K/7047K, paused 4ms+4ms
I/NuHTTPDataSource( 33): connect to akamedia2.lsops.net:80/live/smil:cnbc_en.smil/media-b120000_7093.ts?wowzasessionid=1036169757 #0
I/avc_utils( 33): found AVC codec config (480 x 256, Baseline-profile level 3.0)
I/ESQueue ( 33): found AAC codec config (24000 Hz, 1 channels)
F/ACodec ( 33): frameworks/base/media/libstagefright/ACodec.cpp:1594 CHECK_EQ( omx->allocateNode(componentName.c_str(), observer, &node),(status_t)OK) failed: -2147483648 vs. 0
I/DEBUG ( 31): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 31): Build fingerprint: 'generic/sdk/generic:3.0/HONEYCOMB/104254:eng/test-keys'
I/DEBUG ( 31): pid: 33, tid: 371 >>> /system/bin/mediaserver <<<
I/DEBUG ( 31): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadbaad
I/DEBUG ( 31): r0 deadbaad r1 0000000c r2 00000027 r3 00000000
I/DEBUG ( 31): r4 00000080 r5 aff46658 r6 40706d3c r7 00000000
I/DEBUG ( 31): r8 a801c211 r9 00013000 10 00100000 fp 00000001
I/DEBUG ( 31): ip ffffffff sp 407068e0 lr aff193e9 pc aff15f58 cpsr 00000030
I/DEBUG ( 31): #00 pc 00015f58 /system/lib/libc.so
I/DEBUG ( 31): #01 pc 00001466 /system/lib/liblog.so (__android_log_assert)
I/DEBUG ( 31): #02 pc 00008d90 /system/lib/libstagefright_omx.so (_ZN7android3OMX18CallbackDispatcherC1EPNS_15OMXNodeInstanceE)
I/DEBUG ( 31):
I/DEBUG ( 31): libc base address: aff00000
I/DEBUG ( 31):
I/DEBUG ( 31): code around pc:
I/DEBUG ( 31): aff15f38 68241c23 d1fb2c00 68dae027 d0042a00
I/DEBUG ( 31): aff15f48 20014d18 6028447d 48174790 24802227
I/DEBUG ( 31): aff15f58 f7f57002 2106ea02 eb6ef7f6 0563aa01
I/DEBUG ( 31): aff15f68 60932100 91016051 1c112006 eed4f7f5
I/DEBUG ( 31): aff15f78 2200a905 f7f52002 f7f5eee0 2106e9ee
I/DEBUG ( 31):
I/DEBUG ( 31): code around lr:
I/DEBUG ( 31): aff193c8 b0834a0d 589c447b 26009001 686768a5
I/DEBUG ( 31): aff193d8 220ce008 2b005eab 1c28d003 47889901
I/DEBUG ( 31): aff193e8 35544306 d5f43f01 2c006824 b003d1ee
I/DEBUG ( 31): aff193f8 bdf01c30 00028168 ffffff8c 1c0fb5f0
I/DEBUG ( 31): aff19408 43551c3d a904b087 1c16ac01 604d9004
I/DEBUG ( 31):
I/DEBUG ( 31): stack:
I/DEBUG ( 31): 407068a0 00100000
I/DEBUG ( 31): 407068a4 0000035f
I/DEBUG ( 31): 407068a8 aff416f0 /system/lib/libc.so
I/DEBUG ( 31): 407068ac aff41690 /system/lib/libc.so
I/DEBUG ( 31): 407068b0 00000000
I/DEBUG ( 31): 407068b4 aff193e9 /system/lib/libc.so
I/DEBUG ( 31): 407068b8 00000009
I/DEBUG ( 31): 407068bc aff18459 /system/lib/libc.so
I/DEBUG ( 31): 407068c0 afc01199 /system/lib/liblog.so
I/DEBUG ( 31): 407068c4 00000000
I/DEBUG ( 31): 407068c8 aff46658
I/DEBUG ( 31): 407068cc 40706d3c
I/DEBUG ( 31): 407068d0 00000000
I/DEBUG ( 31): 407068d4 aff186e7 /system/lib/libc.so
I/DEBUG ( 31): 407068d8 df002777
I/DEBUG ( 31): 407068dc e3a070ad
I/DEBUG ( 31): #00 407068e0 407068dc
I/DEBUG ( 31): 407068e4 00000001
I/DEBUG ( 31): 407068e8 a2c386b7 /system/lib/libstagefright.so
I/DEBUG ( 31): 407068ec 00000007
I/DEBUG ( 31): 407068f0 40706914
I/DEBUG ( 31): 407068f4 fffffbdf
I/DEBUG ( 31): 407068f8 00000000
I/DEBUG ( 31): 407068fc a2c386b7 /system/lib/libstagefright.so
I/DEBUG ( 31): 40706900 00000080
I/DEBUG ( 31): 40706904 afc01469 /system/lib/liblog.so
I/DEBUG ( 31): #01 40706908 a2c386b7 /system/lib/libstagefright.so
I/DEBUG ( 31): 4070690c afc01469 /system/lib/liblog.so
I/DEBUG ( 31): 40706910 40706d2c
I/DEBUG ( 31): 40706914 6d617266
I/DEBUG ( 31): 40706918 726f7765
I/DEBUG ( 31): 4070691c 622f736b
I/DEBUG ( 31): 40706920 2f657361
I/DEBUG ( 31): 40706924 6964656d
I/DEBUG ( 31): 40706928 696c2f61
I/DEBUG ( 31): 4070692c 61747362
I/DEBUG ( 31): 40706930 72666567
I/DEBUG ( 31): 40706934 74686769
I/DEBUG ( 31): 40706938 6f43412f
I/DEBUG ( 31): 4070693c 2e636564
I/DEBUG ( 31): 40706940 3a707063
I/DEBUG ( 31): 40706944 34393531
I/DEBUG ( 31): 40706948 45484320
I/DEBUG ( 31): 4070694c 455f4b43
I/DEBUG ( 31): 40706950 6f202851
I/DEBUG ( 31): 40706954 3e2d786d
I/DEBUG ( 31): 40706958 6f6c6c61
I/DEBUG ( 31): 4070695c 65746163
I/DEBUG ( 31): 40706960 65646f4e
I/DEBUG ( 31): 40706964 6d6f6328
I/DEBUG ( 31): 40706968 656e6f70
I/DEBUG ( 31): 4070696c 614e746e
I/DEBUG ( 31): 40706970 632e656d
I/DEBUG ( 31): 40706974 7274735f
I/DEBUG ( 31): 40706978 202c2928
I/DEBUG ( 31): 4070697c 6573626f
I/DEBUG ( 31): 40706980 72657672
I/DEBUG ( 31): 40706984 6e26202c
I/DEBUG ( 31): 40706988 2965646f
I/DEBUG ( 31): 4070698c 7473282c
I/DEBUG ( 31): 40706990 73757461
I/DEBUG ( 31): 40706994 4f29745f
I/DEBUG ( 31): 40706998 6620294b
I/DEBUG ( 31): 4070699c 656c6961
I/DEBUG ( 31): 407069a0 2d203a64
I/DEBUG ( 31): 407069a4 37343132
I/DEBUG ( 31): 407069a8 36333834
I/DEBUG ( 31): 407069ac 76203834
I/DEBUG ( 31): 407069b0 30202e73
I/DEBUG ( 31): 407069b4 00000000
I/DEBUG ( 31): 407069b8 40706a40
I/DEBUG ( 31): 407069bc 00000000
I/DEBUG ( 31): 407069c0 ffffffff
I/DEBUG ( 31): 407069c4 b00094e8 /system/bin/linker
I/DEBUG ( 31): 407069c8 00000000
I/DEBUG ( 31): 407069cc 00000000
I/DEBUG ( 31): 407069d0 a801c211 /system/lib/libutils.so
I/DEBUG ( 31): 407069d4 407069d4
I/DEBUG ( 31): 407069d8 b00053d1 /system/bin/linker
I/DEBUG ( 31): 407069dc b000a04c
I/DEBUG ( 31): 407069e0 b000a087
I/DEBUG ( 31): 407069e4 b000a34b
I/DEBUG ( 31): 407069e8 0000003b
I/DEBUG ( 31): 407069ec 40706a34
I/DEBUG ( 31): 407069f0 00000002
I/DEBUG ( 31): 407069f4 38303131
I/DEBUG ( 31): 407069f8 00000000
I/DEBUG ( 31): 407069fc 80008e83 /system/lib/libstagefright_foundation.so
I/DEBUG ( 31): 40706a00 00000000
I/DEBUG ( 31): 40706a04 00000001
I/DEBUG ( 31): 40706a08 00000003
I/DEBUG ( 31): 40706a0c 40706b80
I/DEBUG ( 31): 40706a10 00000070
I/DEBUG ( 31): 40706a14 00000000
I/DEBUG ( 31): 40706a18 40706aa8
I/DEBUG ( 31): 40706a1c 000000c0
I/DEBUG ( 31): 40706a20 b000952c /system/bin/linker
I/DEBUG ( 31): 40706a24 00000454
I/DEBUG ( 31): 40706a28 40706a8c
I/DEBUG ( 31): 40706a2c b0004c35 /system/bin/linker
I/DEBUG ( 31): 40706a30 b0007120 /system/bin/linker
I/DEBUG ( 31): 40706a34 b0006bb8 /system/bin/linker
I/DEBUG ( 31): 40706a38 00000454
I/DEBUG ( 31): 40706a3c a300b042 /system/lib/libstagefright_omx.so
I/DEBUG ( 31): 40706a40 00000018
I/DEBUG ( 31): 40706a44 40706b80
I/DEBUG ( 31): 40706a48 00000003
I/DEBUG ( 31): 40706a4c 8000595b /system/lib/libstagefright_foundation.so
I/DEBUG ( 31): 40706a50 40706b80
I/DEBUG ( 31): 40706a54 40706a9c
I/DEBUG ( 31): 40706a58 00000003
I/DEBUG ( 31): 40706a5c a2c25f9d /system/lib/libstagefright.so
I/DEBUG ( 31): 40706a60 ffffffff
I/DEBUG ( 31): 40706a64 00000000
I/DEBUG ( 31): 40706a68 4089501b
I/DEBUG ( 31): 40706a6c b00094e8 /system/bin/linker
I/DEBUG ( 31): 40706a70 a78e7cd8
I/DEBUG ( 31): 40706a74 00000000
I/DEBUG ( 31): 40706a78 a78e7cd8
I/DEBUG ( 31): 40706a7c 00000000
I/DEBUG ( 31): 40706a80 000005f8
I/DEBUG ( 31): 40706a84 00000002
I/DEBUG ( 31): 40706a88 0001c2c0 [heap]
I/DEBUG ( 31): 40706a8c 7379732f
I/DEBUG ( 31): 40706a90 2f6d6574
I/DEBUG ( 31): 40706a94 2f62696c
I/DEBUG ( 31): 40706a98 7362696c
I/DEBUG ( 31): 40706a9c 65676174
I/DEBUG ( 31): 40706aa0 67697266
I/DEBUG ( 31): 40706aa4 77687468
I/DEBUG ( 31): 40706aa8 006f732e
I/DEBUG ( 31): 40706aac afb04a3c /system/lib/libcutils.so
I/DEBUG ( 31): 40706ab0 0000f438 [heap]
I/DEBUG ( 31): 40706ab4 40706afc
I/DEBUG ( 31): 40706ab8 00000009
I/DEBUG ( 31): 40706abc a8015049 /system/lib/libutils.so
I/DEBUG ( 31): 40706ac0 0000f428 [heap]
I/DEBUG ( 31): 40706ac4 0000f438 [heap]
I/DEBUG ( 31): 40706ac8 00000009
I/DEBUG ( 31): 40706acc a8015165 /system/lib/libutils.so
I/DEBUG ( 31): 40706ad0 0000f3d8 [heap]
I/DEBUG ( 31): 40706ad4 40706afc
I/DEBUG ( 31): 40706ad8 fffffffc
I/DEBUG ( 31): 40706adc 00000000
I/DEBUG ( 31): 40706ae0 40706afc
I/DEBUG ( 31): 40706ae4 a81147b5 /system/lib/libbinder.so
I/DEBUG ( 31): 40706ae8 40706c48
I/DEBUG ( 31): 40706aec a811a575 /system/lib/libbinder.so
I/DEBUG ( 31): 40706af0 00000030
I/DEBUG ( 31): 40706af4 00000000
I/DEBUG ( 31): 40706af8 00024230 [heap]
I/DEBUG ( 31): 40706afc 0000f3d8 [heap]
I/DEBUG ( 31): 40706b00 40706b18
I/DEBUG ( 31): 40706b04 40706c48
I/DEBUG ( 31): 40706b08 00000000
I/DEBUG ( 31): 40706b0c 40009028 /dev/binder
I/DEBUG ( 31): 40706b10 40009038 /dev/binder
I/DEBUG ( 31): 40706b14 a811a5a1 /system/lib/libbinder.so
I/DEBUG ( 31): 40706b18 00000000
I/DEBUG ( 31): 40706b1c a801c211 /system/lib/libutils.so
I/DEBUG ( 31): 40706b20 40706c48
I/DEBUG ( 31): 40706b24 00000010
I/DEBUG ( 31): 40706b28 40009028 /dev/binder
I/DEBUG ( 31): 40706b2c a811a5fb /system/lib/libbinder.so
I/DEBUG ( 31): 40706b30 40009038 /dev/binder
I/DEBUG ( 31): 40706b34 00000000
I/DEBUG ( 31): 40706b38 ffffff20
I/DEBUG ( 31): 40706b3c a8123204 /system/lib/libbinder.so
I/DEBUG ( 31): 40706b40 000241d0 [heap]
I/DEBUG ( 31): 40706b44 a81165b7 /system/lib/libbinder.so
I/DEBUG ( 31): 40706b48 00000001
I/DEBUG ( 31): 40706b4c a81164c1 /system/lib/libbinder.so
I/DEBUG ( 31): 40706b50 000241d0 [heap]
I/DEBUG ( 31): 40706b54 a8123204 /system/lib/libbinder.so
I/DEBUG ( 31): 40706b58 40706c78
I/DEBUG ( 31): 40706b5c 000241d0 [heap]
I/DEBUG ( 31): 40706b60 00024200 [heap]
I/DEBUG ( 31): 40706b64 40706c48
I/DEBUG ( 31): 40706b68 00000060
I/DEBUG ( 31): 40706b6c 00000000
I/DEBUG ( 31): 40706b70 00000000
I/DEBUG ( 31): 40706b74 00000000
I/DEBUG ( 31): 40706b78 00000000
I/DEBUG ( 31): 40706b7c 00000000
I/DEBUG ( 31): 40706b80 000003e8
I/DEBUG ( 31): 40706b84 00000010
I/DEBUG ( 31): 40706b88 00000004
I/DEBUG ( 31): 40706b8c 40009028 /dev/binder
I/DEBUG ( 31): 40706b90 40009038 /dev/binder
I/DEBUG ( 31): 40706b94 4ab3df53
I/DEBUG ( 31): 40706b98 00000009
I/DEBUG ( 31): 40706b9c 0000f43c [heap]
I/DEBUG ( 31): 40706ba0 ffffffff
I/DEBUG ( 31): 40706ba4 40706bfc
I/DEBUG ( 31): 40706ba8 a801c211 /system/lib/libutils.so
I/DEBUG ( 31): 40706bac afb04a3c /system/lib/libcutils.so
I/DEBUG ( 31): 40706bb0 0000f438 [heap]
I/DEBUG ( 31): 40706bb4 40706bfc
I/DEBUG ( 31): 40706bb8 0000003b
I/DEBUG ( 31): 40706bbc 0000003b
I/DEBUG ( 31): 40706bc0 b000a04c
I/DEBUG ( 31): 40706bc4 a801c211 /system/lib/libutils.so
I/DEBUG ( 31): 40706bc8 00013000 [heap]
I/DEBUG ( 31): 40706bcc 00100000
I/DEBUG ( 31): 40706bd0 00000001
I/DEBUG ( 31): 40706bd4 b00120d9
I/DEBUG ( 31): 40706bd8 40706c2c
I/DEBUG ( 31): 40706bdc b0005405 /system/bin/linker
I/DEBUG ( 31): 40706be0 b00053d1 /system/bin/linker
I/DEBUG ( 31): 40706be4 00000006
I/DEBUG ( 31): 40706be8 00000000
I/DEBUG ( 31): 40706bec aff10ed4 /system/lib/libc.so
I/DEBUG ( 31): 40706bf0 00000000
I/DEBUG ( 31): 40706bf4 aff10ed4 /system/lib/libc.so
I/DEBUG ( 31): 40706bf8 00000033
I/DEBUG ( 31): 40706bfc 000245d8 [heap]
I/DEBUG ( 31): 40706c00 000001b4
I/DEBUG ( 31): 40706c04 c0000000
I/DEBUG ( 31): 40706c08 a801c211 /system/lib/libutils.so
I/DEBUG ( 31): 40706c0c 00013000 [heap]
I/DEBUG ( 31): 40706c10 00100000
I/DEBUG ( 31): 40706c14 aff1402b /system/lib/libc.so
I/DEBUG ( 31): 40706c18 000001b4
I/DEBUG ( 31): 40706c1c c0000000
I/DEBUG ( 31): 40706c20 00000000
I/DEBUG ( 31): 40706c24 aff10ed4 /system/lib/libc.so
I/DEBUG ( 31): 40706c28 000000da
I/DEBUG ( 31): 40706c2c 00007a08
I/DEBUG ( 31): 40706c30 000001b4
I/DEBUG ( 31): 40706c34 c0000000
I/DEBUG ( 31): 40706c38 a801c211 /system/lib/libutils.so
I/DEBUG ( 31): 40706c3c 00013000 [heap]
I/DEBUG ( 31): 40706c40 00100000
I/DEBUG ( 31): 40706c44 aff12d45 /system/lib/libc.so
I/DEBUG ( 31): 40706c48 00000000
I/DEBUG ( 31): 40706c4c aff10ed4 /system/lib/libc.so
I/DEBUG ( 31): 40706c50 00000013
I/DEBUG ( 31): 40706c54 000245a8 [heap]
I/DEBUG ( 31): 40706c58 300001b4
I/DEBUG ( 31): 40706c5c 4ab3df53
I/DEBUG ( 31): 40706c60 a801c211 /system/lib/libutils.so
I/DEBUG ( 31): 40706c64 00000000
I/DEBUG ( 31): 40706c68 00000000
I/DEBUG ( 31): 40706c6c aff10ed4 /system/lib/libc.so
I/DEBUG ( 31): 40706c70 00000013
I/DEBUG ( 31): 40706c74 000245d0 [heap]
I/DEBUG ( 31): 40706c78 000001b4
I/DEBUG ( 31): 40706c7c c0000000
I/DEBUG ( 31): 40706c80 a801c211 /system/lib/libutils.so
I/DEBUG ( 31): 40706c84 00013000 [heap]
I/DEBUG ( 31): 40706c88 00100000
I/DEBUG ( 31): 40706c8c aff1402b /system/lib/libc.so
I/DEBUG ( 31): 40706c90 7fffffff
I/DEBUG ( 31): 40706c94 00000020
I/DEBUG ( 31): 40706c98 a801c211 /system/lib/libutils.so
I/DEBUG ( 31): 40706c9c 00013000 [heap]
I/DEBUG ( 31): 40706ca0 00000000
I/DEBUG ( 31): 40706ca4 aff10ed4 /system/lib/libc.so
I/DEBUG ( 31): 40706ca8 000245c8 [heap]
I/DEBUG ( 31): 40706cac 000245c8 [heap]
I/DEBUG ( 31): 40706cb0 00000010
I/DEBUG ( 31): 40706cb4 000000a0
I/DEBUG ( 31): 40706cb8 00000000
I/DEBUG ( 31): 40706cbc aff10ed4 /system/lib/libc.so
I/DEBUG ( 31): 40706cc0 000245c8 [heap]
I/DEBUG ( 31): 40706cc4 000245c8 [heap]
I/DEBUG ( 31): 40706cc8 000000a8
I/DEBUG ( 31): 40706ccc 000000c0
I/DEBUG ( 31): 40706cd0 a801c211 /system/lib/libutils.so
I/DEBUG ( 31): 40706cd4 00013000 [heap]
I/DEBUG ( 31): 40706cd8 00100000
I/DEBUG ( 31): 40706cdc aff14461 /system/lib/libc.so
I/DEBUG ( 31): 40706ce0 00000000
I/DEBUG ( 31): 40706ce4 000245d0 [heap]
I/DEBUG ( 31): 40706ce8 00000011
I/DEBUG ( 31): 40706cec 000245a8 [heap]
I/DEBUG ( 31): 40706cf0 00000000
I/DEBUG ( 31): 40706cf4 a801c211 /system/lib/libutils.so
I/DEBUG ( 31): 40706cf8 00013000 [heap]
I/DEBUG ( 31): 40706cfc 00100000
I/DEBUG ( 31): 40706d00 00000001
I/DEBUG ( 31): 40706d04 0002465f [heap]
I/DEBUG ( 31): 40706d08 40706d3c
I/DEBUG ( 31): 40706d0c 8000774b /system/lib/libstagefright_foundation.so
I/DEBUG ( 31): 40706d10 40706d48
I/DEBUG ( 31): 40706d14 4ab3df53
I/DEBUG ( 31): 40706d18 000245a8 [heap]
I/DEBUG ( 31): 40706d1c a3008d95 /system/lib/libstagefright_omx.so
I/DEBUG ( 31): 40706d20 40706d48
I/DEBUG ( 31): 40706d24 a2b4d3a3 /system/lib/libstagefright.so
W/AudioSystem( 65): AudioPolicyService server died!
W/AudioSystem( 360): AudioFlinger server died!
W/IMediaDeathNotifier( 360): media server died
E/MediaPlayer( 360): error (100, 0)
E/MediaPlayer( 360): Error (100,0)
D/VideoView( 360): Error: 100,0
I/ee ( 360): ==============100
W/AudioSystem( 131): AudioFlinger server died!
W/AudioSystem( 131): AudioPolicyService server died!
I/ServiceManager( 28): service 'media.audio_flinger' died
I/ServiceManager( 28): service 'media.player' died
I/ServiceManager( 28): service 'media.camera' died
I/ServiceManager( 28): service 'media.audio_policy' died
I/BootReceiver( 65): Copying /data/tombstones/tombstone_01 to DropBox (SYSTEM_TOMBSTONE)
D/dalvikvm( 360): GC_FOR_ALLOC freed 62K, 3% free 6407K/6599K, paused 124ms
String SrcPath="http://akamedia2.lsops.net/live/smil:cnbc_en.smil/playlist.m3u8";
myVideoView = new VideoView(this);
myVideoView.setVideoURI(Uri.parse(SrcPath));
setContentView(myVideoView);
myVideoView.setMediaController(new MediaController(this));
myVideoView.requestFocus();
Remove this line.
myVideoView.requestFocus();
According to some threads, you should use httplive:// scheme for version 2.3 and 3.0 and the http:// scheme for 3.0+: How to play m3u8 on Android?
It worked on my 2.3 device but I'm not sure if it wold work on an emulator. Moreover, I made it work using the m3u8 test URI ( http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8 ) of apple. I can't still make it work using the my own URI.
I am pretty new to working with JNI on Android, and I've been writing an app that requires the implementation of JNI_OnLoad.. I've perused the internet for help, and it seems like a lot of different documents conflict in how this function should be implemented. Nevertheless, I went with a method that seemed to work on my emulator but not on my device.
LogCat produces the following:
D/dalvikvm(11317): Trying to load lib /data/app/libHelloAndroid.so 0xb6db9f50
D/dalvikvm(11317): Added shared lib /data/app/libHelloAndroid.so 0xb6db9f50
I/DEBUG ( 1244): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 1244): Build fingerprint: 'generic/mfld_cdk/mfld_cdk:2.3.3/GRI40/eng.gerrit2.20110607.120237:eng/test-keys'
I/DEBUG ( 1244): pid: 11317, tid: 11317 >>> com.example.helloandroid <<<
I/DEBUG ( 1244): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000001
I/DEBUG ( 1244): eax 09353b90 ebx 8293910c ecx 00000300 edx 00000001
I/DEBUG ( 1244): esi 094313e0 edi 84400395
I/DEBUG ( 1244): xcs 00000073 xds 0000007b xes 0000007b xfs 00000000 xss 0000007b
I/DEBUG ( 1244): eip 8440039d ebp bf859e70 esp bf859e00 flags 00010206
I/DEBUG ( 1244): #00
I/DEBUG ( 1244): eip: 8440039d /data/app/libHelloAndroid.so (JNI_OnLoad)
I/DEBUG ( 1244): #01
I/DEBUG ( 1244): eip: 828a8df9 /system/lib/libdvm.so (Dalvik_java_lang_Runtime_nativeLoad)
I/DEBUG ( 1244): #02
I/DEBUG ( 1244): eip: 82831cd9 /system/lib/libdvm.so
I/DEBUG ( 1244): #03
I/DEBUG ( 1244): eip: b680ec7c
I/DEBUG ( 1244): #04
I/DEBUG ( 1244): eip: 0004011a
I/DEBUG ( 1244): #05
I/DEBUG ( 1244): eip: ffffffff
I/DEBUG ( 1244): #06
I/DEBUG ( 1244): eip: ffffffff
I/DEBUG ( 1244): #07
I/DEBUG ( 1244): eip: ffffffff
I/DEBUG ( 1244): stack:
I/DEBUG ( 1244): #00
I/DEBUG ( 1244): bf859e00 a901b083
I/DEBUG ( 1244): bf859e04 8287da14 /system/lib/libdvm.so (dvmLoadNativeCode)
I/DEBUG ( 1244): bf859e08 09353b90 [heap] (dvmLoadNativeCode)
I/DEBUG ( 1244): bf859e0c 00000000 (dvmLoadNativeCode)
I/DEBUG ( 1244): bf859e10 8291f9bf /system/lib/libdvm.so
I/DEBUG ( 1244): bf859e14 094313e0 [heap]
I/DEBUG ( 1244): bf859e18 b6db9f50 /dev/ashmem/dalvik-heap (deleted)
I/DEBUG ( 1244): bf859e1c 8293910c /system/lib/libdvm.so
I/DEBUG ( 1244): bf859e20 bf859e70 [stack]
I/DEBUG ( 1244): bf859e24 82888b77 /system/lib/libdvm.so (dvmCreateCstrFromString)
I/DEBUG ( 1244): bf859e28 0000001d (dvmCreateCstrFromString)
I/DEBUG ( 1244): bf859e2c bf859ea0 [stack] (dvmCreateCstrFromString)
I/DEBUG ( 1244): bf859e30 b632ea84 /dev/ashmem/dalvik-LinearAlloc (deleted) (dvmCreateCstrFromString)
I/DEBUG ( 1244): bf859e34 00000001 (dvmCreateCstrFromString)
I/DEBUG ( 1244): bf859e38 00000000 (dvmCreateCstrFromString)
I/DEBUG ( 1244): bf859e3c 09431418 [heap] (dvmCreateCstrFromString)
I/DEBUG ( 1244): ...... ......
I/DEBUG ( 1244): #01
I/DEBUG ( 1244): bf859e74 828a8df9 /system/lib/libdvm.so (Dalvik_java_lang_Runtime_nativeLoad)
I/DEBUG ( 1244): bf859e78 094313e0 [heap] (Dalvik_java_lang_Runtime_nativeLoad)
I/DEBUG ( 1244): bf859e7c b6db9f50 /dev/ashmem/dalvik-heap (deleted) (Dalvik_java_lang_Runtime_nativeLoad)
I/DEBUG ( 1244): bf859e80 bf859e94 [stack] (Dalvik_java_lang_Runtime_nativeLoad)
I/DEBUG ( 1244): bf859e84 b55611c2 /data/dalvik-cache/data#app#com.example.helloandroid-2.apk#classes.dex (Dalvik_java_lang_Runtime_nativeLoad)
I/DEBUG ( 1244): bf859e88 8289ac09 /system/lib/libdvm.so (dvmGetCaller2Class)
I/DEBUG ( 1244): bf859e8c 8293910c /system/lib/libdvm.so (dvmGetCaller2Class)
I/DEBUG ( 1244): bf859e90 bf859eb0 [stack] (dvmGetCaller2Class)
I/DEBUG ( 1244): bf859e94 00000000 (dvmGetCaller2Class)
I/DEBUG ( 1244): bf859e98 b680ec3c (dvmGetCaller2Class)
I/DEBUG ( 1244): bf859e9c b680eb78 (dvmGetCaller2Class)
I/DEBUG ( 1244): bf859ea0 094314e0 [heap] (dvmGetCaller2Class)
I/DEBUG ( 1244): bf859ea4 00000020 (dvmGetCaller2Class)
I/DEBUG ( 1244): bf859ea8 b5fa27fc /data/dalvik-cache/system#framework#core.jar#classes.dex (dvmGetCaller2Class)
I/DEBUG ( 1244): bf859eac b680ec24 (dvmGetCaller2Class)
I/DEBUG ( 1244): bf859eb0 bf859f50 [stack] (dvmGetCaller2Class)
I/DEBUG ( 1244): ...... ......
I/DEBUG ( 1244): #02
I/DEBUG ( 1244): bf859eb4 82831cd9 /system/lib/libdvm.so
I/DEBUG ( 1244): bf859eb8 b680ec04
I/DEBUG ( 1244): bf859ebc bf859f58 [stack]
I/DEBUG ( 1244): bf859ec0 b63f8f60 /dev/ashmem/dalvik-LinearAlloc (deleted)
I/DEBUG ( 1244): bf859ec4 09355e68 [heap]
I/DEBUG ( 1244): bf859ec8 b6dbcfa8 /dev/ashmem/dalvik-heap (deleted)
I/DEBUG ( 1244): bf859ecc 09355e68 [heap]
I/DEBUG ( 1244): bf859ed0 b680ebec
I/DEBUG ( 1244): bf859ed4 09355e68 [heap]
I/DEBUG ( 1244): bf859ed8 bf859f4c [stack]
I/DEBUG ( 1244): bf859edc 00000000
I/DEBUG ( 1244): bf859ee0 82c03d68
I/DEBUG ( 1244): bf859ee4 00002000
I/DEBUG ( 1244): bf859ee8 bf859e14 [stack]
I/DEBUG ( 1244): bf859eec bf859f50 [stack]
I/DEBUG ( 1244): bf859ef0 bf859f50 [stack]
I/DEBUG ( 1244): ...... ......
I/DEBUG ( 1244): #03
I/DEBUG ( 1244): #04
I/DEBUG ( 1244): b5560980 0004011a
I/DEBUG ( 1244): b5560984 00022071
I/DEBUG ( 1244): b5560988 001a0010
I/DEBUG ( 1244): b556098c 10710001
I/DEBUG ( 1244): b5560990 00000027
I/DEBUG ( 1244): b5560994 0034001a
I/DEBUG ( 1244): b5560998 0035011a
I/DEBUG ( 1244): b556099c 00022071
I/DEBUG ( 1244): b55609a0 000e0010
I/DEBUG ( 1244): b55609a4 00010002
I/DEBUG ( 1244): b55609a8 00000002
I/DEBUG ( 1244): b55609ac 00001358
I/DEBUG ( 1244): b55609b0 0000000b
I/DEBUG ( 1244): b55609b4 00001070
I/DEBUG ( 1244): b55609b8 00220001
I/DEBUG ( 1244): b55609bc 2070000c
I/DEBUG ( 1244): ...... ......
I/DEBUG ( 1244): #05
I/DEBUG ( 1244): #06
I/DEBUG ( 1244): #07
The following is my JNI_OnLoad implementation...
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved)
{
LOGI("Executing JNI_OnLoad");
JNIEnv *env;
jint onLoad_err = -1;
jclass k;
static const char* const strClassName="com/example/helloandroid/HelloAndroid";
cached_jvm = vm;
// Checks JNI version
if((*vm)->GetEnv(vm, (void**) &env, JNI_VERSION_1_4) != JNI_OK){
LOGE("JNI Check failure");
return onLoad_err;
}
// Checks if environment is null
if (env == NULL) {
LOGE("Env is NULL");
return onLoad_err;
}
k = (*env)->FindClass(env, strClassName);
if(k == NULL){
LOGE("Find Class returns NULL");
return onLoad_err;
}
if ((*env)->RegisterNatives(env, k, methods, sizeof(methods)/sizeof(methods[0])) != JNI_OK){
LOGE("Method registration failure");
return onLoad_err;
}
LOGI("Successfully executed JNI_onLoad");
return JNI_VERSION_1_4;
}
Is there something specific about native code that makes it act differently on an emulator than on an actual device? Or do I need to do more in JNI_OnLoad?
Thanks in advance!
There's nothing you should need to do to run on a device that isn't already done on the emulator.
I notice from your log that your device is an x86 type device. The emulator is an ARM processor... are you trying to run ARM code or x86 code on your device?
User of my Android app says that it's crashing, without the force close dialog - the Activity just disappears and homescreen is shown. He sent this error log, what does it mean?
I/DEBUG ( 1337): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 1337): Build fingerprint: 'verizon/inc/inc/inc:2.1-update1/ERE27/161494:user/release-keys'
I/DEBUG ( 1337): pid: 13046, tid: 13059 >>> cz.fhejl.pubtran <<<
I/DEBUG ( 1337): signal 11 (SIGSEGV), fault addr 0000000b
I/DEBUG ( 1337): r0 00000003 r1 000000ab r2 00000008 r3 00000002
I/DEBUG ( 1337): r4 46d29d3e r5 43057f08 r6 4730cca8 r7 00000846
I/DEBUG ( 1337): r8 ad0100c0 r9 00000008 10 45052698 fp 003722a0
I/DEBUG ( 1337): ip 00000046 sp 4730cc68 lr ad014bb8 pc ad01125c cpsr 20000010
I/DEBUG ( 1337): #00 pc 0001125c /system/lib/libdvm.so
I/DEBUG ( 1337): #01 pc 0001ac10 /system/lib/libdvm.so
I/DEBUG ( 1337): #02 pc 0001a0c4 /system/lib/libdvm.so
I/DEBUG ( 1337): #03 pc 00050fe0 /system/lib/libdvm.so
I/DEBUG ( 1337): #04 pc 00051012 /system/lib/libdvm.so
I/DEBUG ( 1337): #05 pc 00045598 /system/lib/libdvm.so
I/DEBUG ( 1337): #06 pc 00010010 /system/lib/libc.so
I/DEBUG ( 1337): #07 pc 0000fae4 /system/lib/libc.so
I/DEBUG ( 1337):
I/DEBUG ( 1337): code around pc:
I/DEBUG ( 1337): ad01124c e7950102 e7951103 e3500000 0a000f66
I/DEBUG ( 1337): ad01125c e5903008 e0800101 e1510003 2a000f49
I/DEBUG ( 1337): ad01126c e1f470b4 e5902010 e207c0ff e7852109
I/DEBUG ( 1337):
I/DEBUG ( 1337): code around lr:
I/DEBUG ( 1337): ad014ba8 112fff10 ea000003 e1a00004 fa01340e
I/DEBUG ( 1337): ad014bb8 e3500000 112fff10 e5054008 e24f800c
I/DEBUG ( 1337): ad014bc8 e2488c4b e1d470b0 e5960038 e3500000
I/DEBUG ( 1337):
I/DEBUG ( 1337): stack:
I/DEBUG ( 1337): 4730cc28 000003a0
I/DEBUG ( 1337): 4730cc2c 4513aca8 /dev/ashmem/mspace/dalvik-heap/2 (deleted)
I/DEBUG ( 1337): 4730cc30 00000018
I/DEBUG ( 1337): 4730cc34 ad01859c /system/lib/libdvm.so
I/DEBUG ( 1337): 4730cc38 40036740 /dev/ashmem/mspace/dalvik-heap/zygote/0 (deleted)
I/DEBUG ( 1337): 4730cc3c 43057f08
I/DEBUG ( 1337): 4730cc40 ad08b368 /system/lib/libdvm.so
I/DEBUG ( 1337): 4730cc44 00000322
I/DEBUG ( 1337): 4730cc48 ad0100c0 /system/lib/libdvm.so
I/DEBUG ( 1337): 4730cc4c 46d29c32 /data/dalvik-cache/data#app#cz.fhejl.pubtran.apk#classes.dex
I/DEBUG ( 1337): 4730cc50 45052698 /dev/ashmem/mspace/dalvik-heap/2 (deleted)
I/DEBUG ( 1337): 4730cc54 ad046099 /system/lib/libdvm.so
I/DEBUG ( 1337): 4730cc58 46d29c32 /data/dalvik-cache/data#app#cz.fhejl.pubtran.apk#classes.dex
I/DEBUG ( 1337): 4730cc5c 46d29d38 /data/dalvik-cache/data#app#cz.fhejl.pubtran.apk#classes.dex
I/DEBUG ( 1337): 4730cc60 df002777
I/DEBUG ( 1337): 4730cc64 e3a070ad
I/DEBUG ( 1337): #00 4730cc68 00000000
I/DEBUG ( 1337): 4730cc6c 4730cca8
I/DEBUG ( 1337): 4730cc70 00015fc8 [heap]
I/DEBUG ( 1337): 4730cc74 ad01aba8 /system/lib/libdvm.so
I/DEBUG ( 1337): 4730cc78 43057fe4
I/DEBUG ( 1337): 4730cc7c ad08ddc8 /system/lib/libdvm.so
I/DEBUG ( 1337): 4730cc80 4730ced8
I/DEBUG ( 1337): 4730cc84 429ee550 /data/dalvik-cache/system#framework#framework.jar#classes.dex
I/DEBUG ( 1337): 4730cc88 003722a0 [heap]
I/DEBUG ( 1337): 4730cc8c ad01ac14 /system/lib/libdvm.so
I/DEBUG ( 1337): #01 4730cc90 003722a0 [heap]
I/DEBUG ( 1337): 4730cc94 4730cca8
I/DEBUG ( 1337): 4730cc98 ad01aba8 /system/lib/libdvm.so
I/DEBUG ( 1337): 4730cc9c ad01a0c8 /system/lib/libdvm.so
This is log output, after the moment it crashes. My app doesn't use NDK, it uses Android Library Project and I'm loading some classes via Class.forName(...).
It's crashing inside the Dalvik VM. I'm not able to decode the stack trace (private verizon build). A fault address of 0000000b doesn't sound like a null pointer dereference... maybe a data structure inside the VM got corrupted?
Has this been run on a variety of devices and only this one has a problem? Do you know if other people with the same device have this issue? I'm wondering if something got corrupted, and uninstall/reinstall of your app would help.