Android 2.3中Webkit引擎导致VM崩溃的问题

Android2.2,2.3,2.3.3都存在的一个bug,在这里 http://www.linuxidc.net/thread-2203-1-1.html有详细的描述。

其中,楼主的代码可以下来运行一下,我在2.2和2.3模拟器和2.3的真机上都存在这个问题。

问题的核心在于这样一句话:JNI WARNING: jarray 0x4074f6e0 points to non-array object (Ljava/lang/String;)

也就是进行JNI调用时,把一个Java中的String对象当数组来访问了,最终导致虚拟机崩溃。

对这个问题进行跟踪时,费了很大的劲,所以先记录一下跟踪过程。

12-20 19:29:34.582: WARN/dalvikvm(725): JNI WARNING: jarray 0x4074f6e0 points to non-array object (Ljava/lang/String;)

12-20 19:29:34.622: INFO/dalvikvm(725): "WebViewCoreThread" prio=5 tid=9 NATIVE

12-20 19:29:34.622: INFO/dalvikvm(725):   | group="main" sCount=0 dsCount=0 obj=0x40521328 self=0x26bea8

12-20 19:29:34.622: INFO/dalvikvm(725):   | sysTid=734 nice=0 sched=0/0 cgrp=default handle=2539488

12-20 19:29:34.632: INFO/dalvikvm(725):   | schedstat=( 5341953614 5808331660 581 )

12-20 19:29:34.632: INFO/dalvikvm(725):   at android.webkit.WebViewCore.nativeTouchUp(Native Method)

12-20 19:29:34.632: INFO/dalvikvm(725):   at android.webkit.WebViewCore.nativeTouchUp(Native Method)

12-20 19:29:34.642: INFO/dalvikvm(725):   at android.webkit.WebViewCore.access$3300(WebViewCore.java:53)

12-20 19:29:34.652: INFO/dalvikvm(725):   at android.webkit.WebViewCore$EventHub$1.handleMessage(WebViewCore.java:1158)

12-20 19:29:34.652: INFO/dalvikvm(725):   at android.os.Handler.dispatchMessage(Handler.java:99)

12-20 19:29:34.652: INFO/dalvikvm(725):   at android.os.Looper.loop(Looper.java:123)

12-20 19:29:34.652: INFO/dalvikvm(725):   at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:629)

12-20 19:29:34.662: INFO/dalvikvm(725):   at java.lang.Thread.run(Thread.java:1019)

12-20 19:29:34.672: ERROR/dalvikvm(725): VM aborting

12-20 19:29:34.852: INFO/DEBUG(30): Build fingerprint: 'generic/sdk/generic:2.3/GRH55/79397:eng/test-keys'

12-20 19:29:34.862: INFO/DEBUG(30): pid: 725, tid: 734  >>> XXXXXXXX <<<

12-20 19:29:34.862: INFO/DEBUG(30): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadd00d

12-20 19:29:34.872: INFO/DEBUG(30):  r0 fffffebc  r1 deadd00d  r2 00000026  r3 00000000

12-20 19:29:34.872: INFO/DEBUG(30):  r4 81da45c8  r5 4074f6e0  r6 81d8592c  r7 0026d2b8

12-20 19:29:34.872: INFO/DEBUG(30):  r8 44174b54  r9 43d72e4c  10 43d72e34  fp 41edd82c

12-20 19:29:34.891: INFO/DEBUG(30):  ip 81da4728  sp 44174348  lr afd19375  pc 81d45a02  cpsr 20000030

12-20 19:29:35.912: INFO/DEBUG(30):          #00  pc 00045a02  /system/lib/libdvm.so

12-20 19:29:35.912: INFO/DEBUG(30):          #01  pc 000376fc  /system/lib/libdvm.so

12-20 19:29:35.912: INFO/DEBUG(30):          #02  pc 000399c4  /system/lib/libdvm.so

12-20 19:29:35.922: INFO/DEBUG(30):          #03  pc 0003a4a0  /system/lib/libdvm.so

12-20 19:29:35.932: INFO/DEBUG(30):          #04  pc 0032b6d6  /system/lib/libwebcore.so

12-20 19:29:35.952: INFO/DEBUG(30):          #05  pc 002a4da4  /system/lib/libwebcore.so

12-20 19:29:35.952: INFO/DEBUG(30):          #06  pc 001a6136  /system/lib/libwebcore.so

12-20 19:29:35.952: INFO/DEBUG(30):          #07  pc 002a5870  /system/lib/libwebcore.so

12-20 19:29:35.962: INFO/DEBUG(30):          #08  pc 00359e36  /system/lib/libwebcore.so

12-20 19:29:35.972: INFO/DEBUG(30):          #09  pc 0035d18e  /system/lib/libwebcore.so

12-20 19:29:35.972: INFO/DEBUG(30):          #10  pc 0036b078  /system/lib/libwebcore.so

12-20 19:29:35.982: INFO/DEBUG(30):          #11  pc 003627ac  /system/lib/libwebcore.so

12-20 19:29:35.982: INFO/DEBUG(30):          #12  pc 0029fb24  /system/lib/libwebcore.so

12-20 19:29:36.002: INFO/DEBUG(30):          #13  pc 0023367e  /system/lib/libwebcore.so

12-20 19:29:36.002: INFO/DEBUG(30):          #14  pc 00239c0c  /system/lib/libwebcore.so

12-20 19:29:36.011: INFO/DEBUG(30):          #15  pc 00237a28  /system/lib/libwebcore.so

12-20 19:29:36.011: INFO/DEBUG(30):          #16  pc 00237b32  /system/lib/libwebcore.so

12-20 19:29:36.022: INFO/DEBUG(30):          #17  pc 0023adba  /system/lib/libwebcore.so

12-20 19:29:36.022: INFO/DEBUG(30):          #18  pc 0023af4e  /system/lib/libwebcore.so

12-20 19:29:36.042: INFO/DEBUG(30):          #19  pc 000f80c0  /system/lib/libwebcore.so

12-20 19:29:36.042: INFO/DEBUG(30):          #20  pc 000f8c66  /system/lib/libwebcore.so

12-20 19:29:36.052: INFO/DEBUG(30):          #21  pc 001b81fa  /system/lib/libwebcore.so

12-20 19:29:36.062: INFO/DEBUG(30):          #22  pc 001b82f2  /system/lib/libwebcore.so

12-20 19:29:36.062: INFO/DEBUG(30):          #23  pc 001b8318  /system/lib/libwebcore.so

12-20 19:29:36.072: INFO/DEBUG(30):          #24  pc 00017d34  /system/lib/libdvm.so

相关推荐