Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebView.Destroy() causing Fatal Signal 11 crash

I am getting a very weird crash with webview.destroy();. However it's not a typical stacktrace-able error. It just seems to kill my app. I don't have access to logcat right now but it shows a "Fatal Signal 11" error in the WebViewCoreThread and it also shows a large log about a segmentation fault.

I have tried just about everything before calling webview.destroy(). My code is currently:

parent.removeView(wv);

wv.stopLoading();
wv.clearAnimation();
wv.clearCache(true);
wv.clearHistory();
wv.clearSslPreferences();
wv.removeAllViews();
wv.freeMemory();
wv.destroyDrawingCache();
wv.clearFocus();
wv.destroy();

This crashes every time. However, when I replace wv.destroy(); with a Runnable and run the Runnable 5 seconds later it doesn't crash. I have tried just posting it with a delay of 10 milliseconds but it sometimes works and sometimes doesn't. Regardless, using a delay is a hack and I don't like it as some devices are faster or slower and will act differently. It almost seems as though there are things going on in the background of the WebViewCoreThread that wv.destroy(); needs to be finished before being called. Also I need to call destroy because the webview doesn't truly stop doing stuff until you do.

The reason this is a problem mainly is because I need to destroy the webview and create a brand new one while the activity is visible and this may happen many times during the life of the application.

Here is the log dump: Also note, I know it says "called while still attached" but I had detached it. This really puzzled me.

