javiersantos / AppUpdater

A library that checks for your apps' updates on Google Play, GitHub, Amazon, F-Droid or your own server. API 9+ required.
Apache License 2.0
1.98k stars 412 forks source link

Fatal error if activity closes while it's connecting #75

Open guidedways opened 7 years ago

guidedways commented 7 years ago

The following is what I've observed in Fabric. It seems to happen mostly when the user closes the activity (that launched the async check).

Fatal Exception: java.lang.ArrayIndexOutOfBoundsException: length=8192; regionStart=0; regionLength=-1
       at java.util.Arrays.checkOffsetAndCount(Arrays.java:1719)
       at libcore.io.IoBridge.write(IoBridge.java:491)
       at java.io.FileOutputStream.write(FileOutputStream.java:186)
       at java.util.MarsUtils.write(MarsUtils.java:33)
       at com.android.org.conscrypt.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:704)
       at okio.Okio$2.read(SourceFile:138)
       at okio.AsyncTimeout$2.read(SourceFile:236)
       at okio.RealBufferedSource.request(SourceFile:66)
       at okio.RealBufferedSource.require(SourceFile:59)
       at okhttp3.internal.http2.Http2Reader.nextFrame(SourceFile:88)
       at okhttp3.internal.http2.Http2Connection$ReaderRunnable.execute(SourceFile:568)
       at okhttp3.internal.NamedRunnable.run(SourceFile:32)
       at java.lang.Thread.run(Thread.java:818)