Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2413] Android:Unable to abort download, "bad file number" error seen.

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:59:02.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0 M04
ComponentsAndroid
Labelsandroid, defect, download, regression, xhr
ReporterThomas Huelbert
AssigneeDon Thorp
Created2011-04-15T03:19:03.000+0000
Updated2011-04-17T01:59:02.000+0000

Description

1.5.0.91838a device and sim, all flavors

1.Platform > XHR > File download
2.Tap "large file download"
3.tap abort

results: file continues to download, or prog bar starts freaking out.

seen in console:

/DefaultHttpClient( 8815): Error consuming content after an exception. W/DefaultHttpClient( 8815): java.net.SocketException: Bad file number
W/DefaultHttpClient( 8815): at org.apache.harmony.luni.platform.OSNetworkSystem.readSocketImpl(Native Method)
W/DefaultHttpClient( 8815): at org.apache.harmony.luni.platform.OSNetworkSystem.read(OSNetworkSystem.java:358)
W/DefaultHttpClient( 8815): at org.apache.harmony.luni.net.PlainSocketImpl.read(PlainSocketImpl.java:561)
W/DefaultHttpClient( 8815): at org.apache.harmony.luni.net.SocketInputStream.read(SocketInputStream.java:88)
W/DefaultHttpClient( 8815): at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:103)
W/DefaultHttpClient( 8815): at org.apache.http.impl.io.AbstractSessionInputBuffer.read(AbstractSessionInputBuffer.java:134)
W/DefaultHttpClient( 8815): at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:174)
W/DefaultHttpClient( 8815): at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:188)
W/DefaultHttpClient( 8815): at org.apache.http.impl.io.ContentLengthInputStream.close(ContentLengthInputStream.java:121)
W/DefaultHttpClient( 8815): at org.apache.http.entity.BasicHttpEntity.consumeContent(BasicHttpEntity.java:142)
W/DefaultHttpClient( 8815): at org.apache.http.conn.BasicManagedEntity.consumeContent(BasicManagedEntity.java:114)
W/DefaultHttpClient( 8815): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:662)
W/DefaultHttpClient( 8815): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:637)
W/DefaultHttpClient( 8815): at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:940)
W/DefaultHttpClient( 8815): at java.lang.Thread.run(Thread.java:1096)
E/TiHttpClient( 8815): (TiHttpClient-7) [133,1324912] HTTP Error (java.net.SocketException): Connection timed out
E/TiHttpClient( 8815): java.net.SocketException: Connection timed out
E/TiHttpClient( 8815): at org.apache.harmony.luni.platform.OSNetworkSystem.readSocketImpl(Native Method)
E/TiHttpClient( 8815): at org.apache.harmony.luni.platform.OSNetworkSystem.read(OSNetworkSystem.java:358)
E/TiHttpClient( 8815): at org.apache.harmony.luni.net.PlainSocketImpl.read(PlainSocketImpl.java:561)
E/TiHttpClient( 8815): at org.apache.harmony.luni.net.SocketInputStream.read(SocketInputStream.java:88)
E/TiHttpClient( 8815): at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:103)
E/TiHttpClient( 8815): at org.apache.http.impl.io.AbstractSessionInputBuffer.read(AbstractSessionInputBuffer.java:134)
E/TiHttpClient( 8815): at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:174)
E/TiHttpClient( 8815): at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:188)
E/TiHttpClient( 8815): at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:178)
E/TiHttpClient( 8815): at ti.modules.titanium.network.TiHTTPClient$LocalResponseHandler.handleResponse(TiHTTPClient.java:232)
E/TiHttpClient( 8815): at ti.modules.titanium.network.TiHTTPClient$LocalResponseHandler.handleResponse(TiHTTPClient.java:161)
E/TiHttpClient( 8815): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:657)
E/TiHttpClient( 8815): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:637)
E/TiHttpClient( 8815): at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:940)
E/TiHttpClient( 8815): at java.lang.Thread.run(Thread.java:1096)
I/TiHttpClient( 8815): (TiHttpClient-7) [10,1324922] Sending error Connection timed out
I/ActivityManager( 1088): Process com.google.android.voicesearch (pid 1816) has died.

Comments

  1. Marshall Culpepper 2011-04-15

    I pushed a fix for the Large File XHR test recently, and I attempted running this locally and seems to work the way it should. Mind updating to a recent version of HEAD and trying again?

  2. Thomas Huelbert 2011-04-15

    looking good, closing as resolved against Titanium SDK version: 1.5.0 (12/06/10 08:42 4d92d40) G2 2.2, G1 1.6, sim 2,1

JSON Source