E/webview ( 3271): Error: WebView.destroy() called while still attached!
D/webviewglue( 3271): nativeDestroy view: 0x71ee4d88
F/libc    ( 3271): Fatal signal 11 (SIGSEGV) at 0x00750020 (code=1), thread 3285 (WebViewCoreThre)
D/dalvikvm( 2902): GC_CONCURRENT freed 378K, 5% free 9463K/9892K, paused 1ms+3ms, total 21ms
I/DEBUG   (13302): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   (13302): Build fingerprint: 'google/mantaray/manta:4.2.1/JOP40F/545822:user/release-keys'
I/DEBUG   (13302): Revision: '8'
I/DEBUG   (13302): pid: 3271, tid: 3285, name: WebViewCoreThre  >>> com.example.mobile.app:com.example.mobile.app.Brows <<<
I/DEBUG   (13302): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00750020
I/DEBUG   (13302):     r0 00750000  r1 70c52458  r2 00500000  r3 71eedbc0
I/DEBUG   (13302):     r4 70c46318  r5 00000000  r6 00000000  r7 00000000
I/DEBUG   (13302):     r8 00000000  r9 7292eeec  sl 71ebf080  fp 72a2ec8c
I/DEBUG   (13302):     ip 71cbc00c  sp 72a2ec08  lr 716b6e3b  pc 716ed126  cpsr 60000030
I/DEBUG   (13302):     d0  78a329c800000100  d1  000000004059966f
I/DEBUG   (13302):     d2  776f696b2e697300  d3  65696c632e657200
I/DEBUG   (13302):     d4  6c69626f6d2e746e  d5  65772f7070612e65
I/DEBUG   (13302):     d6  6863616370706162  d7  63696c7070412f65
I/DEBUG   (13302):     d8  0000000000000000  d9  0000000000000000
I/DEBUG   (13302):     d10 0000000000000000  d11 0000000000000000
I/DEBUG   (13302):     d12 0000000000000000  d13 0000000000000000
I/DEBUG   (13302):     d14 0000000000000000  d15 0000000000000000
I/DEBUG   (13302):     d16 0000000000000001  d17 000000000000002d
I/DEBUG   (13302):     d18 000000000000002e  d19 7fffffffffffffff
I/DEBUG   (13302):     d20 00b6802e00b3802d  d21 00bc802f00b9802f
I/DEBUG   (13302):     d22 0707070703030303  d23 0000002f0000002e
I/DEBUG   (13302):     d24 0000000000000000  d25 0000000000000000
I/DEBUG   (13302):     d26 0000002f0000002f  d27 0000002f0000002f
I/DEBUG   (13302):     d28 0001000000010000  d29 0001000000010000
I/DEBUG   (13302):     d30 0003000000030000  d31 0003000000030000
I/DEBUG   (13302):     scr 20000090
I/DEBUG   (13302): 
I/DEBUG   (13302): backtrace:
I/DEBUG   (13302):     #00  pc 00158126  /system/lib/libwebcore.so
I/DEBUG   (13302):     #01  pc 00158857  /system/lib/libwebcore.so
I/DEBUG   (13302):     #02  pc 0001e290  /system/lib/libdvm.so (dvmPlatformInvoke+112)
I/DEBUG   (13302):     #03  pc 0004d411  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+396)
I/DEBUG   (13302):     #04  pc 000276a0  /system/lib/libdvm.so
I/DEBUG   (13302):     #05  pc 0002b57c  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
I/DEBUG   (13302):     #06  pc 0005fc31  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+272)
I/DEBUG   (13302):     #07  pc 0005fc5b  /system/lib/libdvm.so (dvmCallMethod(Thread*, Method const*, Object*, JValue*, ...)+20)
I/DEBUG   (13302):     #08  pc 000547d7  /system/lib/libdvm.so
I/DEBUG   (13302):     #09  pc 0000e3d8  /system/lib/libc.so (__thread_entry+72)
I/DEBUG   (13302):     #10  pc 0000dac4  /system/lib/libc.so (pthread_create+160)
I/DEBUG   (13302):     #11  pc 0001260c  <unknown>
I/DEBUG   (13302): 
I/DEBUG   (13302): stack:
I/DEBUG   (13302):          72a2ebc8  c0000000  
I/DEBUG   (13302):          72a2ebcc  405a2464  /system/lib/libsqlite.so
I/DEBUG   (13302):          72a2ebd0  78a37670  
I/DEBUG   (13302):          72a2ebd4  405a2cd8  /system/lib/libsqlite.so
I/DEBUG   (13302):          72a2ebd8  00000000  
I/DEBUG   (13302):          72a2ebdc  00000001  
I/DEBUG   (13302):          72a2ebe0  72a2ec1c  [stack:3285]
I/DEBUG   (13302):          72a2ebe4  716889a3  /system/lib/libwebcore.so
I/DEBUG   (13302):          72a2ebe8  72a2ec1c  [stack:3285]
I/DEBUG   (13302):          72a2ebec  71b10719  /system/lib/libwebcore.so
I/DEBUG   (13302):          72a2ebf0  70c52458  
I/DEBUG   (13302):          72a2ebf4  70c52458  
I/DEBUG   (13302):          72a2ebf8  71eedbc0  
I/DEBUG   (13302):          72a2ebfc  70c46318  
I/DEBUG   (13302):          72a2ec00  df0027ad  
I/DEBUG   (13302):          72a2ec04  00000000  
I/DEBUG   (13302):     #00  72a2ec08  00000040  
I/DEBUG   (13302):          72a2ec0c  72a2ec28  [stack:3285]
I/DEBUG   (13302):          72a2ec10  70c52458  
I/DEBUG   (13302):          72a2ec14  70c52458  
I/DEBUG   (13302):          72a2ec18  70c52458  
I/DEBUG   (13302):          72a2ec1c  71b10719  /system/lib/libwebcore.so
I/DEBUG   (13302):          72a2ec20  00423f3c  
I/DEBUG   (13302):          72a2ec24  716ed85b  /system/lib/libwebcore.so
I/DEBUG   (13302):     #01  72a2ec28  70c09208  
I/DEBUG   (13302):          72a2ec2c  70c46c08  
I/DEBUG   (13302):          72a2ec30  71eedcb0  
I/DEBUG   (13302):          72a2ec34  71eedcb0  
I/DEBUG   (13302):          72a2ec38  71eedbc0  
I/DEBUG   (13302):          72a2ec3c  71eedcb0  
I/DEBUG   (13302):          72a2ec40  00000000  
I/DEBUG   (13302):          72a2ec44  00000000  
I/DEBUG   (13302):          72a2ec48  00000000  
I/DEBUG   (13302):          72a2ec4c  00000000  
I/DEBUG   (13302):          72a2ec50  00000000  
I/DEBUG   (13302):          72a2ec54  00000000  
I/DEBUG   (13302):          72a2ec58  00000000  
I/DEBUG   (13302):          72a2ec5c  00000000  
I/DEBUG   (13302):          72a2ec60  6cf71c28  /dev/ashmem/dalvik-LinearAlloc (deleted)
I/DEBUG   (13302):          72a2ec64  71ebf070  
I/DEBUG   (13302):          ........  ........
I/DEBUG   (13302):     #02  72a2ec78  7292eeec  
I/DEBUG   (13302):          72a2ec7c  00000001  
I/DEBUG   (13302):          72a2ec80  41ca85d0  /dev/ashmem/dalvik-heap (deleted)
I/DEBUG   (13302):          72a2ec84  00000008  
I/DEBUG   (13302):          72a2ec88  00000000  
I/DEBUG   (13302):          72a2ec8c  40808415  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+400)
I/DEBUG   (13302): 
I/DEBUG   (13302): memory near r0:
I/DEBUG   (13302):     0074ffe0 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     0074fff0 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     00750000 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     00750010 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     00750020 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     00750030 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     00750040 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     00750050 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     00750060 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     00750070 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     00750080 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     00750090 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     007500a0 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     007500b0 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     007500c0 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     007500d0 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302): 
I/DEBUG   (13302): memory near r1:
I/DEBUG   (13302):     70c52438 00000000 00000000 00000000 00000000  
I/DEBUG   (13302):     70c52448 00000000 00000000 00000000 00000000  
I/DEBUG   (13302):     70c52458 00750000 00000013 71e6d448 00000002  
I/DEBUG   (13302):     70c52468 78a2f798 00000023 40695d28 00000002  
I/DEBUG   (13302):     70c52478 00000008 70c52490 4077af2d 00000000  
I/DEBUG   (13302):     70c52488 00000000 0000002b 70c53370 70c53180  
I/DEBUG   (13302):     70c52498 00000000 00000000 00000000 00000000  
I/DEBUG   (13302):     70c524a8 00000000 80002059 00000000 00000013  
I/DEBUG   (13302):     70c524b8 00000020 00000000 70c3f2a0 00000023  
I/DEBUG   (13302):     70c524c8 40695d28 00000001 00000008 70c524e8  
I/DEBUG   (13302):     70c524d8 4077af2d 00000000 00000005 0000002b  
I/DEBUG   (13302):     70c524e8 70c52338 6fc7d068 00000000 6fc7d068  
I/DEBUG   (13302):     70c524f8 00000000 6fc7d0a8 6f93bd90 6f93bed4  
I/DEBUG   (13302):     70c52508 00000000 0000002b 00000098 00000008  
I/DEBUG   (13302):     70c52518 70c52524 00000000 00a6421a 006e006f  
I/DEBUG   (13302):     70c52528 00750073 006d0062 00740069 0000001b  
I/DEBUG   (13302): 
I/DEBUG   (13302): memory near r2:
I/DEBUG   (13302):     004fffe0 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     004ffff0 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     00500000 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     00500010 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     00500020 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     00500030 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     00500040 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     00500050 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     00500060 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     00500070 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     00500080 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     00500090 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     005000a0 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     005000b0 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     005000c0 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302):     005000d0 ffffffff ffffffff ffffffff ffffffff  
I/DEBUG   (13302): 
I/DEBUG   (13302): memory near r3:
I/DEBUG   (13302):     71eedba0 00000000 00000000 00000000 00000000  
I/DEBUG   (13302):     71eedbb0 00000000 00000000 00000000 00000000  
I/DEBUG   (13302):     71eedbc0 70c50988 70c46318 00000000 00000000  
I/DEBUG   (13302):     71eedbd0 00000000 00000000 00000000 00000000  
I/DEBUG   (13302):     71eedbe0 00000000 00000000 00000000 00000000  
I/DEBUG   (13302):     71eedbf0 00000000 00000000 00000000 00000000  
I/DEBUG   (13302):     71eedc00 00000000 00000000 00000000 00000000  
I/DEBUG   (13302):     71eedc10 00000000 00000000 00000000 00000000  
I/DEBUG   (13302):     71eedc20 00000000 00000000 00000000 00000000  
I/DEBUG   (13302):     71eedc30 00000000 00000000 00000000 00000000  
I/DEBUG   (13302):     71eedc40 00000000 00000000 00000000 00000000  
I/DEBUG   (13302):     71eedc50 00000000 00000000 00000000 00000000  
I/DEBUG   (13302):     71eedc60 00000000 00000000 00000000 00000000  
I/DEBUG   (13302):     71eedc70 00000000 00000000 00000000 00000000  
I/DEBUG   (13302):     71eedc80 00000000 00000000 00000000 00000000  
I/DEBUG   (13302):     71eedc90 00000000 00000000 00000000 00000000  
I/DEBUG   (13302): 
I/DEBUG   (13302): memory near r4:
I/DEBUG   (13302):     70c462f8 0065006e 00620073 00720075 00000067  
I/DEBUG   (13302):     70c46308 00000000 20009c00 00000038 0000004b  
I/DEBUG   (13302):     70c46318 70c50988 70c52358 00000040 0000003f  
I/DEBUG   (13302):     70c46328 00000000 00000001 00000000 00000000  
I/DEBUG   (13302):     70c46338 00000000 00000000 00000000 6f591900  
I/DEBUG   (13302):     70c46348 00000001 00000000 00000000 00000000  
I/DEBUG   (13302):     70c46358 70c46360 0000001b 00500000 00000000  
I/DEBUG   (13302):     70c46368 00500000 00000000 00000000 0000001b  
I/DEBUG   (13302):     70c46378 00000008 00000000 74786574 756f6a00  
I/DEBUG   (13302):     70c46388 6c616e72 0000001b 00000008 00000000  
I/DEBUG   (13302):     70c46398 74786574 080bff00 00000018 0000002b  
I/DEBUG   (13302):     70c463a8 6f709a04 ffffffff 00000000 00000000  
I/DEBUG   (13302):     70c463b8 43de3400 42eccefa 0000026c 00000029  
I/DEBUG   (13302):     70c463c8 00000028 00000023 6f708762 400f3c74  
I/DEBUG   (13302):     70c463d8 00000000 00000000 43de3400 42eccefa  
I/DEBUG   (13302):     70c463e8 00000020 00000023 6f709cd4 40695c00  
I/DEBUG   (13302): 
I/DEBUG   (13302): memory near r9:
I/DEBUG   (13302):     7292eecc 423c9510 00000000 423ca190 7292ef00  
I/DEBUG   (13302):     7292eedc 6e479470 6cf71c28 00000000 00000000  
I/DEBUG   (13302):     7292eeec 7292ef14 6e47923e 6cf71b10 6e479470  
I/DEBUG   (13302):     7292eefc 00000000 7292ef64 6e1b61f4 6d077fd8  
I/DEBUG   (13302):     7292ef0c 6e47923e 00000000 00000000 00000001  
I/DEBUG   (13302):     7292ef1c 423f4508 7292ef84 6e39f44e 6ce1b3f8  
I/DEBUG   (13302):     7292ef2c 6e3a0af4 00000000 00000000 00000000  
I/DEBUG   (13302):     7292ef3c 00000003 423f4508 00000000 423dc068  
I/DEBUG   (13302):     7292ef4c 423f4508 7292ef84 6e39f4c8 6ce68200  
I/DEBUG   (13302):     7292ef5c 6e1b61f4 00000000 00000000 423dc068  
I/DEBUG   (13302):     7292ef6c 423f4508 7292efc4 6e48cf7a 6cf12218  
I/DEBUG   (13302):     7292ef7c 6e39f4c8 00000000 00000cc7 00002753  
I/DEBUG   (13302):     7292ef8c 00000000 423cac28 423f4508 00000cc7  
I/DEBUG   (13302):     7292ef9c 00002753 423caa70 423dc068 00000000  
I/DEBUG   (13302):     7292efac 41ca7860 7292efe4 417a6028 6d070658  
I/DEBUG   (13302):     7292efbc 6e48cf7a 00000000 41ca7860 41ca7860  
I/DEBUG   (13302): 
I/DEBUG   (13302): memory near sl:
I/DEBUG   (13302):     71ebf060 00000004 00000000 70c326a0 00000453  
I/DEBUG   (13302):     71ebf070 417a601c 7292eeec 6cf71b10 6ea11000  
I/DEBUG   (13302):     71ebf080 423f4508 00000000 72a2eda0 00000000  
I/DEBUG   (13302):     71ebf090 72a2edd4 0000000c 00000000 407d9400  
I/DEBUG   (13302):     71ebf0a0 00000000 00000000 40ab7470 7292b300  
I/DEBUG   (13302):     71ebf0b0 00000000 00000000 00000001 00004000  
I/DEBUG   (13302):     71ebf0c0 00000000 71e858a0 407d9400 407de2c0  
I/DEBUG   (13302):     71ebf0d0 00000000 407e23bc 407e2430 407e22e0  
I/DEBUG   (13302):     71ebf0e0 407e2300 407e235c 00000000 00000000  
I/DEBUG   (13302):     71ebf0f0 78bd0c30 00000028 00000000 00000000  
I/DEBUG   (13302):     71ebf100 00000000 00000000 00002000 408698d4  
I/DEBUG   (13302):     71ebf110 00000000 00000000 00000001 71ec0e90  
I/DEBUG   (13302):     71ebf120 00000001 00000040 00000200 00000000  
I/DEBUG   (13302):     71ebf130 00000000 00000000 00000000 00000000  
I/DEBUG   (13302):     71ebf140 00000000 00000000 00000000 00000000  
I/DEBUG   (13302):     71ebf150 00000000 00000000 00000000 00000000  
I/DEBUG   (13302): 
I/DEBUG   (13302): memory near fp:
I/DEBUG   (13302):     72a2ec6c 7292eef4 72a2ec78 407d9294 7292eeec  
I/DEBUG   (13302):     72a2ec7c 00000001 41ca85d0 00000008 00000000  
I/DEBUG   (13302):     72a2ec8c 40808415 7292eeec 6e678599 717d494b  
I/DEBUG   (13302):     72a2ec9c 71ebf080 41ca85d0 00000000 00000001  
I/DEBUG   (13302):     72a2ecac 400f4228 40858319 00000000 00000000  
I/DEBUG   (13302):     72a2ecbc 00000005 72a2ec98 00000001 0000ac79  
I/DEBUG   (13302):     72a2eccc 71ebf070 41700b18 6e61a636 6e6a8bbd  
I/DEBUG   (13302):     72a2ecdc 4375c004 6e8e8512 00000000 72a2ed54  
I/DEBUG   (13302):     72a2ecec 6cf71c3c 00000001 41ca85d0 00000001  
I/DEBUG   (13302):     72a2ecfc 6cf71c28 000001f8 6e70acd7 00000008  
I/DEBUG   (13302):     72a2ed0c 00000001 72a2ed54 40825ebd 6e70acd7  
I/DEBUG   (13302):     72a2ed1c 41ca85d0 6e70acd7 0000a890 6ea11000  
I/DEBUG   (13302):     72a2ed2c 00000002 6e147e84 400f4228 41700b18  
I/DEBUG   (13302):     72a2ed3c 40826357 72a2ed54 6e70acd7 72a2ed54  
I/DEBUG   (13302):     72a2ed4c 408269b9 71ebf070 41700b18 000015f5  
I/DEBUG   (13302):     72a2ed5c 0000000c 423caa74 7292ef00 1dcd64ff  
I/DEBUG   (13302): 
I/DEBUG   (13302): memory near ip:
I/DEBUG   (13302):     71cbbfec 400ca761 400ca651 71dff1e5 400c5d47  
I/DEBUG   (13302):     71cbbffc 400cb1d1 400fe8f7 400fe8e9 400b5ef5  
I/DEBUG   (13302):     71cbc00c 400c2560 400c1600 400c170c 400b5f1d  
I/DEBUG   (13302):     71cbc01c 400b5f09 400b5f31 400fe855 400fe8ab  
I/DEBUG   (13302):     71cbc02c 400b641c 400b6470 400b6524 400b6430  
I/DEBUG   (13302):     71cbc03c 400c0734 400bfe84 400b6fe8 400b6738  
I/DEBUG   (13302):     71cbc04c 400b6c68 400b7068 400b70a4 400b749c  
I/DEBUG   (13302):     71cbc05c 400b7494 400b73e4 400b70c0 400b60c0  
I/DEBUG   (13302):     71cbc06c 400b635c 400b6830 400b74a4 400b6a24  
I/DEBUG   (13302):     71cbc07c 400b77fc 400b75fc 400b78a8 400e1bb3  
I/DEBUG   (13302):     71cbc08c 4061720d 40619a69 400c11a4 40646c55  
I/DEBUG   (13302):     71cbc09c 409736a4 406466a1 40646335 406461bd  
I/DEBUG   (13302):     71cbc0ac 4097374c 4097376c 40973848 400e2e88  
I/DEBUG   (13302):     71cbc0bc 400ca29d 400ce121 400c6635 400fe901  
I/DEBUG   (13302):     71cbc0cc 407788c9 4061ae01 400c2690 405f2b45  
I/DEBUG   (13302):     71cbc0dc 407790e1 4076516d 40765155 407794c5  
I/DEBUG   (13302): 
I/DEBUG   (13302): memory near sp:
I/DEBUG   (13302):     72a2ebe8 72a2ec1c 71b10719 70c52458 70c52458  
I/DEBUG   (13302):     72a2ebf8 71eedbc0 70c46318 df0027ad 00000000  
I/DEBUG   (13302):     72a2ec08 00000040 72a2ec28 70c52458 70c52458  
I/DEBUG   (13302):     72a2ec18 70c52458 71b10719 00423f3c 716ed85b  
I/DEBUG   (13302):     72a2ec28 70c09208 70c46c08 71eedcb0 71eedcb0  
I/DEBUG   (13302):     72a2ec38 71eedbc0 71eedcb0 00000000 00000000  
I/DEBUG   (13302):     72a2ec48 00000000 00000000 00000000 00000000  
I/DEBUG   (13302):     72a2ec58 00000000 00000000 6cf71c28 71ebf070  
I/DEBUG   (13302):     72a2ec68 00000000 7292eef4 72a2ec78 407d9294  
I/DEBUG   (13302):     72a2ec78 7292eeec 00000001 41ca85d0 00000008  
I/DEBUG   (13302):     72a2ec88 00000000 40808415 7292eeec 6e678599  
I/DEBUG   (13302):     72a2ec98 717d494b 71ebf080 41ca85d0 00000000  
I/DEBUG   (13302):     72a2eca8 00000001 400f4228 40858319 00000000  
I/DEBUG   (13302):     72a2ecb8 00000000 00000005 72a2ec98 00000001  
I/DEBUG   (13302):     72a2ecc8 0000ac79 71ebf070 41700b18 6e61a636  
I/DEBUG   (13302):     72a2ecd8 6e6a8bbd 4375c004 6e8e8512 00000000  
I/DEBUG   (13302): 
I/DEBUG   (13302): code around pc:
I/DEBUG   (13302):     716ed104 f7994010 bd10b91e 4604b530 b0856b45  
I/DEBUG   (13302):     716ed114 1d01b9ad f7c9a802 9902fe82 68086c22  
I/DEBUG   (13302):     716ed124 6a016812 310ca801 ff12f0a1 6b609b01  
I/DEBUG   (13302):     716ed134 63639501 fdb0f79f f79f9801 6b60fdad  
I/DEBUG   (13302):     716ed144 bd30b005 461fb5d3 302cf890 46164604  
I/DEBUG   (13302):     716ed154 2201b973 f8801d01 4668202c fe5ff7c9  
I/DEBUG   (13302):     716ed164 680b9900 68806818 f8d26802 478810e0  
I/DEBUG   (13302):     716ed174 b14069a0 0018f104 463b4632 feccf7ff  
I/DEBUG   (13302):     716ed184 bf183000 bddc2001 4601b537 46686884  
I/DEBUG   (13302):     716ed194 3f04f851 0484eb03 fe41f7c9 6818e014  
I/DEBUG   (13302):     716ed1a4 e0096ac5 02f8f8d5 fb17f185 001cf105  
I/DEBUG   (13302):     716ed1b4 f7f92100 4605fcb1 d1f32d00 46689a00  
I/DEBUG   (13302):     716ed1c4 91001d11 fef5f799 42a39b00 bd3ed1e7  
I/DEBUG   (13302):     716ed1d4 4605b530 b0854c11 6824447c 4668b1dc  
I/DEBUG   (13302):     716ed1e4 f7994621 a802fb4b f7dc4621 e00efed5  
I/DEBUG   (13302):     716ed1f4 6b436858 f7ffb12b 6801ff87 4629698a  
I/DEBUG   (13302): 
I/DEBUG   (13302): code around lr:
I/DEBUG   (13302):     716b6e18 ffa5f7f7 b0134620 b537bd30 68484604  
I/DEBUG   (13302):     716b6e28 680b466d 0280eb03 93004668 f7d09201  
I/DEBUG   (13302):     716b6e38 e89df8be e8840003 46200003 0000bd3e  
I/DEBUG   (13302):     716b6e48 41f0e92d f8904604 b086305d d1662b00  
I/DEBUG   (13302):     716b6e58 f8904934 44796075 f1be6809 f10dfd77  
I/DEBUG   (13302):     716b6e68 f7d20107 4605fb69 0007f89d ea35b128  
I/DEBUG   (13302):     716b6e78 bf280525 7596f44f f44fe001 492a7596  
I/DEBUG   (13302):     716b6e88 44794620 f1be6809 f10dfd61 f7d20107  
I/DEBUG   (13302):     716b6e98 f89dfb53 b1211007 0020ea30 2096bf28  
I/DEBUG   (13302):     716b6ea8 2096e000 a9029003 f8d44620 6d678050  
I/DEBUG   (13302):     716b6eb8 f7f89502 6da0f9f2 6805b130 479068aa  
I/DEBUG   (13302):     716b6ec8 6da0b110 fda3f00e b1856a25 305cf894  
I/DEBUG   (13302):     716b6ed8 6d20b16b d1024580 428f6d61 4628d002  
I/DEBUG   (13302):     716b6ee8 f838f090 4628b11e f0a72100 6c22fcc9  
I/DEBUG   (13302):     716b6ef8 f8514621 a8045f3c 0582eb05 ff8df7ff  
I/DEBUG   (13302):     716b6f08 6818e00a 68ca6801 47904621 1d039804  
I/DEBUG   (13302): 
I/DEBUG   (13302): memory map around fault addr 00750020:
I/DEBUG   (13302):     (no map below)
I/DEBUG   (13302):     (no map for address)
I/DEBUG   (13302):     21100000-21200000 
D/dalvikvm( 2902): GC_CONCURRENT freed 399K, 5% free 9458K/9892K, paused 2ms+9ms, total 18ms
I/BootReceiver(  385): Copying /data/tombstones/tombstone_08 to DropBox (SYSTEM_TOMBSTONE)
D/dalvikvm(  385): GC_FOR_ALLOC freed 914K, 19% free 18216K/22488K, paused 55ms, total 56ms
I/WindowState(  385): WIN DEATH: Window{42862300 u0 com.example.mobile.app.BrowserMain}
I/ActivityManager(  385): Process com.example.mobile.app.BrowserMain (pid 3271) has died.
W/ActivityManager(  385): Force removing ActivityRecord{42932180 u0 com.example.mobile.app/.BrowserMain}: app died, no saved state
D/mali_winsys(  778): new_window_surface returns 0x3000
D/Zygote  (  125): Process 3271 terminated by signal (11)
like image 896
Randy Avatar asked Sep 12 '13 04:09

