参考:http://blog.csdn.net/xyang81/article/details/42319789
问题: QRD8926_110202平台的Browser必现报错。(去年的项目,客户反馈问题,提case让QRD提供技术支持)
测试步骤:浏览一会新闻或其他网站(>=3分钟),然后进入百度音乐(music.baidu.com/fm)界面, 点击歌手,播放一首歌,必现报错。
F/libc (15979): Fatal signal 7 (SIGBUS) at 0x00000007 (code=1), thread 15979 (android.browser)
......
I/DEBUG ( 232): backtrace:
I/DEBUG ( 232): #00 pc 0016f2ac /system/lib/libwebcore.so
I/DEBUG ( 232): #01 pc 0016f3a9 /system/lib/libwebcore.so
I/DEBUG ( 232): #02 pc 0016f3cd /system/lib/libwebcore.so
I/DEBUG ( 232): #03 pc 0016f4ad /system/lib/libwebcore.so
......
需要定位libwebcore.so出现crash的代码位置。使用命令:ndk-stack -sym <path> [-dump <path>]
注意:要有源码才行。以QRD8926_110202平台为例,需要与手机版本对应的编译完成的源码,
符号表的位置\out\target\product\XXX\symbols\system\lib\
ndk-stack -sym out\target\product\msm8226\symbols\system\lib\ -dump crash.log
********** Crash dump: ********** pid: 15979, tid: 15979, name: android.browser >>> com.android.browser <<< signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 00000007 Stack frame #00 pc 0016f2ac /system/lib/libwebcore.so: Routine WebCore::operator<(WebCore::TimerHeapElement const&, WebCore::TimerHeapElement const&) at QRD8926_110202/LINUX/android/external/webkit/Source/WebCore/platform/Timer.cpp:108 Stack frame #01 pc 0016f3a9 /system/lib/libwebcore.so: Routine void std::__push_heap<WebCore::TimerHeapIterator, int, WebCore::TimerHeapElement>(WebCore::TimerHeapIterator, int, int, WebCore::TimerHeapElement) at QRD8926_110202/LINUX/android/external/stlport/stlport/stl/_heap.c:46 (discriminator 2) Stack frame #02 pc 0016f3cd /system/lib/libwebcore.so: Routine __push_heap_aux<WebCore::TimerHeapIterator, int, WebCore::TimerHeapElement> at QRD8926_110202/LINUX/android/external/stlport/stlport/stl/_heap.c:59 Stack frame #03 pc 0016f4ad /system/lib/libwebcore.so: Routine WebCore::TimerBase::heapPop() at QRD8926_110202/LINUX/android/external/webkit/Source/WebCore/platform/Timer.cpp:268 Stack frame #04 pc 0016f587 /system/lib/libwebcore.so: Routine WebCore::TimerBase::heapDelete() at QRD8926_110202/LINUX/android/external/webkit/Source/WebCore/platform/Timer.cpp:235 Stack frame #05 pc 00124741 /system/lib/libwebcore.so: Routine WebCore::HTMLMediaElement::updatePlayState() at QRD8926_110202/LINUX/android/external/webkit/Source/WebCore/html/HTMLMediaElement.cpp:2249 Stack frame #06 pc 00125ad3 /system/lib/libwebcore.so: Routine WebCore::HTMLMediaElement::mediaPlayerPlaybackStateChanged(WebCore::MediaPlayer*) at QRD8926_110202/LINUX/android/external/webkit/Source/WebCore/html/HTMLMediaElement.cpp:2007 Stack frame #07 pc 00178f23 /system/lib/libwebcore.so: Routine WebCore::MediaPlayer::playbackStateChanged() at QRD8926_110202/LINUX/android/external/webkit/Source/WebCore/platform/graphics/MediaPlayer.cpp:867 Stack frame #08 pc 00263d87 /system/lib/libwebcore.so: Routine WebCore::MediaPlayerPrivate::pause() at QRD8926_110202/LINUX/android/external/webkit/Source/WebKit/android/WebCoreSupport/MediaPlayerPrivateAndroid.cpp:106 Stack frame #09 pc 00178c97 /system/lib/libwebcore.so: Routine WebCore::MediaPlayer::pause() at QRD8926_110202/LINUX/android/external/webkit/Source/WebCore/platform/graphics/MediaPlayer.cpp:430 Stack frame #10 pc 00124733 /system/lib/libwebcore.so: Routine WebCore::HTMLMediaElement::updatePlayState() at QRD8926_110202/LINUX/android/external/webkit/Source/WebCore/html/HTMLMediaElement.cpp:2246 Stack frame #11 pc 00124df5 /system/lib/libwebcore.so: Routine WebCore::HTMLMediaElement::mediaPlayerTimeChanged(WebCore::MediaPlayer*) at QRD8926_110202/LINUX/android/external/webkit/Source/WebCore/html/HTMLMediaElement.cpp:1937 Stack frame #12 pc 00178ef3 /system/lib/libwebcore.so: Routine WebCore::MediaPlayer::timeChanged() at QRD8926_110202/LINUX/android/external/webkit/Source/WebCore/platform/graphics/MediaPlayer.cpp:837 Stack frame #13 pc 00263fad /system/lib/libwebcore.so: Routine WebCore::MediaPlayerPrivate::onEnded() at QRD8926_110202/LINUX/android/external/webkit/Source/WebKit/android/WebCoreSupport/MediaPlayerPrivateAndroid.cpp:163 Stack frame #14 pc 000203cc /system/lib/libdvm.so (dvmPlatformInvoke+112): Routine dvmPlatformInvoke at QRD8926_110202/LINUX/android/dalvik/vm/arch/arm/CallEABI.S:258 Stack frame #15 pc 00050d8f /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+398): Routine dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*) at QRD8926_110202/LINUX/android/dalvik/vm/Jni.cpp:1214 Stack frame #16 pc 00029860 /system/lib/libdvm.so: Routine dalvik_mterp at QRD8926_110202/LINUX/android/dalvik/vm/mterp/out/InterpAsm-armv7-a-neon.S:16314 Stack frame #17 pc 0002e218 /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184): Routine dvmInterpret(Thread*, Method const*, JValue*) at QRD8926_110202/LINUX/android/dalvik/vm/interp/Interp.cpp:1956 Stack frame #18 pc 000630a7 /system/lib/libdvm.so (dvmInvokeMethod(Object*, Method const*, ArrayObject*, ArrayObject*, ClassObject*, bool)+350): Routine dvmInvokeMethod(Object*, Method const*, ArrayObject*, ArrayObject*, ClassObject*, bool) at QRD8926_110202/LINUX/android/dalvik/vm/interp/Stack.cpp:737 Stack frame #19 pc 0006accb /system/lib/libdvm.so: Routine Dalvik_java_lang_reflect_Method_invokeNative at QRD8926_110202/LINUX/android/dalvik/vm/native/java_lang_reflect_Method.cpp:101 Stack frame #20 pc 00029860 /system/lib/libdvm.so: Routine dalvik_mterp at QRD8926_110202/LINUX/android/dalvik/vm/mterp/out/InterpAsm-armv7-a-neon.S:16314 Stack frame #21 pc 0002e218 /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184): Routine dvmInterpret(Thread*, Method const*, JValue*) at QRD8926_110202/LINUX/android/dalvik/vm/interp/Interp.cpp:1956 Stack frame #22 pc 00062de9 /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+292): Routine dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list) at QRD8926_110202/LINUX/android/dalvik/vm/interp/Stack.cpp:526 Stack frame #23 pc 0004c973 /system/lib/libdvm.so: Routine CallStaticVoidMethodV at QRD8926_110202/LINUX/android/dalvik/vm/Jni.cpp:2151 Stack frame #24 pc 0004ee0b /system/lib/libandroid_runtime.so: Routine _JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...) at QRD8926_110202/LINUX/android/libnativehelper/include/nativehelper/jni.h:780 Stack frame #25 pc 0004fa9b /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, char const*)+378): Routine android::AndroidRuntime::start(char const*, char const*) at QRD8926_110202/LINUX/android/frameworks/base/core/jni/AndroidRuntime.cpp:886 Stack frame #26 pc 0000105b /system/bin/app_process Stack frame #27 pc 0000dcf7 /system/lib/libc.so (__libc_init+50): Routine __libc_init at QRD8926_110202/LINUX/android/bionic/libc/bionic/libc_init_dynamic.cpp:112 Stack frame #28 pc 00000d7c /system/bin/app_process