I have a strange problem that I don't know how to face.
My application uses a WebView to load a HTML app. It is a long and complex app, that also involves JavaScriptInterfaces.
Lately I am getting Core Dumps in the native webcore module that kill the whole activity.
It happens sometimes, but frequently, let's say 1 of every 5 times.
It always happens while WebView is loading the app, but on different places. It looks like a call to an exported Java function is involved, but not a specific one. I've refactored a zillion times everything and, while sometimes it seems resolved, it's just a matter of luck. Suddenly it fails again.
If WebView finishes loading and initing the app, it NEVER crashes. It only happens during load/init/start execution.
The only pattern that nearly always appears is, it looks like it always crashes in the same place:
I/DEBUG (30186): #00 pc 003a37a4 /system/lib/libwebcore.so (_ZNK5Layer8getChildEi)
I/DEBUG (30186): #01 pc 00285bae /system/lib/libwebcore.so
I/DEBUG (30186): #02 pc 0001edb0 /system/lib/libdvm.so (dvmPlatformInvoke)
I/DEBUG (30186): #03 pc 000594ba /system/lib/libdvm.so (_Z16dvmCallJNIMethodPKjP6JValuePK6MethodP6Thread)
Of course, I know this is an incomplete question, I'll post anything on request, but I'd like to answer if somebody has an idea on how can I guess what's more or less going on, I mean, can I look somewhere with this stack trace?? I am completely lost when it comes to the Android Native Layer.
If only I knew any relation to the crash I could refactor Java or JavaScript, but I'm completely blind, and as much as I have moved everything nothing seems to improve....
Thanks in advance !!!
PD- I am on ICS v.4.04 with a Samsung Galaxy Tab 10.1
/libc ( 575): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1)
I/DEBUG (30186): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG (30186): Build fingerprint: 'samsung/GT-P7500/GT-P7500:4.0.4/IMM76D/XXLQ8:user/release-keys'
I/DEBUG (30186): pid: 575, tid: 591 >>> com.regaliz.libneo <<<
I/DEBUG (30186): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
I/DEBUG (30186): r0 0117f608 r1 00000000 r2 00feb880 r3 00000000
I/DEBUG (30186): r4 00feb880 r5 00ffb568 r6 00000007 r7 50fbfe0c
I/DEBUG (30186): r8 5bf04c10 r9 50fbfe04 10 00000000 fp 5bf04c24
I/DEBUG (30186): ip 5a229ba5 sp 5bf04c08 lr 5a229bb3 pc 5a3477a4 cpsr 800f3430
I/DEBUG (30186): d0 0000000042c80000 d1 0000000043ae0000
I/DEBUG (30186): d2 3f00000043ae0000 d3 43ae000041c80000
I/DEBUG (30186): d4 00000000432e0000 d5 411efaf800000000
I/DEBUG (30186): d6 3fe03e1c9b413986 d7 41d4634c06a07c39
I/DEBUG (30186): d8 0000000000000000 d9 0000000000000000
I/DEBUG (30186): d10 0000000000000000 d11 0000000000000000
I/DEBUG (30186): d12 0000000000000000 d13 0000000000000000
I/DEBUG (30186): d14 0000000000000000 d15 0000000000000000
I/DEBUG (30186): scr 20000011
I/DEBUG (30186):
I/DEBUG (30186): #00 pc 003a37a4 /system/lib/libwebcore.so (_ZNK5Layer8getChildEi)
I/DEBUG (30186): #01 pc 00285bae /system/lib/libwebcore.so
I/DEBUG (30186): #02 pc 0001edb0 /system/lib/libdvm.so (dvmPlatformInvoke)
I/DEBUG (30186): #03 pc 000594ba /system/lib/libdvm.so (_Z16dvmCallJNIMethodPKjP6JValuePK6MethodP6Thread)
I/DEBUG (30186): #04 pc 00030c0c /system/lib/libdvm.so
I/DEBUG (30186): #05 pc 000343e4 /system/lib/libdvm.so (_Z12dvmInterpretP6ThreadPK6MethodP6JValue)
I/DEBUG (30186): #06 pc 0006ce76 /system/lib/libdvm.so (_Z14dvmCallMethodVP6ThreadPK6MethodP6ObjectbP6JValueSt9__va_list)
I/DEBUG (30186): #07 pc 0006ce98 /system/lib/libdvm.so (_Z13dvmCallMethodP6ThreadPK6MethodP6ObjectP6JValuez)
I/DEBUG (30186): #08 pc 0005ffe0 /system/lib/libdvm.so
I/DEBUG (30186): #09 pc 00013048 /system/lib/libc.so (__thread_entry)
I/DEBUG (30186): #10 pc 00012b74 /system/lib/libc.so (pthread_create)
I/DEBUG (30186):
I/DEBUG (30186): code around pc:
I/DEBUG (30186): 5a347784 47a868e1 f57f69a0 4620e95c bf00bd7c .h.G.i..\. F|...
I/DEBUG (30186): 5a347794 0036eb46 3088f8d0 bf3a4299 3080f8d0 F.6....0.B:....0
I/DEBUG (30186): 5a3477a4 0021f853 47702000 e005b911 d0034288 S.!.. pG.....B..
I/DEBUG (30186): 5a3477b4 280068c0 e000d1fa 47702001 41f0e92d .h.(..... pG-..A
I/DEBUG (30186): 5a3477c4 f8c54605 460e10a0 f5d62400 4607fa1b .F.....F.$.....F
I/DEBUG (30186):
I/DEBUG (30186): code around lr:
I/DEBUG (30186): 5a229b90 b9084603 e0042001 f8d34620 f6a611a4 .F... .. F......
I/DEBUG (30186): 5a229ba0 bd10fd01 4614b510 2100b14b f11d4618 .......FK..!.F..
I/DEBUG (30186): 5a229bb0 4601fdf3 4620b118 ffe2f7ff 2001e000 ...F.. F.......
I/DEBUG (30186): 5a229bc0 bf00bd10 4ff0e92d 6d464607 460cb0a7 ....-..O.FFm...F
I/DEBUG (30186): 5a229bd0 0b90f10d 0a88f10d 52f4f8d6 f6fa4628 ...........R(F..
I/DEBUG (30186):
I/DEBUG (30186): stack:
I/DEBUG (30186): 5bf04bc8 5bf04c24
I/DEBUG (30186): 5bf04bcc 400828c0 /system/lib/libc.so
I/DEBUG (30186): 5bf04bd0 56d045f8 /dev/ashmem/dalvik-LinearAlloc (deleted)
I/DEBUG (30186): 5bf04bd4 00ffb568 [heap]
I/DEBUG (30186): 5bf04bd8 00000003
I/DEBUG (30186): 5bf04bdc 50fbff00
I/DEBUG (30186): 5bf04be0 5bf04c10
I/DEBUG (30186): 5bf04be4 400827f0 /system/lib/libc.so
I/DEBUG (30186): 5bf04be8 5bf04bf0
I/DEBUG (30186): 5bf04bec 40129393 /system/lib/libutils.so
I/DEBUG (30186): 5bf04bf0 000607dd
I/DEBUG (30186): 5bf04bf4 00000000
I/DEBUG (30186): 5bf04bf8 40eb4a68 /dev/ashmem/dalvik-heap (deleted)
I/DEBUG (30186): 5bf04bfc 40eb4a68 /dev/ashmem/dalvik-heap (deleted)
I/DEBUG (30186): 5bf04c00 df0027ad
I/DEBUG (30186): 5bf04c04 00000000
I/DEBUG (30186): #01 5bf04c08 56e6d840 /dev/ashmem/dalvik-LinearAlloc (deleted)
I/DEBUG (30186): 5bf04c0c 40822db4 /system/lib/libdvm.so
D/PlasmaWebView[1]( 575): Invalidate triggered
I/BootReceiver( 7248): Copying /data/tombstones/tombstone_05 to DropBox (SYSTEM_TOMBSTONE)
I/DEBUG (30186): debuggerd committing suicide to free the zombie!
I/WindowManager( 7248): WIN DEATH: Window{415980d8 com.regaliz.libneo/com.regaliz.libneo.NativeStory paused=false}
I/ActivityManager( 7248): Process com.regaliz.libneo (pid 575) has died.
W/WindowManager( 7248): Force-removing child win Window{416c4f88 SurfaceView paused=false} from container Window{415980d8 com.regaliz.libneo/com.regaliz.libneo.NativeStory paused=false}
I/flint (28979): jni: deleting text normalizer ...
I/flint (28979): jni: deleting synthesizer ...
I/flint (28979): jni: deleting project file ...
I/flint (28979): jni: deleting project resource holder ...
I/DEBUG ( 631): debuggerd: Oct 7 2012 16:35:04
D/Zygote ( 7206): Process 575 terminated by signal (11)
W/ActivityManager( 7248): Force removing ActivityRecord{41303a20 com.regaliz.libneo/.NativeStory}: app died, no saved state
Edit: looks like i have hit a critical bug of webkit: https://bugs.webkit.org/show_bug.cgi?id=93447 . Unfortunately its marked as WONTFIX because Google is moving away from webkit into the new rendering engine Blink... im scared :(
Edit 2: This is already reported on Android Bug Tool with 9 stars, but nobody seems to know why it happens :( https://code.google.com/p/android/issues/detail?id=24232
Edit 3: Too early to open champagne, but it looks like WebView doesn't like to be initialized with a heavy page load when inside a ViewSwitcher and the active View is not him(her/it)self ...
It's a little temerary to say, because other times the error appeared sooner or later, but after 5 days of intensive debugging I'm pretty sure I have found the recipe for disaster. I can conclude:
Putting a WebView inside a ViewFlipper, and loading a complex page in
it, while showing another ViewFlipper page (in my case a simple
throbber) would kill the Activity triggering the core dump
I still keep the WebView in the ViewFlipper, but as long as during Init (page load, page parse, body.onload) its viewflipper page is shown, I have no problems. As soon as I retry the throbber thing ... bang!
After the page is inited, and webview has stabilized, I can successfully change the ViewFlipper views.
A few modes of DEBUGing
Have you Asynced Yet?
Are you running the content in a seperate thread?
Can you reproduce this on another device/emulator?
This might be due to unsupported/changed libwebcore or other file versions.
Try the JS on a Desktop Browser?
If the javascript runs fine on a Standard Browser we have a degree of confidence. You can take this a level further and use Desktop tools to poke and analyze your JS code to see if there's problem there.
Related
I wrote the application without NDK using and it can crash with random actions with the following error:
12-20 14:21:13.590 15718-15725 A/jazz: mediatek/protect/dalvik/vm/jazz/dexlang/dex_lang-inl.h:2415] void jazz::DexLang<BitcodeGenerator>::EmitInstruction(const jazz::AIR&) [with BitcodeGenerator = jazz::dixieland::BitcodeGenerator] unimplemented not
12-20 14:21:13.590 15718-15725 E/dalvikvm: VM aborting
12-20 14:21:13.590 15718-15725 A/libc: Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1), thread 15725 (Compiler)
12-20 14:21:13.591 15718-15725 A/libc: Send stop signal to pid:15718 in debugger_signal_handler
I'm running the app on different emulators and devices, but on my device it constantly crashing.
Device:
PHONE_MODEL=JY-G4S
ANDROID_VERSION=4.2.2
BUILD=TIME=1402319802000
FINGERPRINT=JIAYU/S8/S8:4.2.2/JDQ39/1402319714:user/test-keys
HARDWARE=mt6592
USER=scm
HOST=vanzo68
DEVICE=S8
TAGS=test-keys
MODEL=JY-G4S
BOOTLOADER=unknown
VERSION.CODENAME=REL
VERSION.INCREMENTAL=eng.scm.1402319714
VERSION.RELEASE=4.2.2
VERSION.SDK_INT=17
VERSION.RESOURCES_SDK_INT=17
VERSION.SDK=17
CPU_ABI=armeabi-v7a
CPU_ABI2=armeabi
MANUFACTURER=JYT
BRAND=JIAYU
TYPE=user
PRODUCT=S8
Can I fix this error programmatically without flashing the device?
One thing I found is that using the next generation (D8) dex compiler might cause this issue. From my experience it seems like adding the property android.enableD8=true in your ./gradle/gradle.properties file might cause this issue on some pre lollipop devices.
After removing it again, it all started working on the troublesome devices where we was seeing the crash before.
It looks like the custom mediatek Dalvik JIT did not implement the dex "not" instruction. D8 generates this instruction and DX most likely did not. We will workaround the VM bug by never generating a "not" instruction in D8 when targeting Dalvik VMs.
We are pushing out the fix for Android Studio 3.1 so that this will not be a problem once Android Studio 3.1 goes stable.
Fix here: https://r8-review.googlesource.com/c/r8/+/16880
TL;DR Don't use D8 with Android Gradle Build Plugin 3.0.x.
I catch this JIT Compiler crash on Lenovo P70-A in our app. In our case the error was:
F/jazz (11964): mediatek/protect/dalvik/vm/jazz/dexlang/dex_lang-inl.h:2523] void jazz::DexLang<BitcodeGenerator>::EmitInstruction(const jazz::AIR&) [with BitcodeGenerator = jazz::dixieland::BitcodeGenerator] unimplemented not
E/dalvikvm(11964): VM aborting
F/libc (11964): Fatal signal 6 (SIGABRT) at 0x00002ebc (code=-6), thread 11970 (Compiler)
followed by crash dump:
I/DEBUG (12113): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG (12113): Build fingerprint: 'Lenovo/P70-A/P70-A:4.4.4/KOT49H/P70-A_S142_161230_16G_ROW:user/release-keys'
I/DEBUG (12113): pid: 11964, tid: 11970, name: Compiler >>> com.myapp <<<
I/DEBUG (12113): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
I/DEBUG (12113): r0 00000000 r1 00002ec2 r2 00000006 r3 00000000
I/DEBUG (12113): r4 00000006 r5 00000000 r6 00002ec2 r7 0000010c
I/DEBUG (12113): r8 85d1ea6d r9 40159bd4 sl 76dd58ac fp 8283af64
I/DEBUG (12113): ip fffd1aa8 sp 76dd5630 lr 40109431 pc 40117dec cpsr 000f0010
I/DEBUG (12113):
I/DEBUG (12113): backtrace:
I/DEBUG (12113): #00 pc 00025dec /system/lib/libc.so (tgkill+12)
I/DEBUG (12113): #01 pc 0001742d /system/lib/libc.so (pthread_kill+64)
I/DEBUG (12113): #02 pc 00017625 /system/lib/libc.so (raise+10)
I/DEBUG (12113): #03 pc 0001633b /system/lib/libc.so
I/DEBUG (12113): #04 pc 0002569c /system/lib/libc.so (abort+4)
I/DEBUG (12113): #05 pc 0008a8fd /system/lib/libdvm.so (dvmAbort+80)
I/DEBUG (12113): #06 pc 0015a1e9 /system/lib/libdvm.so (jazz::LogMessage::~LogMessage()+576)
I/DEBUG (12113): #07 pc 0014f49d /system/lib/libdvm.so (jazz::DexLang<jazz::dixieland::BitcodeGenerator>::EmitInstruction(jazz::AIR const&)+1016)
I/DEBUG (12113): #08 pc 0014f60b /system/lib/libdvm.so (jazz::dixieland::Frontend::Compile(unsigned int, jazz::AIRMethod const&)+346)
I/DEBUG (12113): #09 pc 00153925 /system/lib/libdvm.so (jazz::dixieland::SubCompiler::Compile(unsigned int, jazz::AIRMethod const&)+32)
I/DEBUG (12113): #10 pc 00154443 /system/lib/libdvm.so (jazz::Jazz::Compile(jazz::CompilationUnit&)+126)
I/DEBUG (12113): #11 pc 00140d4d /system/lib/libdvm.so (jazz::Compiler::JitMethod(Method const&, jazz::jex::CompiledRawCode const*&, jazz::jex::CompiledRawCode const*&)+164)
I/DEBUG (12113): #12 pc 0011873d /system/lib/libdvm.so (jazzDoJITCompile(JitJazzMethodDescription const&, JitTranslationInfo&)+128)
I/DEBUG (12113): #13 pc 000f204f /system/lib/libdvm.so (dvmCompilerDoWork(CompilerWorkOrder*)+50)
I/DEBUG (12113): #14 pc 000d9f77 /system/lib/libdvm.so
I/DEBUG (12113): #15 pc 000a0485 /system/lib/libdvm.so
I/DEBUG (12113): #16 pc 0000d838 /system/lib/libc.so (__thread_entry+72)
I/DEBUG (12113):
I/DEBUG (12113): stack:
...
As mentioned in other answers it was caused by D8 implementation which is using not instruction in Dalvik binary code, but JIT Compiler on this device not support this instruction. Solution is to disable D8 in compilation by removing android.enableD8=true from gradle.properties for AGP 3.0.x. Stable AGP 3.1 will contain fix for this.
Edit: Probably this happen on the devices with Mediatek SOC where is running KitKat.
I'm using cocos2d-x v2.1.4 and I have this crash log from logcat:
I/DEBUG ( 6575): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 6575): Build fingerprint: 'acer/a500_ww_gen1/picasso:4.0.3/IML74K/1333032611:user/release-keys'
I/DEBUG ( 6575): pid: 6680, tid: 6680 >>> com.xxxxx.xxxxx <<<
I/DEBUG ( 6575): signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 5bd10d1f
I/DEBUG ( 6575): r0 0000006e r1 5ceda8ec r2 00000000 r3 5bd10d1f
I/DEBUG ( 6575): r4 00000000 r5 5bb4dfc1 r6 5bd13c38 r7 5ceda8ec
I/DEBUG ( 6575): r8 00007530 r9 00000000 10 00000000 fp 5bd13c38
I/DEBUG ( 6575): ip 5bd76e4c sp 5ced9948 lr 5bb4e179 pc 5bb4dfce cpsr 00000030
I/DEBUG ( 6575): d0 0000000000000000 d1 0000000000000000
I/DEBUG ( 6575): d2 0000000000000000 d3 000000003f000000
I/DEBUG ( 6575): d4 0000000000000000 d5 0000000000000000
I/DEBUG ( 6575): d6 0000000000000000 d7 0000000000000000
I/DEBUG ( 6575): d8 0000000000000000 d9 0000000000000000
I/DEBUG ( 6575): d10 0000000000000000 d11 0000000000000000
I/DEBUG ( 6575): d12 0000000000000000 d13 0000000000000000
I/DEBUG ( 6575): d14 0000000000000000 d15 0000000000000000
I/DEBUG ( 6575): scr 80000012
I/DEBUG ( 6575):
I/DEBUG ( 6575): #00 pc 0032ffce /data/data/com.xxxxx.xxxxx/lib/libgame.so
I/DEBUG ( 6575): #01 pc 00330176 /data/data/com.xxxxx.xxxxx/lib/libgame.so
I/DEBUG ( 6575): #02 pc 00330f68 /data/data/com.xxxxx.xxxxx/lib/libgame.so (curl_mvsnprintf)
I/DEBUG ( 6575): #03 pc 00323e2c /data/data/com.xxxxx.xxxxx/lib/libgame.so (Curl_failf)
I/DEBUG ( 6575): #04 pc 0031d39e /data/data/com.xxxxx.xxxxx/lib/libgame.so (Curl_resolv_timeout)
I/DEBUG ( 6575): #05 pc 00329ea2 /data/data/com.xxxxx.xxxxx/lib/libgame.so (Curl_connect)
I can tell from this log that it was caused by a cURL method not properly finishing or something but I want to know which function causes the crash. I tried using ndk-stack but I am getting this result:
********** Crash dump: **********
Build fingerprint: 'acer/a500_ww_gen1/picasso:4.0.3/IML74K/1333032611:user/release-keys'
pid: 6498, tid: 6498 >>> com.xxxxx.xxxxx <<<
signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 5bb71d1f
Stack frame #00 pc 0032ffce /data/data/com.xxxxx.xxxxx/lib/libgame.so: Unable to locate routine information for address 32ffce in module /Users/xxxxx/Desktop/xxxxx/_projects/xxxxx/xxxxx/proj.android/obj/local/armeabi/libgame.so
Stack frame #01 pc 00330176 /data/data/com.xxxxx.xxxxx/lib/libgame.so: Unable to locate routine information for address 330176 in module /Users/xxxxx/Desktop/xxxxx/_projects/xxxxx/xxxxx/proj.android/obj/local/armeabi/libgame.so
Stack frame #02 pc 00330f68 /data/data/com.xxxxx.xxxxx/lib/libgame.so (curl_mvsnprintf): Unable to locate routine information for address 330f68 in module /Users/xxxxx/Desktop/xxxxx/_projects/xxxxx/xxxxx/proj.android/obj/local/armeabi/libgame.so
Stack frame #03 pc 00323e2c /data/data/com.xxxxx.xxxxx/lib/libgame.so (Curl_failf): Unable to locate routine information for address 323e2c in module /Users/xxxxx/Desktop/xxxxx/_projects/xxxxx/xxxxx/proj.android/obj/local/armeabi/libgame.so
Stack frame #04 pc 0031d39e /data/data/com.xxxxx.xxxxx/lib/libgame.so (Curl_resolv_timeout): Unable to locate routine information for address 31d39e in module /Users/xxxxx/Desktop/xxxxx/_projects/xxxxx/xxxxx/proj.android/obj/local/armeabi/libgame.so
Stack frame #05 pc 00329ea2 /data/data/com.xxxxx.xxxxx/lib/libgame.so (Curl_connect): Unable to locate routine information for address 329ea2 in module /Users/xxxxx/Desktop/xxxxx/_projects/xxxxx/xxxxx/proj.android/obj/local/armeabi/libgame.so
Is there a way to get more meaningful information from the stack trace?
Or is it because I'm using libcurl which was compiled as static library, and ndk-stack wasn't able to find information about it?
you can use VisualGDB , using VisualGDB you can debug your native code in visual studio,
you have to install the VisualGDB plugin in visual studio, then you can import your exsisting cocos2d-x Android Eclipse project to visual studio. You can check the following link
http://visualgdb.com/tutorials/android/
I have configured my cocos2d android project to visual studio with the help of VisualGDB, let me know if you face any issue.
A couple days ago I installed the Android SDK on my work laptop. I created an AVD for 4.0.3. I ran it with proxy information on the command line. When it started up I ran the browser app and it successfully displayed the Google home page. I then clicked in the URL field of the browser app and entered a public host name that's associated with a web site, and pressed Enter on my PC keyboard. The result is that the browser app just exited back to the home screen. I tried a couple of different hostnames (www.cnn.com was one of them), with the same result.
What am I missing?
The logcat output that I get right about when I press Enter on the new URL is the following:
I/ActivityThread( 485): Pub com.android.quicksearchbox.google:com.android.quicksearchbox.google.GoogleSuggestionProvider
I/ActivityThread( 485): Pub com.android.quicksearchbox.shortcuts: com.android.quicksearchbox.ShortcutsProvider
D/dalvikvm( 444): GC_CONCURRENT freed 243K, 4% free 10706K/11079K, paused 5ms+5ms
D/dalvikvm( 132): GC_CONCURRENT freed 374K, 30% free 9903K/14023K, paused 5ms+14ms
F/libc ( 444): Fatal signal 11 (SIGSEGV) at 0x0000001c (code=1)
I/DEBUG ( 34): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 34): Build fingerprint: 'generic/sdk/generic:4.0.4/MR1/302030:eng/test-keys'
I/DEBUG ( 34): pid: 444, tid: 468 >>> com.android.browser <<<
I/DEBUG ( 34): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0000001c
I/DEBUG ( 34): r0 00000000 r1 4a19845c r2 00000000 r3 003d3ba8
I/DEBUG ( 34): r4 002fdac0 r5 00000000 r6 4a198480 r7 ffffffff
I/DEBUG ( 34): r8 00000001 r9 00000001 10 00192110 fp 4a198c04
I/DEBUG ( 34): ip 48696d20 sp 4a198428 lr 482e66df pc 482e55d2 cpsr 60000030
I/DEBUG ( 34): d0 00000000cf000000 d1 0000000000000000
I/DEBUG ( 34): d2 3ff0000000000000 d3 0000000000000000
I/DEBUG ( 34): d4 01e1338000000000 d5 4129f23400000000
I/DEBUG ( 34): d6 0000000000000000 d7 0000000000000000
I/DEBUG ( 34): d8 0000000000000000 d9 0000000000000000
I/DEBUG ( 34): d10 0000000000000000 d11 0000000000000000
I/DEBUG ( 34): d12 0000000000000000 d13 0000000000000000
I/DEBUG ( 34): d14 0000000000000000 d15 0000000000000000
I/DEBUG ( 34): scr 60000013
I/DEBUG ( 34):
I/DEBUG ( 34): #00 pc 003865d2 /system/lib/libwebcore.so
I/DEBUG ( 34): #01 pc 003876da /system/lib/libwebcore.so
I/DEBUG ( 34): #02 pc 00387aa6 /system/lib/libwebcore.so
I/DEBUG ( 34): #03 pc 00172072 /system/lib/libwebcore.so
I/DEBUG ( 34): #04 pc 00161898 /system/lib/libwebcore.so
I/DEBUG ( 34): #05 pc 00165dc2 /system/lib/libwebcore.so
I/DEBUG ( 34): #06 pc 0016b6ba /system/lib/libwebcore.so
I/DEBUG ( 34): #07 pc 0016ef24 /system/lib/libwebcore.so
I/DEBUG ( 34): #08 pc 0016ede0 /system/lib/libwebcore.so
I/DEBUG ( 34): #09 pc 0016191c /system/lib/libwebcore.so
I/DEBUG ( 34): #10 pc 00164e30 /system/lib/libwebcore.so
I/DEBUG ( 34): #11 pc 00166fa2 /system/lib/libwebcore.so
I/DEBUG ( 34): #12 pc 001670ae /system/lib/libwebcore.so
I/DEBUG ( 34): #13 pc 0016cea6 /system/lib/libwebcore.so
I/DEBUG ( 34): #14 pc 0016d35a /system/lib/libwebcore.so
I/DEBUG ( 34): #15 pc 0026c0f2 /system/lib/libwebcore.so
I/DEBUG ( 34): #16 pc 0016d7f8 /system/lib/libwebcore.so
I/DEBUG ( 34): #17 pc 00167250 /system/lib/libwebcore.so
I/DEBUG ( 34): #18 pc 0016740a /system/lib/libwebcore.so
I/DEBUG ( 34): #19 pc 00167496 /system/lib/libwebcore.so
I/DEBUG ( 34): #20 pc 001674c2 /system/lib/libwebcore.so
I/DEBUG ( 34): #21 pc 0027bafe /system/lib/libwebcore.so
I/DEBUG ( 34): #22 pc 0001ec30 /system/lib/libdvm.so (dvmPlatformInvoke)
I/DEBUG ( 34): #23 pc 000590ce /system/lib/libdvm.so (_Z16dvmCallJNIMethodPKjP6JValuePK6MethodP6Thread)
I/DEBUG ( 34): #24 pc 0004cbe8 /system/lib/libdvm.so (_Z21dvmCheckCallJNIMethodPKjP6JValuePK6MethodP6Thread)
I/DEBUG ( 34): #25 pc 00030a4c /system/lib/libdvm.so
I/DEBUG ( 34): #26 pc 000341fc /system/lib/libdvm.so (_Z12dvmInterpretP6ThreadPK6MethodP6JValue)
I/DEBUG ( 34): #27 pc 0006ca8e /system/lib/libdvm.so (_Z14dvmCallMethodVP6ThreadPK6MethodP6ObjectbP6JValueSt9__va_list)
I/DEBUG ( 34): #28 pc 0006cab0 /system/lib/libdvm.so (_Z13dvmCallMethodP6ThreadPK6MethodP6ObjectP6JValuez)
I/DEBUG ( 34): #29 pc 0005fbd0 /system/lib/libdvm.so
I/DEBUG ( 34): #30 pc 00012e48 /system/lib/libc.so (__thread_entry)
I/DEBUG ( 34): #31 pc 00012998 /system/lib/libc.so (pthread_create)
I/DEBUG ( 34):
I/DEBUG ( 34): code around pc:
I/DEBUG ( 34): 482e55b0 ff1af59b 1d38e003 f617a909 9809fb11 ......8.........
I/DEBUG ( 34): 482e55c0 ff06f59b e8bdb00b bf008ff0 680bb507 ...............h
I/DEBUG ( 34): 482e55d0 61c32200 600a680b f841a902 f7ff3d04 .".a.h.`..A..=..
I/DEBUG ( 34): 482e55e0 9801ff43 fef4f59b bf00bd0e 4604b510 C..............F
I/DEBUG ( 34): 482e55f0 b1286840 30b0f890 4621b913 fa48f000 #h(....0..!F..H.
I/DEBUG ( 34):
I/DEBUG ( 34): code around lr:
I/DEBUG ( 34): 482e66bc 682380ac 685a4620 e0d44790 30bcf8d4 ..#h FZh.G.....0
I/DEBUG ( 34): 482e66cc a90ab153 f8416d60 f8c43d04 f7fe20bc S...`mA..=... ..
I/DEBUG ( 34): 482e66dc 9809ff77 fe76f59a 6d606be5 d1014285 w.....v..k`m.B..
I/DEBUG ( 34): 482e66ec e0022500 f5db4628 6d63ff4b 2200a90a .%..(F..K.cm..."
I/DEBUG ( 34): 482e66fc f8414620 65623d0c fb86f7ff f5e99807 FA..=be........
I/DEBUG ( 34):
I/DEBUG ( 34): stack:
I/DEBUG ( 34): 4a1983e8 00000005
I/DEBUG ( 34): 4a1983ec 001eb800 [heap]
I/DEBUG ( 34): 4a1983f0 48287dad /system/lib/libwebcore.so
I/DEBUG ( 34): 4a1983f4 0044edf0 [heap]
I/DEBUG ( 34): 4a1983f8 0048b9f0 [heap]
I/DEBUG ( 34): 4a1983fc 002c07a8 [heap]
I/DEBUG ( 34): 4a198400 002fdd20 [heap]
I/DEBUG ( 34): 4a198404 48082143 /system/lib/libwebcore.so
I/DEBUG ( 34): 4a198408 00000005
I/DEBUG ( 34): 4a19840c 48081ebd /system/lib/libwebcore.so
I/DEBUG ( 34): 4a198410 0048b9f0 [heap]
I/DEBUG ( 34): 4a198414 48287dad /system/lib/libwebcore.so
I/DEBUG ( 34): 4a198418 0044edf0 [heap]
I/DEBUG ( 34): 4a19841c 00000000
I/DEBUG ( 34): 4a198420 df0027ad
I/DEBUG ( 34): 4a198424 00000000
I/DEBUG ( 34): #00 4a198428 00000000
I/DEBUG ( 34): 4a19842c 4a19845c
I/DEBUG ( 34): 4a198430 00000000
I/DEBUG ( 34): 4a198434 482e66df /system/lib/libwebcore.so
I/DEBUG ( 34): #01 4a198438 00000001
I/DEBUG ( 34): 4a19843c 00000000
I/DEBUG ( 34): 4a198440 48287ea9 /system/lib/libwebcore.so
I/DEBUG ( 34): 4a198444 00000000
I/DEBUG ( 34): 4a198448 00000001
I/DEBUG ( 34): 4a19844c 482e5771 /system/lib/libwebcore.so
I/DEBUG ( 34): 4a198450 00000001
I/DEBUG ( 34): 4a198454 00000000
I/DEBUG ( 34): 4a198458 002fdac0 [heap]
I/DEBUG ( 34): 4a19845c 003d3ba8 [heap]
I/DEBUG ( 34): 4a198460 4a198480
I/DEBUG ( 34): 4a198464 002fdac0 [heap]
I/DEBUG ( 34): 4a198468 00000000
I/DEBUG ( 34): 4a19846c 4a198480
I/DEBUG ( 34): 4a198470 002b01a0 [heap]
I/DEBUG ( 34): 4a198474 482e6aab /system/lib/libwebcore.so
D/Zygote ( 37): Process 444 terminated by signal (11)
I/ActivityManager( 80): Process com.android.browser (pid 444) has died.
I/WindowManager( 80): WIN DEATH: Window{4158a718 com.android.browser/com.android.browser.BrowserActivity paused=false}
W/NetworkManagementSocketTagger( 80): setKernelCountSet(10002, 0) failed with errno -2
W/ActivityManager( 80): Force removing ActivityRecord{41402f88 com.android.browser/.BrowserActivity}: app died, no saved state
W/NetworkManagementSocketTagger( 80): setKernelCountSet(10013, 1) failed with errno -2
I/BootReceiver( 80): Copying /data/tombstones/tombstone_06 to DropBox (SYSTEM_TOMBSTONE)
D/dalvikvm( 80): GC_FOR_ALLOC freed 237K, 6% free 12091K/12743K, paused 104ms
D/dalvikvm( 80): GC_FOR_ALLOC freed 873K, 12% free 11461K/12999K, paused 107ms
I/Process ( 80): Sending signal. PID: 175 SIG: 3
I/dalvikvm( 175): threadid=3: reacting to signal 3
I/dalvikvm( 175): Wrote stack traces to '/data/anr/traces.txt'
W/InputManagerService( 80): Got RemoteException sending setActive(false) notification to pid 444 uid 10002
D/dalvikvm( 80): GC_CONCURRENT freed 318K, 11% free 11688K/12999K, paused 6ms+14ms
W/GoogleSearch( 485): Error
W/GoogleSearch( 485): java.net.SocketTimeoutException
W/GoogleSearch( 485): at java.net.PlainSocketImpl.read(PlainSocketImpl.java:491)
You say that you "ran it with proxy information on the command line". I would recommend you to run the emulator normally without setting the proxy through command line.
e.g.
emulator -avd avdname -partition-size 1024
Later, after successful boot up of Android, go to Menu->Settings->Wireless & Networks->More->Mobile Networks->Access Point Names
Default configuration is "TelKila" on the emulator. Click on that and set the proxy, port etc here.
Now try to surf the internet and do share the result with us.
I am looking for a native crash in my application but i cant find a tool that help me to translate the address to the function names in my library i saw this post : how to use addr2line but it seems that only works when you have a trace like this :
I/DEBUG ( 31): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 31): Build fingerprint: 'generic/sdk/generic:2.3/GRH55/79397:eng/test-keys'
I/DEBUG ( 31): pid: 378, tid: 386 >>> com.example.gltest <<<
I/DEBUG ( 31): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
I/DEBUG ( 31): r0 001dbdc0 r1 00000001 r2 00000000 r3 00000000
I/DEBUG ( 31): r4 00000000 r5 40a40000 r6 4051a480 r7 42ddbee8
I/DEBUG ( 31): r8 43661b24 r9 42ddbed0 10 42ddbebc fp 41e462d8
I/DEBUG ( 31): ip 00000001 sp 436619d0 lr 83a12f5d pc 8383deb4 cpsr 20000010
I/DEBUG ( 31): #00 pc 0003deb4 /data/data/com.example.gltest/lib/libnativemaprender.so
I/DEBUG ( 31): #01 pc 00039b76 /data/data/com.example.gltest/lib/libnativemaprender.so
I/DEBUG ( 31): #02 pc 00017d34 /system/lib/libdvm.so
as you can see in the last 3 lines the library of your application is there : ibnativemaprender.so
and only if your library appear there the addr2line app will work
but in my trace i have this :
I/DEBUG (16251): #00 pc 000161c0 /system/lib/libc.so
I/DEBUG (16251): #01 lr afd196f1 /system/lib/libc.so
and my library is not show there until later :
/DEBUG (16251): stack:
I/DEBUG (16251): 46f0c818 afd426a4
I/DEBUG (16251): 46f0c81c 000b7290
I/DEBUG (16251): 46f0c820 00000afa
I/DEBUG (16251): 46f0c824 afd187b9 /system/lib/libc.so
I/DEBUG (16251): 46f0c828 afd42644
I/DEBUG (16251): 46f0c82c afd467c4
I/DEBUG (16251): 46f0c830 00000000
I/DEBUG (16251): 46f0c834 afd196f1 /system/lib/libc.so
I/DEBUG (16251): 46f0c838 00000001
I/DEBUG (16251): 46f0c83c 46f0c86c
I/DEBUG (16251): 46f0c840 81b6a4a0 /data/data/com.android.ANMP/lib/mylib.so
so is there a tool that can help me? or a different way to use addr2line?
No, not really. To do that you need to perform the search manually.
Manually, there are a three options:
Add debug prints to find out where and when it happens
Use IDA pro, (which is very expensive tool), load your library into it and look for the address 81b6a4a0, try to figure out which function it is. If you compile with debug symbols it should be easy enough.
Find the base address of your library, use objdump (from the NDK toolchain) to find what's in the address 81b6a4a0 (after removing base address from it).
In both last ways, if you don't find anything helpful, pull libc.so and libdvm.so from the device using adb and try to find what are the functions that appears in the stack trace, then check where do you call those functions in your code.
take a look at this. I have not yet found the time to try, so tell if if worked for you
You can use GDB to get stack traces. If you have a rooted phone or use the emulator you can enable core dumps. Then you can use GDB to examine the core dumps.
See this question for setting up GDB in Eclipse:
android how to use ndk gdb with a pure native executable
I'm making an application and when i go from menu to an other activity that display image using the e3roid framework, i allways get this (logcat):
D/PhoneWindow( 1562): DebugMonitor class=com.recisio.kfandroid.gui.tab.KFFeaturedTab focus=false
E/copybit ( 1562): Error opening frame buffer errno=13 (Permission denied)
D/PhoneWindow( 1562): DebugMonitor class=com.recisio.kfandroid.gui.player.KFPlayer focus=true
I'm questionning myself about where does the error come?
Is there a way to know exactly where it happens?
May i have to ignore this?
Apparently, copybit is just an abstraction for a basic 2D blitter with support for rotation, scaling and color/pixelformat conversions.
But where it's strange it's that all the images loaded appears well on my screen.
Ok: I tried to change the way i was encoding the bmp I print like this:
return Bitmap.createBitmap(bitmap_width, bitmap_height, Bitmap.Config.RGB_565);
but it doesn't solve the problem.
By printing several display infos everywhere in my code i realised that the error happens while loading the e3roid engine.
I'm going to look at the sources while waiting for more answers.
After some tests with printing a bmp i create before (valid), I get this
E/copybit ( 3274): Error opening frame buffer errno=13 (Permission denied)
D/dalvikvm( 3274): GC freed 3337 objects / 132024 bytes in 150ms
I/DEBUG ( 1145): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 1145): Build fingerprint: 'vodafone_fr/htc_buzz/buzz/buzz:2.1-update1/ERE27/183733:user/release-keys'
I/DEBUG ( 1145): pid: 3274, tid: 3519 >>> com.recisio.kfandroid <<<
I/DEBUG ( 1145): signal 11 (SIGSEGV), fault addr 00000000
I/DEBUG ( 1145): r0 46c62008 r1 00000000 r2 00100000 r3 00000018
I/DEBUG ( 1145): r4 4685fd10 r5 00000002 r6 46c62008 r7 0000000c
I/DEBUG ( 1145): r8 00000000 r9 4191fd20 10 00000de1 fp 002e4428
I/DEBUG ( 1145): ip 80000000 sp 4685fc98 lr acc9697b pc afe0e060 cpsr a0000010
I/DEBUG ( 1145): #00 pc 0000e060 /system/lib/libc.so
I/DEBUG ( 1145): #01 pc 00016978 /system/lib/egl/libGLES_android.so
I/DEBUG ( 1145): #02 pc 00016d5a /system/lib/egl/libGLES_android.so
I/DEBUG ( 1145): #03 pc 0002886c /system/lib/libandroid_runtime.so
I/DEBUG ( 1145): #04 pc 0000f3f4 /system/lib/libdvm.so
I/DEBUG ( 1145):
I/DEBUG ( 1145): code around pc:
I/DEBUG ( 1145): afe0e050 0a00000a e1530002 8202301c e1b0ce03
I/DEBUG ( 1145): afe0e060 28b100f0 48b10300 28a000f0 48a00300
I/DEBUG ( 1145): afe0e070 e3130004 1491a004 1480a004 e0422003
I/DEBUG ( 1145):
I/DEBUG ( 1145): code around lr:
I/DEBUG ( 1145): acc96968 5c39008f 434b6936 435a1c30 f7ed6921
I/DEBUG ( 1145): acc96978 e020e91a fef4f7ff 28001c05 480fd101
I/DEBUG ( 1145): acc96988 69c2e01a 47901c31 1c2169ab 47981c28
I/DEBUG ( 1145):
I/DEBUG ( 1145): stack:
I/DEBUG ( 1145): 4685fc58 001615b8 [heap]
I/DEBUG ( 1145): 4685fc5c 00000800
I/DEBUG ( 1145): 4685fc60 00000000
I/DEBUG ( 1145): 4685fc64 acc97fdb /system/lib/egl/libGLES_android.so
I/DEBUG ( 1145): 4685fc68 00301418 [heap]
I/DEBUG ( 1145): 4685fc6c acc9604d /system/lib/egl/libGLES_android.so
I/DEBUG ( 1145): 4685fc70 00010002 [heap]
I/DEBUG ( 1145): 4685fc74 00100000 [heap]
I/DEBUG ( 1145): 4685fc78 00000200
I/DEBUG ( 1145): 4685fc7c 00000200
I/DEBUG ( 1145): 4685fc80 001615b8 [heap]
I/DEBUG ( 1145): 4685fc84 acc95f3d /system/lib/egl/libGLES_android.so
I/DEBUG ( 1145): 4685fc88 afe38e08 /system/lib/libc.so
I/DEBUG ( 1145): 4685fc8c afe0eed4 /system/lib/libc.so
I/DEBUG ( 1145): 4685fc90 df002777
I/DEBUG ( 1145): 4685fc94 e3a070ad
I/DEBUG ( 1145): #00 4685fc98 00000002
I/DEBUG ( 1145): 4685fc9c 46c62008
I/DEBUG ( 1145): 4685fca0 0000000c
I/DEBUG ( 1145): 4685fca4 00000000
I/DEBUG ( 1145): 4685fca8 4191fd20
I/DEBUG ( 1145): 4685fcac 00000de1
I/DEBUG ( 1145): 4685fcb0 002e4428 [heap]
I/DEBUG ( 1145): 4685fcb4 46c62008
I/DEBUG ( 1145): 4685fcb8 4685fd10
I/DEBUG ( 1145): 4685fcbc acc9697b /system/lib/egl/libGLES_android.so
I/DEBUG ( 1145): #01 4685fcc0 4106788c /dev/ashmem/dalvik-LinearAlloc (deleted)
I/DEBUG ( 1145): 4685fcc4 002e4428 [heap]
I/DEBUG ( 1145): 4685fcc8 ad053c19 /system/lib/libdvm.so
I/DEBUG ( 1145): 4685fccc 00000000
I/DEBUG ( 1145): 4685fcd0 ad080f8c /system/lib/libdvm.so
I/DEBUG ( 1145): 4685fcd4 00300ea0 [heap]
I/DEBUG ( 1145): 4685fcd8 00000200
I/DEBUG ( 1145): 4685fcdc 001615cc [heap]
I/DEBUG ( 1145): 4685fce0 00000001
I/DEBUG ( 1145): 4685fce4 acc96d5f /system/lib/egl/libGLES_android.so
I/DEBUG ( 1145): debuggerd committing suicide to free the zombie!
I/DEBUG ( 3535): debuggerd: May 28 2010 02:08:39
What is this?
Hmm..I guess your device supports ARGB_8888 because all the images
loaded well on your screen. OpenGL sometimes shows strange errors when
the device encounters low memory situations.
I had the same error some times ago, it was due to a lack of memory. In the emulator logcat and not on my phone (wildfire) it was saying: OutOfMemoryException.
Make sure you use the recycle() nethod to clear bitmap from the memory.
This can happen if you are using a not supported texture format. Try using a RGB565. Here you can find some info about the issue: http://code.google.com/p/processing/issues/detail?id=391