Randy


1 Answers

After a full day of searching and testing I figured it out. My browser has a setting to delete all HTML5 webstorage when you close the browser. When I turned that off, everything worked fine. So it actually has nothing to do with webview.destroy(); except to say this:

In order to delete all HTML5 webstorage you must call WebStorage.getInstance().deleteAllData();. The problem is an undocumented issue (bug?) with this API call. You MUST have a 'living' instance of a webview when you make this call. If you don't, the WebViewCoreThread will send a Fatal Signal 11 signal which will kill your app. In my app 'webview.destroy()' was called JUST before this WebStorage API function which meant I had no 'living' webviews when making the call. The timeout worked only because it kept the webview around long enough for the WebStorage API call to have an available 'living' webview.

I discovered this after making a SUPER simple app with 3 buttons:

  1. Create and Load WebView
  2. Destroy Webview
  3. Delete All Web Storage

If you manually clicked 1, 2, the 3 in order it always crashed with the same Fatal Signal 11. If however you clicked 1, 3, and THEN 2, it always worked. So I made another 2 buttons which did those 2 different orders but on a single click and they showed the same results.


Long Story Short:

Always have at least one living webview before deleting all data. So call WebStorage.getInstance().deleteAllData(); before webview.destroy();

like image 128
Randy Avatar answered Sep 27 '22 01:09

Randy