开发者

Webview crashes when using LayoutAlgorithm.SINGLE_COLUMN

开发者 https://www.devze.com 2023-02-10 03:42 出处:网络
I have a WebView where the user can click on links and it will load these url inside this WebView. All is fine until i set the following:

I have a WebView where the user can click on links and it will load these url inside this WebView. All is fine until i set the following:

myWebView.getSettings().setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN);  

The reason i'm using this, as it will fit all the content on screen (which i actually just need for images).

It will kill my current activity and restarts the previous. The log looks like this:

02-11 14:32:39.717: INFO/DEBUG(27): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-11 14:32:39.717: INFO/DEBUG(27): Build fingerprint: 'generic/google_sdk/generic/:2.1/ERD79/22607:eng/test-keys'
02-11 14:32:39.727: INFO/DEBUG(27): pid: 298, tid: 312  >>> com.mypackage <<<
02-11 14:32:39.727: INFO/DEBUG(27): signal 11 (SIGSEGV), fault addr 00000004
02-11 14:32:39.738: INFO/DEBUG(27):  r0 004e6731  r1 00000014  r2 00000001  r3 004e667c
02-11 14:32:39.738: INFO/DEBUG(27):  r4 00000004  r5 004e6740  r6 00000000  r7 00000000
02-11 14:32:39.748: INFO/DEBUG(27):  r8 45365d88  r9 426b8f1c  10 426b8f04  fp 002d9198
02-11 14:32:39.748: INFO/DEBUG(27):  ip 00000000  sp 45364784  lr aa17a1b7  pc aa17e856  cpsr 00000030
02-11 14:32:40.147: INFO/DEBUG(27):          #00  pc 0017e856  /system/lib/libwebcore.so
02-11 14:32:40.157: INFO/DEBUG(27):          #01  lr aa17a1b7  /system/lib/libwebcore.so
02-11 14:32:40.177: INFO/DEBUG(27): code around pc:
02-11 14:32:40.187: INFO/DEBUG(27): aa17e844 e69eda00 f7ffa813 6f22fb91 b0216ea6 
02-11 14:32:40.187: INFO/DEBUG(27): aa17e854 59a00094 1c27bdf0 683b378c 22019903 
02-11 14:32:40.187: INFO/DEBUG(27): aa17e864 18471ad0 971b2000 2f00901a da009708 
02-11 14:32:40.187: INFO/DEBUG(27): code around lr:
02-11 14:32:40.197: INFO/DEBUG(27): aa17a1a4 28004798 1c28d00f fad0f7c4 f0041c28 
02-11 14:32:40.197: INFO/DEBUG(27): aa17a1b4 9b05f9b1 181f9903 29009705 1c28d00d 
02-11 14:32:40.197: INFO/DEBUG(27): aa17a1c4 fc68f003 6828e009 680230ac 47901c28 
02-11 14:32:40.197: INFO/DEBUG(27): stack:
02-11 14:32:40.197: INFO/DEBUG(27):     45364744  004e67e0  [heap]
02-11 14:32:40.197: INFO/DEBUG(27):     45364748  0开发者_运维知识库0422618  [heap]
02-11 14:32:40.197: INFO/DEBUG(27):     4536474c  aa17d25b  /system/lib/libwebcore.so
02-11 14:32:40.197: INFO/DEBUG(27):     45364750  00000000  
02-11 14:32:40.197: INFO/DEBUG(27):     45364754  00000000  
02-11 14:32:40.207: INFO/DEBUG(27):     45364758  004e6740  [heap]
02-11 14:32:40.207: INFO/DEBUG(27):     4536475c  004e67e0  [heap]
02-11 14:32:40.207: INFO/DEBUG(27):     45364760  004e6740  [heap]
02-11 14:32:40.207: INFO/DEBUG(27):     45364764  00000000  
02-11 14:32:40.207: INFO/DEBUG(27):     45364768  aa17cc95  /system/lib/libwebcore.so
02-11 14:32:40.207: INFO/DEBUG(27):     4536476c  aa17f1e9  /system/lib/libwebcore.so
02-11 14:32:40.207: INFO/DEBUG(27):     45364770  00000000  
02-11 14:32:40.217: INFO/DEBUG(27):     45364774  00000000  
02-11 14:32:40.217: INFO/DEBUG(27):     45364778  df002777  
02-11 14:32:40.217: INFO/DEBUG(27):     4536477c  e3a070ad  
02-11 14:32:40.217: INFO/DEBUG(27):     45364780  004e667c  [heap]
02-11 14:32:40.217: INFO/DEBUG(27): #00 45364784  004e667c  [heap]
02-11 14:32:40.217: INFO/DEBUG(27):     45364788  004e6740  [heap]
02-11 14:32:40.217: INFO/DEBUG(27):     4536478c  00000000  
02-11 14:32:40.237: INFO/DEBUG(27):     45364790  00000000  
02-11 14:32:40.237: INFO/DEBUG(27):     45364794  aa17a1b7  /system/lib/libwebcore.so
02-11 14:32:40.237: INFO/DEBUG(27):     45364798  00000000  
02-11 14:32:40.247: INFO/DEBUG(27):     4536479c  004e63d0  [heap]
02-11 14:32:40.247: INFO/DEBUG(27):     453647a0  00000000  
02-11 14:32:40.257: INFO/DEBUG(27):     453647a4  00000001  
02-11 14:32:40.257: INFO/DEBUG(27):     453647a8  ffffffff  
02-11 14:32:40.289: INFO/DEBUG(27):     453647ac  00000000  
02-11 14:32:40.289: INFO/DEBUG(27):     453647b0  00332640  [heap]
02-11 14:32:40.289: INFO/DEBUG(27):     453647b4  00000001  
02-11 14:32:40.297: INFO/DEBUG(27):     453647b8  00000000  
02-11 14:32:40.307: INFO/DEBUG(27):     453647bc  004e667c  [heap]
02-11 14:32:40.307: INFO/DEBUG(27):     453647c0  00000000  
02-11 14:32:40.307: INFO/DEBUG(27):     453647c4  00000000  
02-11 14:32:40.307: INFO/DEBUG(27):     453647c8  00000000  
02-11 14:32:42.638: INFO/DEBUG(27): debuggerd committing suicide to free the zombie!

It looks like a bug in Android, does anyone know a workaround?


Seems to be fixed since 2.2:

http://code.google.com/p/android/issues/detail?id=5024&can=1&q=webview%20LayoutAlgorithm&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars

0

精彩评论

暂无评论...
验证码 换一张
取 消