Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1602] Android: HttpClient send() cannot recover from OutOfMemoryError

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:56:38.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0
ComponentsAndroid
Labelsandroid, defect
ReporterBill Dawson
AssigneeBill Dawson
Created2011-04-15T02:57:09.000+0000
Updated2011-04-17T01:56:38.000+0000

Description

Example stack:

java.lang.OutOfMemoryError
at org.apache.http.impl.io.AbstractSessionInputBuffer.init(AbstractSessionInputBuffer.java:79)
at org.apache.http.impl.io.SocketInputBuffer.<init>(SocketInputBuffer.java:93)
at org.apache.http.impl.SocketHttpClientConnection.createSessionInputBuffer(SocketHttpClientConnection.java:83)
at org.apache.http.impl.conn.DefaultClientConnection.createSessionInputBuffer(DefaultClientConnection.java:170)
at org.apache.http.impl.SocketHttpClientConnection.bind(SocketHttpClientConnection.java:106)
at org.apache.http.impl.conn.DefaultClientConnection.openCompleted(DefaultClientConnection.java:129)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:173)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:348)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:653)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:637)
at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:807)
at java.lang.Thread.run(Thread.java:1102)

TiHTTPClient$ClientRunnable.run is invoked by the HTTPClient.send().

Comments

  1. Jeff Haynie 2011-04-15

    (from [28b82751c1ceacc7166bd0135518f97b08c2691b]) [#1602] Catch all throwables to in TiHttpClient's runnable run() so app won't FC with OOME for example http://github.com/appcelerator/titanium_mobile/commit/28b82751c1ceacc7166bd0135518f97b08c2691b"> http://github.com/appcelerator/titanium_mobile/commit/28b82751c1cea...

  2. Marshall Culpepper 2011-04-15

    Did your original commit fix this? (It looks like it might have)

  3. Bill Dawson 2011-04-15

    Closing -- no reproducible fail-case provided and it looks like my August commit would have anyway fixed it.

JSON Source