Github user daserge commented on the pull request:
https://github.com/apache/cordova-plugin-file-transfer/pull/79#issuecomment-148653298
Confirm this fix prevents a crash on 5.0.1 device:
```
E/FileTransfer(32760): Catch workaround for fatal exception
E/FileTransfer(32760): java.lang.NullPointerException: Attempt to read from
field 'int com.android.okio.Segment.limit' on a null object reference
E/FileTransfer(32760): at
com.android.okio.OkBuffer.write(OkBuffer.java:574)
E/FileTransfer(32760): at
com.android.okio.OkBuffer.read(OkBuffer.java:610)
E/FileTransfer(32760): at
com.android.okio.RealBufferedSource.read(RealBufferedSource.java:56)
E/FileTransfer(32760): at
com.android.okhttp.internal.http.HttpConnection$FixedLengthSource.read(HttpConnection.java:465)
E/FileTransfer(32760): at
com.android.okhttp.internal.Util.skipAll(Util.java:227)
E/FileTransfer(32760): at
com.android.okhttp.internal.http.HttpConnection.discard(HttpConnection.java:235)
E/FileTransfer(32760): at
com.android.okhttp.internal.http.HttpConnection$FixedLengthSource.close(HttpConnection.java:487)
E/FileTransfer(32760): at
com.android.okhttp.internal.Util.closeQuietly(Util.java:97)
E/FileTransfer(32760): at
com.android.okhttp.internal.http.HttpEngine.close(HttpEngine.java:580)
E/FileTransfer(32760): at
com.android.okhttp.internal.http.HttpURLConnectionImpl.disconnect(HttpURLConnectionImpl.java:113)
E/FileTransfer(32760): at
org.apache.cordova.filetransfer.FileTransfer$5.run(FileTransfer.java:1015)
E/FileTransfer(32760): at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
E/FileTransfer(32760): at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
E/FileTransfer(32760): at java.lang.Thread.run(Thread.java:818)
E/FileTransfer(32760):
{"code":3,"source":"http:\/\/cordova.apache.org\/downloads\/BlueZedEx.mp3","target":"file:\/\/\/data\/data\/io.cordova.hellocordova\/files\/files\/testFile.txt","http_status":200,"exception":"Attempt
to read from field 'int com.android.okio.Segment.limit' on a null object
reference"}
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]