Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Android - java.lang.OutOfMemoryError

$
0
0

I am trying to load a URL in a web view and I am getting out of memory error. I tried to play around with httpclient.maxbuffersize and threadstacksize as below:

<property name="ti.android.threadstacksize" type="int">524288</property>

<property name="ti.android.httpclient.maxbuffersize" type="int">124288</property>

But didn't help ... Below is a complete log starting off with:

[ERROR][TiApplication( 819)] (WebViewWorkerThread) [19497,20294] Sending event: exception on thread: WebViewWorkerThread msg:java.lang.OutOfMemoryError; Titanium 3.1.3,2013/09/18 12:01,222f4d1

The URL opens fine in the simulator's browser but not in my app's webview.

Any help is greatly appreciate it.

[INFO][dalvikvm-heap(  819)] Forcing collection of SoftReferences for 8208-byte allocation
[INFO][dalvikvm-heap(  819)] Clamp target GC heap from 25.564MB to 24.000MB
[DEBUG][dalvikvm(  819)] GC_FOR_MALLOC freed 0K, 35% free 5383K/8263K, external 16322K/17993K, paused 25ms
[ERROR][dalvikvm-heap(  819)] Out of memory on a 8208-byte allocation.
[INFO][dalvikvm(  819)] "WebViewWorkerThread" prio=5 tid=20 RUNNABLE
[INFO][dalvikvm(  819)]   | group="main" sCount=0 dsCount=0 obj=0x4061c5e0 self=0x4086b0
[INFO][dalvikvm(  819)]   | sysTid=842 nice=1 sched=0/0 cgrp=default handle=4231032
[INFO][dalvikvm(  819)]   | schedstat=( 407908043 598325060 262 )
[INFO][dalvikvm(  819)]   at android.webkit.ByteArrayBuilder$Chunk.<init>(ByteArrayBuilder.java:~136)
[INFO][dalvikvm(  819)]   at android.webkit.ByteArrayBuilder.obtainChunk(ByteArrayBuilder.java:127)
[INFO][dalvikvm(  819)]   at android.webkit.ByteArrayBuilder.append(ByteArrayBuilder.java:55)
[INFO][dalvikvm(  819)]   at android.webkit.LoadListener.data(LoadListener.java:621)
[INFO][dalvikvm(  819)]   at android.webkit.StreamLoader.sendData(StreamLoader.java:181)
[INFO][dalvikvm(  819)]   at android.webkit.StreamLoader.handleMessage(StreamLoader.java:142)
[INFO][dalvikvm(  819)]   at android.os.Handler.dispatchMessage(Handler.java:95)
[INFO][dalvikvm(  819)]   at android.os.Looper.loop(Looper.java:130)
[INFO][dalvikvm(  819)]   at android.os.HandlerThread.run(HandlerThread.java:60)
[INFO][dalvikvm(  819)] 
[WARN][dalvikvm(  819)] threadid=20: thread exiting with uncaught exception (group=0x40015560)
[ERROR][TiApplication(  819)] (WebViewWorkerThread) [19497,20294] Sending event: exception on thread: WebViewWorkerThread msg:java.lang.OutOfMemoryError; Titanium 3.1.3,2013/09/18 12:01,222f4d1
[ERROR][TiApplication(  819)] java.lang.OutOfMemoryError
[ERROR][TiApplication(  819)]   at android.webkit.ByteArrayBuilder$Chunk.<init>(ByteArrayBuilder.java:136)
[ERROR][TiApplication(  819)]   at android.webkit.ByteArrayBuilder.obtainChunk(ByteArrayBuilder.java:127)
[ERROR][TiApplication(  819)]   at android.webkit.ByteArrayBuilder.append(ByteArrayBuilder.java:55)
[ERROR][TiApplication(  819)]   at android.webkit.LoadListener.data(LoadListener.java:621)
[ERROR][TiApplication(  819)]   at android.webkit.StreamLoader.sendData(StreamLoader.java:181)
[ERROR][TiApplication(  819)]   at android.webkit.StreamLoader.handleMessage(StreamLoader.java:142)
[ERROR][TiApplication(  819)]   at android.os.Handler.dispatchMessage(Handler.java:95)
[ERROR][TiApplication(  819)]   at android.os.Looper.loop(Looper.java:130)
[ERROR][TiApplication(  819)]   at android.os.HandlerThread.run(HandlerThread.java:60)
[INFO][dalvikvm(  819)] Jit: resizing JitTable from 512 to 1024
[ERROR][AndroidRuntime(  819)] FATAL EXCEPTION: WebViewWorkerThread
[ERROR][AndroidRuntime(  819)] java.lang.OutOfMemoryError
[ERROR][AndroidRuntime(  819)]  at android.webkit.ByteArrayBuilder$Chunk.<init>(ByteArrayBuilder.java:136)
[ERROR][AndroidRuntime(  819)]  at android.webkit.ByteArrayBuilder.obtainChunk(ByteArrayBuilder.java:127)
[ERROR][AndroidRuntime(  819)]  at android.webkit.ByteArrayBuilder.append(ByteArrayBuilder.java:55)
[ERROR][AndroidRuntime(  819)]  at android.webkit.LoadListener.data(LoadListener.java:621)
[ERROR][AndroidRuntime(  819)]  at android.webkit.StreamLoader.sendData(StreamLoader.java:181)
[ERROR][AndroidRuntime(  819)]  at android.webkit.StreamLoader.handleMessage(StreamLoader.java:142)
[ERROR][AndroidRuntime(  819)]  at android.os.Handler.dispatchMessage(Handler.java:95)
[ERROR][AndroidRuntime(  819)]  at android.os.Looper.loop(Looper.java:130)
[ERROR][AndroidRuntime(  819)]  at android.os.HandlerThread.run(HandlerThread.java:60)

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>