What steps will reproduce the problem?
1. Attempt to download a form from a server that returns a 401 response with an
empty body.
2.
3.
What is the expected output? What do you see instead?
Expecting a graceful error message. Instead a force stop
What version of the product are you using? On what operating system?
1.4.4, Android 4.4.2
Please provide any additional information below.
This is the stack trace:
E/AndroidRuntime( 6412): FATAL EXCEPTION: AsyncTask #3
E/AndroidRuntime( 6412): Process: org.odk.collect.android, PID: 6412
E/AndroidRuntime( 6412): java.lang.RuntimeException: An error occured while
executing doInBackground()
E/AndroidRuntime( 6412): at android.os.AsyncTask$3.done(AsyncTask.java:300)
E/AndroidRuntime( 6412): at
java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
E/AndroidRuntime( 6412): at
java.util.concurrent.FutureTask.setException(FutureTask.java:222)
E/AndroidRuntime( 6412): at
java.util.concurrent.FutureTask.run(FutureTask.java:242)
E/AndroidRuntime( 6412): at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
E/AndroidRuntime( 6412): at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
E/AndroidRuntime( 6412): at java.lang.Thread.run(Thread.java:841)
E/AndroidRuntime( 6412): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 6412): at java.io.File.fixSlashes(File.java:185)
E/AndroidRuntime( 6412): at java.io.File.<init>(File.java:134)
E/AndroidRuntime( 6412): at
org.odk.collect.android.utilities.FileUtils.purgeMediaPath(FileUtils.java:407)
E/AndroidRuntime( 6412): at
org.odk.collect.android.tasks.DownloadFormsTask.cleanUp(DownloadFormsTask.java:2
02)
E/AndroidRuntime( 6412): at
org.odk.collect.android.tasks.DownloadFormsTask.doInBackground(DownloadFormsTask
.java:165)
E/AndroidRuntime( 6412): at
org.odk.collect.android.tasks.DownloadFormsTask.doInBackground(DownloadFormsTask
.java:1)
E/AndroidRuntime( 6412): at android.os.AsyncTask$2.call(AsyncTask.java:288)
E/AndroidRuntime( 6412): at
java.util.concurrent.FutureTask.run(FutureTask.java:237)
E/AndroidRuntime( 6412): ... 3 more
Seems the 401 is being caught and an exception is being thrown and caught but
there is a null pointer when cleaning up temp files.
Original issue reported on code.google.com by tomsm...@gmail.com on 4 Sep 2014 at 7:14
Original issue reported on code.google.com by
tomsm...@gmail.com
on 4 Sep 2014 at 7:14