Closed murraycu closed 9 years ago
This fix will be in version 1.45.
This seems to have come back in version 1.50:
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:300)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.NullPointerException: asset
at android.content.res.AssetManager.getAssetRemainingLength(Native Method)
at android.content.res.AssetManager.access$300(AssetManager.java:37)
at android.content.res.AssetManager$AssetInputStream.available(AssetManager.java:582)
at java.io.InputStreamReader.read(InputStreamReader.java:221)
at android.util.JsonReader.fillBuffer(JsonReader.java:742)
at android.util.JsonReader.nextNonWhitespace(JsonReader.java:782)
at android.util.JsonReader.nextValue(JsonReader.java:695)
at android.util.JsonReader.peek(JsonReader.java:334)
at android.util.JsonReader.expect(JsonReader.java:308)
at android.util.JsonReader.beginObject(JsonReader.java:293)
at com.murrayc.galaxyzoo.app.DecisionTree.void loadTranslation(java.io.InputStream)(Unknown Source)
void readJsonQuestions(android.util.JsonReader)
void readJsonQuestion(android.util.JsonReader,com.murrayc.galaxyzoo.app.DecisionTree$Question)
com.murrayc.galaxyzoo.app.DecisionTree$Answer getAnswerWithId(java.util.List,java.lang.String)
com.murrayc.galaxyzoo.app.DecisionTree$Question getQuestionOrFirst(java.lang.String)
com.murrayc.galaxyzoo.app.DecisionTree$Question getNextQuestionForAnswer(java.lang.String,java.lang.String)
java.util.List getAllQuestions()
java.util.List getChildrenByTagName(org.w3c.dom.Element,java.lang.String)
com.murrayc.galaxyzoo.app.DecisionTree$Question loadQuestion(org.w3c.dom.Element)
void setDiscussQuestion(com.murrayc.galaxyzoo.app.DecisionTree$DiscussQuestion)
at com.murrayc.galaxyzoo.app.DecisionTree.<init>(Unknown Source)
at com.murrayc.galaxyzoo.app.Singleton.<init>(Unknown Source)
at com.murrayc.galaxyzoo.app.Singleton$InitAsyncTask.java.lang.Void doInBackground(android.content.Context[])(Unknown Source)
void onPostExecute(java.lang.Void)
at com.murrayc.galaxyzoo.app.Singleton$InitAsyncTask.java.lang.Object doInBackground(java.lang.Object[])(Unknown Source)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
... 4 more
Fixed by this commit: https://github.com/murraycu/android-galaxyzoo/commit/a1baa8c621d2812b70e1186ffd38145cc3a185ee
And I added comments to avoid me breaking this again: https://github.com/murraycu/android-galaxyzoo/commit/9c2434bec29f1733b2f89058bb48ecae624672ae
A user, apparently using the Italian locale, reported this crash, apparently while loading the Italian translation .json file in version 1.44: