danikula / AndroidVideoCache

Cache support for any video player with help of single line
Apache License 2.0
5.43k stars 1.16k forks source link

Crash after closing source. IllegalArgumentException: byteCount < 0: -2048 #63

Closed ericxu1983 closed 8 years ago

ericxu1983 commented 8 years ago

Hi, I got below exception in our product:

ava.lang.IllegalArgumentException: byteCount < 0: -2048
 13     at com.android.okio.RealBufferedSource.read(RealBufferedSource.java:44)
 14     at com.android.okhttp.internal.http.HttpConnection$FixedLengthSource.read(HttpConnection.java:442)
 15     at com.android.okhttp.internal.Util.skipAll(Util.java:227)
 16     at com.android.okhttp.internal.http.HttpConnection.discard(HttpConnection.java:212)
 17     at com.android.okhttp.internal.http.HttpConnection$FixedLengthSource.close(HttpConnection.java:464)
 18     at com.android.okhttp.internal.Util.closeQuietly(Util.java:97)
 19     at com.android.okhttp.internal.http.HttpEngine.close(HttpEngine.java:439)
 20     at com.android.okhttp.internal.http.HttpURLConnectionImpl.disconnect(HttpURLConnectionImpl.java:113)
 21     at com.danikula.videocache.HttpUrlSource.close(HttpUrlSource.java:80)
 22     at com.danikula.videocache.ProxyCache.closeSource(ProxyCache.java:160)
 23     at com.danikula.videocache.ProxyCache.readSource(ProxyCache.java:141)
 24     at com.danikula.videocache.ProxyCache.access$100(ProxyCache.java:19)
 25     at com.danikula.videocache.ProxyCache$SourceReaderRunnable.run(ProxyCache.java:179)
 26     at java.lang.Thread.run(Thread.java:818)
danikula commented 8 years ago

Fixed here