I have a webview in fragment. It has been working fine for several months. I played with the HTML embedded in it (the generated string), and I think it had a bad font reference.
The result is that now on one device, this web view always shows itself when displayed, but only on one device (Galaxy Nexus), which I tested on - testing on other devices, everything works fine. it loads in the background in the viewpager, so I know that it initializes correctly, but when it displays it, it always disconnects the application on this device.
So it looks like some cached data is not being cleared somewhere. I canβt understand why the same apk works on all other devices (all versions for Android, but only crash on this one device.
I tried to clear the cache using
_web.clearCache(true); webSettings.setCacheMode(WebSettings.LOAD_NO_CACHE);
but no difference. Are there any other caches that I can clear? I rebooted the phone - no difference.
Look for any ideas on how to resolve this error - no matter how crazy!
Here is segfault - looks like related to OpenGL - does webview use opengl for fonts? - Is there a font cache for web browsing?
D/TilesManager( 5776): new EGLContext from framework: 50c5df28 D/GLWebViewState( 5776): Reinit shader W/webcore ( 5776): skip viewSizeChanged as w is 0 D/GLWebViewState( 5776): Reinit transferQueue D/MyPodV2 ( 5776): load page:0 - 0.0 D/MyPodV2 ( 5776): load page:720 - 100.0 F/libc ( 5776): Fatal signal 11 (SIGSEGV) at 0x00000008 (code=1), thread 5776 (nelweb.mypod.v2) I/DEBUG ( 121): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** I/DEBUG ( 121): Build fingerprint: 'samsung/yakjuxw/maguro:4.1.1/JRO03C/I9250XWLH2:user/release-keys' I/DEBUG ( 121): pid: 5776, tid: 5776, name: nelweb.mypod.v2 >>> co.uk.sentinelweb.mypod.v2 <<< I/DEBUG ( 121): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000008 I/DEBUG ( 121): r0 00000008 r1 585b7008 r2 00000010 r3 00000004 I/DEBUG ( 121): r4 56dbdb90 r5 56dbe9c0 r6 00000001 r7 00000004 I/DEBUG ( 121): r8 00000008 r9 00000001 sl 00000004 fp 00000001 I/DEBUG ( 121): ip 00000001 sp beac4180 lr 5863688c pc 5865f774 cpsr 80000010 I/DEBUG ( 121): d0 000000003e8374f1 d1 0000000000000000 I/DEBUG ( 121): d2 3e8374f100000000 d3 0000000000000000 I/DEBUG ( 121): d4 0000000000000000 d5 000000003f800000 I/DEBUG ( 121): d6 426d42bcc1248268 d7 3f80000000000000 I/DEBUG ( 121): d8 4411c6fc438013e9 d9 4507000000000000 I/DEBUG ( 121): d10 43e72bda4481c000 d11 43e670f943e670f9 I/DEBUG ( 121): d12 43e670f943e670f9 d13 bfa2695643f6cead I/DEBUG ( 121): d14 00000000bd134ab6 d15 0000000000000000 I/DEBUG ( 121): d16 0000000800000000 d17 0000000000000000 I/DEBUG ( 121): d18 0000000000000000 d19 0000000000000000 I/DEBUG ( 121): d20 3ff0000000000000 d21 0000000000000000 I/DEBUG ( 121): d22 0000000000000000 d23 0000000000000000 I/DEBUG ( 121): d24 0000000000000000 d25 0000000000000000 I/DEBUG ( 121): d26 0000000000000000 d27 0000000000000000 I/DEBUG ( 121): d28 0000000000000000 d29 0000000000000000 I/DEBUG ( 121): d30 0000000000000000 d31 0000000000000000 I/DEBUG ( 121): scr 20000013 I/DEBUG ( 121): I/DEBUG ( 121): backtrace: I/DEBUG ( 121):
UPDATE 10/03/13: This is the code I use to stop caching - obviously, I am a little desperate.
_web.clearCache(true); _web.setAnimationCacheEnabled(false); _web.setDrawingCacheEnabled(false); _web.setAlwaysDrawnWithCacheEnabled(false); _web.clearHistory(); _web.clearFormData(); webSettings.setJavaScriptEnabled(false); webSettings.setCacheMode(WebSettings.LOAD_NO_CACHE); webSettings.setAppCacheMaxSize(0); webSettings.setAppCachePath(""); webSettings.setAppCacheEnabled(false); getActivity().deleteDatabase("webview.db"); getActivity().deleteDatabase("webviewCache.db"); webSettings.setDomStorageEnabled(false); webSettings.setLoadsImagesAutomatically(false); _web.setWillNotCacheDrawing(true); webSettings.setBuiltInZoomControls(false); webSettings.setSupportZoom(false); webSettings.setSaveFormData(false); //_web.setWillNotDraw(true);// loads but stops drawing webSettings.setRenderPriority(WebSettings.RenderPriority.LOW);
It is interesting to note that _web.setWillNotDraw (true); stops segfault but draws nothing (which is logical), therefore indicates that segfault should be in the webview. drawing code.