Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11771] Android: WebView crashes with basic HTML on emulator

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-03-12T23:14:36.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.1.0, 2013 Sprint 05 API, 2013 Sprint 05
ComponentsAndroid
Labelsapi, qe-testadded
ReporterIvan Skugor
AssigneeVishal Duggal
Created2012-10-25T09:46:00.000+0000
Updated2013-09-26T11:48:01.000+0000

Description

The problem

WebView component crashes Android emulator even when basic HTML is loaded. This makes testing of app with WebView imposible. :(

Test case

Test case for this issue is very simple:
var win = Ti.UI.createWindow();

var webView = Ti.UI.createWebView();

webView.html = '<html><head><title></title></head><body>Testing testing .... </body></html>';

win.add(webView);

win.open();

Run this code on Android emulator and wait a bit until emulator crashes. Here is error log:
10-25 11:40:30.056: W/dalvikvm(964): JNI WARNING: jarray 0x4058d540 points to non-array object (Ljava/lang/String;)
10-25 11:40:30.056: I/dalvikvm(964): "WebViewCoreThread" prio=5 tid=12 NATIVE
10-25 11:40:30.056: I/dalvikvm(964):   | group="main" sCount=0 dsCount=0 obj=0x4055b4d8 self=0x1fad90
10-25 11:40:30.056: I/dalvikvm(964):   | sysTid=976 nice=0 sched=0/0 cgrp=default handle=2385528
10-25 11:40:30.066: I/dalvikvm(964):   | schedstat=( 262919029 305332027 68 )
10-25 11:40:30.076: I/dalvikvm(964):   at android.webkit.JWebCoreJavaBridge.sharedTimerFired(Native Method)
10-25 11:40:30.076: I/dalvikvm(964):   at android.webkit.JWebCoreJavaBridge.sharedTimerFired(Native Method)
10-25 11:40:30.076: I/dalvikvm(964):   at android.webkit.JWebCoreJavaBridge.fireSharedTimer(JWebCoreJavaBridge.java:91)
10-25 11:40:30.086: I/dalvikvm(964):   at android.webkit.JWebCoreJavaBridge.handleMessage(JWebCoreJavaBridge.java:108)
10-25 11:40:30.096: I/dalvikvm(964):   at android.os.Handler.dispatchMessage(Handler.java:99)
10-25 11:40:30.096: I/dalvikvm(964):   at android.os.Looper.loop(Looper.java:130)
10-25 11:40:30.096: I/dalvikvm(964):   at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:629)
10-25 11:40:30.096: I/dalvikvm(964):   at java.lang.Thread.run(Thread.java:1019)
10-25 11:40:30.116: E/dalvikvm(964): VM aborting
10-25 11:40:30.236: I/DEBUG(815): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
10-25 11:40:30.236: I/DEBUG(815): Build fingerprint: 'generic/google_sdk/generic:2.3.4/GINGERBREAD/123630:eng/test-keys'
10-25 11:40:30.236: I/DEBUG(815): pid: 964, tid: 976  >>> hr.iskugor.test <<<
10-25 11:40:30.236: I/DEBUG(815): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadd00d
10-25 11:40:30.236: I/DEBUG(815):  r0 fffffec4  r1 deadd00d  r2 00000026  r3 00000000
10-25 11:40:30.236: I/DEBUG(815):  r4 800a45c0  r5 4058d540  r6 80085acc  r7 00246768
10-25 11:40:30.236: I/DEBUG(815):  r8 45e0bb58  r9 4506bf0c  10 4506bef4  fp 437cd8ec
10-25 11:40:30.236: I/DEBUG(815):  ip 800a4720  sp 45e0b678  lr afd19375  pc 80045a4a  cpsr 20000030
10-25 11:40:30.686: I/DEBUG(815):          #00  pc 00045a4a  /system/lib/libdvm.so
10-25 11:40:30.686: I/DEBUG(815):          #01  pc 00037748  /system/lib/libdvm.so
10-25 11:40:30.696: I/DEBUG(815):          #02  pc 00039a10  /system/lib/libdvm.so
10-25 11:40:30.696: I/DEBUG(815):          #03  pc 0003a4ec  /system/lib/libdvm.so
10-25 11:40:30.696: I/DEBUG(815):          #04  pc 0029864e  /system/lib/libwebcore.so
10-25 11:40:30.696: I/DEBUG(815):          #05  pc 00211d1c  /system/lib/libwebcore.so
10-25 11:40:30.706: I/DEBUG(815):          #06  pc 001133be  /system/lib/libwebcore.so
10-25 11:40:30.706: I/DEBUG(815):          #07  pc 002127e8  /system/lib/libwebcore.so
10-25 11:40:30.716: I/DEBUG(815):          #08  pc 002c6de6  /system/lib/libwebcore.so
10-25 11:40:30.716: I/DEBUG(815):          #09  pc 002ca13e  /system/lib/libwebcore.so
10-25 11:40:30.726: I/DEBUG(815):          #10  pc 002d8028  /system/lib/libwebcore.so
10-25 11:40:30.726: I/DEBUG(815):          #11  pc 002cf760  /system/lib/libwebcore.so
10-25 11:40:30.736: I/DEBUG(815):          #12  pc 0020fd0c  /system/lib/libwebcore.so
10-25 11:40:30.736: I/DEBUG(815):          #13  pc 0020fd8a  /system/lib/libwebcore.so
10-25 11:40:30.746: I/DEBUG(815):          #14  pc 0020fdf8  /system/lib/libwebcore.so
10-25 11:40:30.746: I/DEBUG(815):          #15  pc 001e7e4e  /system/lib/libwebcore.so
10-25 11:40:30.756: I/DEBUG(815):          #16  pc 0007eae2  /system/lib/libwebcore.so
10-25 11:40:30.756: I/DEBUG(815):          #17  pc 0007eb8c  /system/lib/libwebcore.so
10-25 11:40:30.766: I/DEBUG(815):          #18  pc 0011b21e  /system/lib/libwebcore.so
10-25 11:40:30.766: I/DEBUG(815):          #19  pc 00017d74  /system/lib/libdvm.so
10-25 11:40:30.766: I/DEBUG(815):          #20  pc 00048f08  /system/lib/libdvm.so
10-25 11:40:30.776: I/DEBUG(815):          #21  pc 00041ab6  /system/lib/libdvm.so
10-25 11:40:30.786: I/DEBUG(815):          #22  pc 0001cfd4  /system/lib/libdvm.so
10-25 11:40:30.786: I/DEBUG(815):          #23  pc 000220dc  /system/lib/libdvm.so
10-25 11:40:30.796: I/DEBUG(815):          #24  pc 00020fd0  /system/lib/libdvm.so
10-25 11:40:30.796: I/DEBUG(815):          #25  pc 0005f430  /system/lib/libdvm.so
10-25 11:40:30.805: I/DEBUG(815):          #26  pc 0005f656  /system/lib/libdvm.so
10-25 11:40:30.805: I/DEBUG(815):          #27  pc 00053b4e  /system/lib/libdvm.so
10-25 11:40:30.816: I/DEBUG(815):          #28  pc 00011a7c  /system/lib/libc.so
10-25 11:40:30.816: I/DEBUG(815):          #29  pc 00011640  /system/lib/libc.so
10-25 11:40:30.826: I/DEBUG(815): code around pc:
10-25 11:40:30.826: I/DEBUG(815): 80045a28 447a4479 ed0cf7d1 20004c09 ee34f7d1 
10-25 11:40:30.826: I/DEBUG(815): 80045a38 447c4808 6bdb5823 d0002b00 49064798 
10-25 11:40:30.826: I/DEBUG(815): 80045a48 700a2226 eea0f7d1 000436b7 00045275 
10-25 11:40:30.836: I/DEBUG(815): 80045a58 0005eb82 fffffec4 deadd00d b510b40e 
10-25 11:40:30.836: I/DEBUG(815): 80045a68 4c0a4b09 447bb083 aa05591b 6b5bca02 
10-25 11:40:30.836: I/DEBUG(815): code around lr:
10-25 11:40:30.836: I/DEBUG(815): afd19354 b0834a0d 589c447b 26009001 686768a5 
10-25 11:40:30.836: I/DEBUG(815): afd19364 220ce008 2b005eab 1c28d003 47889901 
10-25 11:40:30.846: I/DEBUG(815): afd19374 35544306 d5f43f01 2c006824 b003d1ee 
10-25 11:40:30.846: I/DEBUG(815): afd19384 bdf01c30 000281a8 ffffff88 1c0fb5f0 
10-25 11:40:30.846: I/DEBUG(815): afd19394 43551c3d a904b087 1c16ac01 604d9004 
10-25 11:40:30.846: I/DEBUG(815): stack:
10-25 11:40:30.846: I/DEBUG(815):     45e0b638  00000015  
10-25 11:40:30.846: I/DEBUG(815):     45e0b63c  afd18407  /system/lib/libc.so
10-25 11:40:30.846: I/DEBUG(815):     45e0b640  afd4270c  /system/lib/libc.so
10-25 11:40:30.856: I/DEBUG(815):     45e0b644  afd426b8  /system/lib/libc.so
10-25 11:40:30.856: I/DEBUG(815):     45e0b648  00000000  
10-25 11:40:30.856: I/DEBUG(815):     45e0b64c  afd19375  /system/lib/libc.so
10-25 11:40:30.866: I/DEBUG(815):     45e0b650  001fad90  [heap]
10-25 11:40:30.866: I/DEBUG(815):     45e0b654  afd183d9  /system/lib/libc.so
10-25 11:40:30.866: I/DEBUG(815):     45e0b658  00246768  [heap]
10-25 11:40:30.866: I/DEBUG(815):     45e0b65c  0005eb82  [heap]
10-25 11:40:30.876: I/DEBUG(815):     45e0b660  4058d540  /dev/ashmem/dalvik-heap (deleted)
10-25 11:40:30.876: I/DEBUG(815):     45e0b664  80085acc  /system/lib/libdvm.so
10-25 11:40:30.876: I/DEBUG(815):     45e0b668  00246768  [heap]
10-25 11:40:30.876: I/DEBUG(815):     45e0b66c  afd18437  /system/lib/libc.so
10-25 11:40:30.876: I/DEBUG(815):     45e0b670  df002777  
10-25 11:40:30.886: I/DEBUG(815):     45e0b674  e3a070ad  
10-25 11:40:30.886: I/DEBUG(815): #00 45e0b678  00000001  
10-25 11:40:30.886: I/DEBUG(815):     45e0b67c  8003774d  /system/lib/libdvm.so
10-25 11:40:30.896: I/DEBUG(815): #01 45e0b680  00000001  
10-25 11:40:30.896: I/DEBUG(815):     45e0b684  80039a15  /system/lib/libdvm.so
This is emulator issue only, it does not happen on device.

Comments

  1. Eduardo Gomez 2012-11-14

    Additional remarks

    Crash is reproducible when WebView is idle for about 227 secs (up to 4 minutes inactivity...)

    Using a timer

       var win = Ti.UI.createWindow();
       
       var webView = Ti.UI.createWebView();
       
       webView.html = '<html><head><title></title></head><body>Testing testing .... </body></html>';
       
       win.add(webView);
       
       var count = 0;
       var timer = setInterval(function() {
       	count++;
       	Ti.API.info("count: " + count);
       }, 1000);
       
       win.open(); 
       

    Google APIs Android 2.3.3 & Titanium SDKs: 2.1.3.GA, 2.1.4.GA & 3.1.0 (2012/11/09 14:50 9390d4f)

    Stack trace 2.1.3.GA

       [INFO][TiApplication(  285)] (main) [0,0] checkpoint, app created.
       [INFO][TiApplication(  285)] (main) [741,741] Titanium 2.1.3 (2012/10/02 16:16 15997d0)
       [INFO][TiApplication(  285)] (main) [8,1244] Titanium Javascript runtime: v8
       [INFO][TiRootActivity(  285)] (main) [0,0] checkpoint, on root activity create, savedInstanceState: null
       [INFO][ActivityManager(   60)] Displayed activity com.android.launcher/com.android.launcher2.Launcher: 81741 ms (total 81741 ms)
       [ERROR][TiApplication(  285)] (KrollRuntimeThread) [2677,2677] APP PROXY: ti.modules.titanium.app.AppModule@43ecdf78
       [WARN][V8Object(  285)] Runtime disposed, cannot set property 'userAgent'
       [INFO][global  (  285)] Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required.
       [INFO][global  (  285)] Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required.
       [INFO][global  (  285)] Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required.
       [INFO][TiRootActivity(  285)] (main) [0,0] checkpoint, on root activity resume. activity = com.appc.test._1bestpracticesActivity@43e58218
       [WARN][webcore (  285)] Can't get the viewWidth after the first layout
       [INFO][ActivityManager(   60)] Process android.process.acore (pid 152) has died.
       [WARN][TiAnalyticsSvc(  285)] (Thread-16) [25529,25529] Analytics Service Started
       [INFO][TiAnalyticsSvc(  285)] (Thread-16) [184,25713] Sending 10 analytics events.
       [ERROR][TiAnalyticsSvc(  285)] (Thread-16) [20219,45932] Error posting events: api.appcelerator.net
       [ERROR][TiAnalyticsSvc(  285)] java.net.UnknownHostException: api.appcelerator.net
       [ERROR][TiAnalyticsSvc(  285)] 	at java.net.InetAddress.lookupHostByName(InetAddress.java:513)
       [ERROR][TiAnalyticsSvc(  285)] 	at java.net.InetAddress.getAllByNameImpl(InetAddress.java:278)
       [ERROR][TiAnalyticsSvc(  285)] 	at java.net.InetAddress.getAllByName(InetAddress.java:242)
       [ERROR][TiAnalyticsSvc(  285)] 	at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:136)
       [ERROR][TiAnalyticsSvc(  285)] 	at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
       [ERROR][TiAnalyticsSvc(  285)] 	at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
       [ERROR][TiAnalyticsSvc(  285)] 	at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:348)
       [ERROR][TiAnalyticsSvc(  285)] 	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
       [ERROR][TiAnalyticsSvc(  285)] 	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:653)
       [ERROR][TiAnalyticsSvc(  285)] 	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:627)
       [ERROR][TiAnalyticsSvc(  285)] 	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:616)
       [ERROR][TiAnalyticsSvc(  285)] 	at org.appcelerator.titanium.analytics.TiAnalyticsService$1.run(TiAnalyticsService.java:133)
       [ERROR][TiAnalyticsSvc(  285)] 	at java.lang.Thread.run(Thread.java:1096)
       [WARN][TiAnalyticsSvc(  285)] (Thread-16) [63,45995] Stopping Analytics Service
       [INFO][ActivityManager(   60)] Process com.android.alarmclock (pid 158) has died.
       [INFO][ActivityManager(   60)] Process com.android.settings (pid 117) has died.
       [INFO][ActivityManager(   60)] Process com.android.mms (pid 210) has died.
       [INFO][ActivityManager(   60)] Displayed activity com.appc.test/._1bestpracticesActivity: 139307 ms (total 139307 ms)
       [INFO][ActivityManager(   60)] Process com.android.email (pid 230) has died.
       [INFO][ActivityManager(   60)] Process com.android.protips (pid 190) has died.
       [INFO][ActivityManager(   60)] Process com.android.music (pid 175) has died.
       [WARN][dalvikvm(  285)] Last 10 entries in JNI global reference table:
       [WARN][dalvikvm(  285)]  1991: 0x40029028 cls=Ljava/lang/String; (28 bytes)
       [WARN][dalvikvm(  285)]  1992: 0x43e674c0 cls=Ljava/lang/reflect/Field; (36 bytes)
       [WARN][dalvikvm(  285)]  1993: 0x40029028 cls=Ljava/lang/String; (28 bytes)
       [WARN][dalvikvm(  285)]  1994: 0x43e85db0 cls=Ljava/lang/reflect/Field; (36 bytes)
       [WARN][dalvikvm(  285)]  1995: 0x40029028 cls=Ljava/lang/String; (28 bytes)
       [WARN][dalvikvm(  285)]  1996: 0x43ed9f08 cls=Ljava/lang/reflect/Field; (36 bytes)
       [WARN][dalvikvm(  285)]  1997: 0x40029028 cls=Ljava/lang/String; (28 bytes)
       [WARN][dalvikvm(  285)]  1998: 0x43f29098 cls=Ljava/lang/reflect/Field; (36 bytes)
       [WARN][dalvikvm(  285)]  1999: 0x40029028 cls=Ljava/lang/String; (28 bytes)
       [WARN][dalvikvm(  285)]  2000: 0x43f10c48 cls=Ljava/lang/reflect/Field; (36 bytes)
       [WARN][dalvikvm(  285)] JNI global reference table summary (2001 entries):
       [WARN][dalvikvm(  285)]   157 of Ljava/lang/Class; 164B (106 unique)
       [WARN][dalvikvm(  285)]     8 of Ljava/lang/ref/PhantomReference; 28B (8 unique)
       [WARN][dalvikvm(  285)]     1 of Ljava/lang/ref/PhantomReference; 36B
       [WARN][dalvikvm(  285)]   862 of Ljava/lang/reflect/Field; 36B (862 unique)
       [WARN][dalvikvm(  285)]    43 of Ljava/lang/reflect/Field; 44B (43 unique)
       [WARN][dalvikvm(  285)]     2 of Ldalvik/system/VMRuntime; 12B (1 unique)
       [WARN][dalvikvm(  285)]   906 of Ljava/lang/String; 28B (1 unique)
       [WARN][dalvikvm(  285)]    13 of Ljava/lang/ref/WeakReference; 28B (13 unique)
       [WARN][dalvikvm(  285)]     1 of Landroid/app/ActivityThread$ApplicationThread; 28B
       [WARN][dalvikvm(  285)]     1 of Landroid/view/ViewRoot$W; 28B
       [WARN][dalvikvm(  285)]     1 of Lorg/appcelerator/kroll/runtime/v8/V8Runtime; 68B
       [WARN][dalvikvm(  285)]     1 of Lorg/appcelerator/kroll/KrollRuntime$1; 12B
       [WARN][dalvikvm(  285)]     1 of Landroid/view/inputmethod/InputMethodManager$1; 28B
       [WARN][dalvikvm(  285)]     1 of Landroid/app/ActivityThread$PackageInfo$ReceiverDispatcher$InnerReceiver; 28B
       [WARN][dalvikvm(  285)]     1 of Landroid/app/ActivityThread$ProviderRecord; 36B
       [WARN][dalvikvm(  285)]     1 of Landroid/view/inputmethod/InputMethodManager$ControlledInputConnectionWrapper; 44B
       [WARN][dalvikvm(  285)]     1 of Landroid/view/accessibility/AccessibilityManager$1; 28B
       [WARN][dalvikvm(  285)] Memory held directly by tracked refs is 51272 bytes
       [ERROR][dalvikvm(  285)] Excessive JNI global references (2001)
       [ERROR][dalvikvm(  285)] VM aborting
       [INFO][DEBUG   (   31)] *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
       [INFO][DEBUG   (   31)] Build fingerprint: 'generic/sdk/generic/:2.2/FRF91/43546:eng/test-keys'
       [INFO][DEBUG   (   31)] pid: 285, tid: 298  >>> com.appc.test <<<
       [INFO][DEBUG   (   31)] signal 11 (SIGSEGV), fault addr deadd00d
       [INFO][DEBUG   (   31)]  r0 00000374  r1 80000000  r2 0000000c  r3 deadd00d
       [INFO][DEBUG   (   31)]  r4 00000026  r5 80887fc4  r6 fffe91e1  r7 000007d1
       [INFO][DEBUG   (   31)]  r8 473ffd88  r9 428aef1c  10 428aef04  fp 00287d08
       [INFO][DEBUG   (   31)]  ip 808881ec  sp 473ff830  lr afd154c5  pc 8083b162  cpsr 20000030
       [INFO][ActivityManager(   60)] Process com.android.defcontainer (pid 259) has died.
       [INFO][ActivityManager(   60)] Process com.android.quicksearchbox (pid 181) has died.
       [INFO][DEBUG   (   31)]          #00  pc 0003b162  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]          #01  pc 0003f032  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]          #02  pc 0003f0c6  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]          #03  pc 0002ebf2  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]          #04  pc 002455a6  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #05  pc 002d1a82  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #06  pc 002d2e22  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #07  pc 00245c10  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #08  pc 00245bb0  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #09  pc 0012f69e  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #10  pc 001207a2  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #11  pc 0033156e  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #12  pc 003318d6  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #13  pc 00310f78  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #14  pc 0031190c  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #15  pc 00320d20  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #16  pc 00317284  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #17  pc 002434c0  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #18  pc 0024353e  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #19  pc 002435ac  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #20  pc 00213b80  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #21  pc 0008d93a  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #22  pc 0008d9e4  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #23  pc 001378fa  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #24  pc 00013974  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]          #25  pc 0003ddf0  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]          #26  pc 000371b6  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]          #27  pc 00018714  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]          #28  pc 0001e8c4  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]          #29  pc 0001d790  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]          #30  pc 00053eec  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]          #31  pc 00054102  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)] 
       [INFO][DEBUG   (   31)] code around pc:
       [INFO][DEBUG   (   31)] 8083b140 1861447c 200618a2 e878f7d8 f7d82000 
       [INFO][DEBUG   (   31)] 8083b150 4808e9e4 6bdb5823 d0002b00 4b064798 
       [INFO][DEBUG   (   31)] 8083b160 701c2426 ea5cf7d8 0004ce80 fffe4ae0 
       [INFO][DEBUG   (   31)] 8083b170 fffe801c 00000374 deadd00d b510b40e 
       [INFO][DEBUG   (   31)] 8083b180 4c0a4b09 447bb083 aa05591b 6b5bca02 
       [INFO][DEBUG   (   31)] 
       [INFO][DEBUG   (   31)] code around lr:
       [INFO][DEBUG   (   31)] afd154a4 b0834a0d 589c447b 26009001 686768a5 
       [INFO][DEBUG   (   31)] afd154b4 220ce008 2b005eab 1c28d003 47889901 
       [INFO][DEBUG   (   31)] afd154c4 35544306 d5f43f01 2c006824 b003d1ee 
       [INFO][DEBUG   (   31)] afd154d4 bdf01c30 0002ae7c 000000d4 1c0fb5f0 
       [INFO][DEBUG   (   31)] afd154e4 43551c3d a904b087 1c16ac01 604d9004 
       [INFO][DEBUG   (   31)] 
       [INFO][DEBUG   (   31)] stack:
       [INFO][DEBUG   (   31)]     473ff7f0  00000015  
       [INFO][DEBUG   (   31)]     473ff7f4  afd1453b  /system/lib/libc.so
       [INFO][DEBUG   (   31)]     473ff7f8  afd405a0  /system/lib/libc.so
       [INFO][DEBUG   (   31)]     473ff7fc  afd4054c  /system/lib/libc.so
       [INFO][DEBUG   (   31)]     473ff800  00000000  
       [INFO][DEBUG   (   31)]     473ff804  afd154c5  /system/lib/libc.so
       [INFO][DEBUG   (   31)]     473ff808  80888c90  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]     473ff80c  afd1450d  /system/lib/libc.so
       [INFO][DEBUG   (   31)]     473ff810  00000000  
       [INFO][DEBUG   (   31)]     473ff814  80887fc4  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]     473ff818  80887fc4  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]     473ff81c  fffe91e1  
       [INFO][DEBUG   (   31)]     473ff820  000007d1  
       [INFO][DEBUG   (   31)]     473ff824  afd1456b  /system/lib/libc.so
       [INFO][DEBUG   (   31)]     473ff828  df002777  
       [INFO][DEBUG   (   31)]     473ff82c  e3a070ad  
       [INFO][DEBUG   (   31)] #00 473ff830  fffe9069  
       [INFO][DEBUG   (   31)]     473ff834  8083f037  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)] #01 473ff838  8086caa4  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]     473ff83c  43f10c48  /dev/ashmem/mspace/dalvik-heap/2 (deleted)
       [INFO][DEBUG   (   31)]     473ff840  8086d04c  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]     473ff844  80887fc4  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]     473ff848  43f10c48  /dev/ashmem/mspace/dalvik-heap/2 (deleted)
       [INFO][DEBUG   (   31)]     473ff84c  00287d08  [heap]
       [INFO][DEBUG   (   31)]     473ff850  8086d04c  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]     473ff854  8083f0cb  /system/lib/libdvm.so
       [INFO][ActivityManager(   60)] Process com.appc.test (pid 285) has died.
       [INFO][WindowManager(   60)] WIN DEATH: Window{43f84ba8 com.appc.test/com.appc.test._1bestpracticesActivity paused=false}
       [INFO][UsageStats(   60)] Unexpected resume of com.android.launcher while already resumed in com.appc.test
       [WARN][InputManagerService(   60)] Got RemoteException sending setActive(false) notification to pid 285 uid 10039
       

    Stack trace - 2.1.4.GA

       [INFO][ActivityManager(   60)] Start proc com.appc.test for activity com.appc.test/._1bestpracticesActivity: pid=342 uid=10039 gids={1015, 3003}
       [INFO][TiApplication(  342)] (main) [1,1] checkpoint, app created.
       [INFO][TiApplication(  342)] (main) [282,283] Titanium 2.1.4 (2012/11/09 12:47 51f2c64)
       [INFO][TiApplication(  342)] (main) [101,754] Titanium Javascript runtime: v8
       [INFO][TiRootActivity(  342)] (main) [0,0] checkpoint, on root activity create, savedInstanceState: null
       [ERROR][TiApplication(  342)] (KrollRuntimeThread) [1427,1427] APP PROXY: ti.modules.titanium.app.AppModule@43ebd3a0
       [WARN][V8Object(  342)] Runtime disposed, cannot set property 'userAgent'
       [INFO][global  (  342)] Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required.
       [INFO][global  (  342)] Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required.
       [INFO][global  (  342)] Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required.
       [INFO][TiRootActivity(  342)] (main) [0,0] checkpoint, on root activity resume. activity = com.appc.test._1bestpracticesActivity@43e985f8
       [WARN][webcore (  342)] Can't get the viewWidth after the first layout
       [INFO][ActivityManager(   60)] Displayed activity com.appc.test/._1bestpracticesActivity: 5642 ms (total 5642 ms)
       [WARN][TiAnalyticsSvc(  342)] (Thread-15) [26760,26760] Analytics Service Started
       [INFO][TiAnalyticsSvc(  342)] (Thread-15) [218,26978] Sending 10 analytics events.
       [ERROR][TiAnalyticsSvc(  342)] (Thread-15) [20154,47132] Error posting events: api.appcelerator.net
       [ERROR][TiAnalyticsSvc(  342)] java.net.UnknownHostException: api.appcelerator.net
       [ERROR][TiAnalyticsSvc(  342)] 	at java.net.InetAddress.lookupHostByName(InetAddress.java:513)
       [ERROR][TiAnalyticsSvc(  342)] 	at java.net.InetAddress.getAllByNameImpl(InetAddress.java:278)
       [ERROR][TiAnalyticsSvc(  342)] 	at java.net.InetAddress.getAllByName(InetAddress.java:242)
       [ERROR][TiAnalyticsSvc(  342)] 	at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:136)
       [ERROR][TiAnalyticsSvc(  342)] 	at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
       [ERROR][TiAnalyticsSvc(  342)] 	at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
       [ERROR][TiAnalyticsSvc(  342)] 	at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:348)
       [ERROR][TiAnalyticsSvc(  342)] 	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
       [ERROR][TiAnalyticsSvc(  342)] 	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:653)
       [ERROR][TiAnalyticsSvc(  342)] 	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:627)
       [ERROR][TiAnalyticsSvc(  342)] 	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:616)
       [ERROR][TiAnalyticsSvc(  342)] 	at org.appcelerator.titanium.analytics.TiAnalyticsService$1.run(TiAnalyticsService.java:133)
       [ERROR][TiAnalyticsSvc(  342)] 	at java.lang.Thread.run(Thread.java:1096)
       [WARN][TiAnalyticsSvc(  342)] (Thread-15) [7,47139] Stopping Analytics Service
       [INFO][ActivityManager(   60)] Process android.process.media (pid 199) has died.
       [WARN][dalvikvm(  342)] Last 10 entries in JNI global reference table:
       [WARN][dalvikvm(  342)]  1991: 0x40029028 cls=Ljava/lang/String; (28 bytes)
       [WARN][dalvikvm(  342)]  1992: 0x43ea7e00 cls=Ljava/lang/reflect/Field; (36 bytes)
       [WARN][dalvikvm(  342)]  1993: 0x40029028 cls=Ljava/lang/String; (28 bytes)
       [WARN][dalvikvm(  342)]  1994: 0x43ef1028 cls=Ljava/lang/reflect/Field; (36 bytes)
       [WARN][dalvikvm(  342)]  1995: 0x40029028 cls=Ljava/lang/String; (28 bytes)
       [WARN][dalvikvm(  342)]  1996: 0x43ed8060 cls=Ljava/lang/reflect/Field; (36 bytes)
       [WARN][dalvikvm(  342)]  1997: 0x40029028 cls=Ljava/lang/String; (28 bytes)
       [WARN][dalvikvm(  342)]  1998: 0x43f0f9a0 cls=Ljava/lang/reflect/Field; (36 bytes)
       [WARN][dalvikvm(  342)]  1999: 0x40029028 cls=Ljava/lang/String; (28 bytes)
       [WARN][dalvikvm(  342)]  2000: 0x43eb05b8 cls=Ljava/lang/reflect/Field; (36 bytes)
       [WARN][dalvikvm(  342)] JNI global reference table summary (2001 entries):
       [WARN][dalvikvm(  342)]   156 of Ljava/lang/Class; 164B (105 unique)
       [WARN][dalvikvm(  342)]     1 of Ljava/lang/Class; 172B
       [WARN][dalvikvm(  342)]     8 of Ljava/lang/ref/PhantomReference; 28B (8 unique)
       [WARN][dalvikvm(  342)]     1 of Ljava/lang/ref/PhantomReference; 36B
       [WARN][dalvikvm(  342)]   858 of Ljava/lang/reflect/Field; 36B (858 unique)
       [WARN][dalvikvm(  342)]    47 of Ljava/lang/reflect/Field; 44B (47 unique)
       [WARN][dalvikvm(  342)]     2 of Ldalvik/system/VMRuntime; 12B (1 unique)
       [WARN][dalvikvm(  342)]   906 of Ljava/lang/String; 28B (1 unique)
       [WARN][dalvikvm(  342)]    12 of Ljava/lang/ref/WeakReference; 28B (12 unique)
       [WARN][dalvikvm(  342)]     1 of Ljava/lang/ref/WeakReference; 36B
       [WARN][dalvikvm(  342)]     1 of Landroid/app/ActivityThread$ApplicationThread; 28B
       [WARN][dalvikvm(  342)]     1 of Landroid/view/ViewRoot$W; 28B
       [WARN][dalvikvm(  342)]     1 of Landroid/app/ActivityThread$PackageInfo$ReceiverDispatcher$InnerReceiver; 28B
       [WARN][dalvikvm(  342)]     1 of Landroid/view/inputmethod/InputMethodManager$ControlledInputConnectionWrapper; 44B
       [WARN][dalvikvm(  342)]     1 of Landroid/app/ActivityThread$ProviderRecord; 28B
       [WARN][dalvikvm(  342)]     1 of Landroid/view/accessibility/AccessibilityManager$1; 28B
       [WARN][dalvikvm(  342)]     1 of Lorg/appcelerator/kroll/KrollRuntime$1; 12B
       [WARN][dalvikvm(  342)]     1 of Lorg/appcelerator/kroll/runtime/v8/V8Runtime; 68B
       [WARN][dalvikvm(  342)]     1 of Landroid/view/inputmethod/InputMethodManager$1; 28B
       [WARN][dalvikvm(  342)] Memory held directly by tracked refs is 51312 bytes
       [ERROR][dalvikvm(  342)] Excessive JNI global references (2001)
       [ERROR][dalvikvm(  342)] VM aborting
       [INFO][DEBUG   (   31)] *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
       [INFO][DEBUG   (   31)] Build fingerprint: 'generic/sdk/generic/:2.2/FRF91/43546:eng/test-keys'
       [INFO][DEBUG   (   31)] pid: 342, tid: 353  >>> com.appc.test <<<
       [INFO][DEBUG   (   31)] signal 11 (SIGSEGV), fault addr deadd00d
       [INFO][DEBUG   (   31)]  r0 00000374  r1 80000000  r2 0000000c  r3 deadd00d
       [INFO][DEBUG   (   31)]  r4 00000026  r5 80887fc4  r6 fffe91e1  r7 000007d1
       [INFO][DEBUG   (   31)]  r8 4710bd88  r9 428adf1c  10 428adf04  fp 00122c78
       [INFO][DEBUG   (   31)]  ip 808881ec  sp 4710b830  lr afd154c5  pc 8083b162  cpsr 20000030
       [INFO][DEBUG   (   31)]          #00  pc 0003b162  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]          #01  pc 0003f032  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]          #02  pc 0003f0c6  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]          #03  pc 0002ebf2  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]          #04  pc 002455a6  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #05  pc 002d1a82  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #06  pc 002d2e22  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #07  pc 00245c10  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #08  pc 00245bb0  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #09  pc 0012f69e  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #10  pc 001207a2  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #11  pc 0033156e  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #12  pc 003318d6  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #13  pc 00310f78  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #14  pc 0031190c  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #15  pc 00320d20  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #16  pc 00317284  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #17  pc 002434c0  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #18  pc 0024353e  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #19  pc 002435ac  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #20  pc 00213b80  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #21  pc 0008d93a  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #22  pc 0008d9e4  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #23  pc 001378fa  /system/lib/libwebcore.so
       [INFO][DEBUG   (   31)]          #24  pc 00013974  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]          #25  pc 0003ddf0  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]          #26  pc 000371b6  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]          #27  pc 00018714  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]          #28  pc 0001e8c4  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]          #29  pc 0001d790  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]          #30  pc 00053eec  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]          #31  pc 00054102  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)] 
       [INFO][DEBUG   (   31)] code around pc:
       [INFO][DEBUG   (   31)] 8083b140 1861447c 200618a2 e878f7d8 f7d82000 
       [INFO][DEBUG   (   31)] 8083b150 4808e9e4 6bdb5823 d0002b00 4b064798 
       [INFO][DEBUG   (   31)] 8083b160 701c2426 ea5cf7d8 0004ce80 fffe4ae0 
       [INFO][DEBUG   (   31)] 8083b170 fffe801c 00000374 deadd00d b510b40e 
       [INFO][DEBUG   (   31)] 8083b180 4c0a4b09 447bb083 aa05591b 6b5bca02 
       [INFO][DEBUG   (   31)] 
       [INFO][DEBUG   (   31)] code around lr:
       [INFO][DEBUG   (   31)] afd154a4 b0834a0d 589c447b 26009001 686768a5 
       [INFO][DEBUG   (   31)] afd154b4 220ce008 2b005eab 1c28d003 47889901 
       [INFO][DEBUG   (   31)] afd154c4 35544306 d5f43f01 2c006824 b003d1ee 
       [INFO][DEBUG   (   31)] afd154d4 bdf01c30 0002ae7c 000000d4 1c0fb5f0 
       [INFO][DEBUG   (   31)] afd154e4 43551c3d a904b087 1c16ac01 604d9004 
       [INFO][DEBUG   (   31)] 
       [INFO][DEBUG   (   31)] stack:
       [INFO][DEBUG   (   31)]     4710b7f0  00000015  
       [INFO][DEBUG   (   31)]     4710b7f4  afd1453b  /system/lib/libc.so
       [INFO][DEBUG   (   31)]     4710b7f8  afd405a0  /system/lib/libc.so
       [INFO][DEBUG   (   31)]     4710b7fc  afd4054c  /system/lib/libc.so
       [INFO][DEBUG   (   31)]     4710b800  00000000  
       [INFO][DEBUG   (   31)]     4710b804  afd154c5  /system/lib/libc.so
       [INFO][DEBUG   (   31)]     4710b808  80888c90  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]     4710b80c  afd1450d  /system/lib/libc.so
       [INFO][DEBUG   (   31)]     4710b810  00000000  
       [INFO][DEBUG   (   31)]     4710b814  80887fc4  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]     4710b818  80887fc4  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]     4710b81c  fffe91e1  
       [INFO][DEBUG   (   31)]     4710b820  000007d1  
       [INFO][DEBUG   (   31)]     4710b824  afd1456b  /system/lib/libc.so
       [INFO][DEBUG   (   31)]     4710b828  df002777  
       [INFO][DEBUG   (   31)]     4710b82c  e3a070ad  
       [INFO][DEBUG   (   31)] #00 4710b830  fffe9069  
       [INFO][DEBUG   (   31)]     4710b834  8083f037  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)] #01 4710b838  8086caa4  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]     4710b83c  43eb05b8  /dev/ashmem/mspace/dalvik-heap/2 (deleted)
       [INFO][DEBUG   (   31)]     4710b840  8086d04c  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]     4710b844  80887fc4  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]     4710b848  43eb05b8  /dev/ashmem/mspace/dalvik-heap/2 (deleted)
       [INFO][DEBUG   (   31)]     4710b84c  00122c78  [heap]
       [INFO][DEBUG   (   31)]     4710b850  8086d04c  /system/lib/libdvm.so
       [INFO][DEBUG   (   31)]     4710b854  8083f0cb  /system/lib/libdvm.so
       [INFO][ActivityManager(   60)] Process com.appc.test (pid 342) has died.
       [INFO][WindowManager(   60)] WIN DEATH: Window{43f74058 com.appc.test/com.appc.test._1bestpracticesActivity paused=false}
       [INFO][UsageStats(   60)] Unexpected resume of com.android.launcher while already resumed in com.appc.test
       [WARN][InputManagerService(   60)] Got RemoteException sending setActive(false) notification to pid 342 uid 10039
       
  2. Ivan Skugor 2012-11-15

    Seems like newer versions of Android emulator (4.*) handle this much better (they don't crash :D ). I didn't test with this particular test case, but works with more complex. So, it seems like this might be emulator 2.* issue.
  3. Nathan Nadeau 2012-11-17

    I have also run across this exact problem of the last few days so I wanted to add some more information. Confirmed it is only on the Android emulator, and only for Android API < 4. For API 4+ the problem does not seem to occur. The problem also happens if you set url property instead of html property of WebView. If you view logcat or connect the emulator to DDMS, you can watch for this type of message appear: GREF has increased to 201 GREF has increased to 301 ... All the way until it hits the default JNI limit of 2000 GREFs, at which point that is when the app crashes in the emulator. So something is causing these global references (GREFs) to accumulate regularly, and strangely it always seems to increment by 100. Of course there are ways to increase the JNI limit beyond 2000, but that does not really solve the leak. Here is a related [Q&A entry](http://developer.appcelerator.com/question/143491/android-sdk--210-excessive-jni-global-references)
  4. Vishal Duggal 2013-03-04

    Pull pending https://github.com/appcelerator/titanium_mobile/pull/3932 The basic crash is due to incrementing GREF count which is tied into our polling code. What this PR does is wrap the eval code inside a function that returns a primitive (int) which does not increment the GREF count. Does not change any existing functionality So basically for simple webviews the developers should be ok. The crash will however occur once the getJSCode returns enough valid string values (basically GREF goes up by 2 on every valid return). So essentially this PR puts off the crash for some time but does not really fix it. Also added the annotation @JavascriptInterface and had to update the build files for that. See documentation [here](http://developer.android.com/reference/android/webkit/JavascriptInterface.html) This is a problem on emulators only.
  5. Anshu Mittal 2013-03-14

    Tested with: SDK: 3.1.0.v20130313215655 Studio: 3.0.2.201302191606 device: Android Emulator OS:OSX10.7.5 No crash with basic HTML

JSON Source