SMILEConsortium / smile_teacher_android

The SMILE Teacher Android App
http://www.smileconsortium.org
Apache License 2.0
1 stars 2 forks source link

Android Teacher App crashes during submissions if there are any JSON errors #62

Open truedat101 opened 10 years ago

truedat101 commented 10 years ago

A bad Student Client app can submit improperly. This will crash the teacher app:

E/AndroidRuntime(28556): Caused by: java.lang.NumberFormatException: Invalid int: "" E/AndroidRuntime(28556): at java.lang.Integer.invalidInt(Integer.java:138) E/AndroidRuntime(28556): at java.lang.Integer.parseInt(Integer.java:359) E/AndroidRuntime(28556): at java.lang.Integer.parseInt(Integer.java:332) E/AndroidRuntime(28556): at java.lang.Integer.valueOf(Integer.java:490) E/AndroidRuntime(28556): at org.smilec.smile.bu.json.QuestionJSONParser.process(QuestionJSONParser.java:55) E/AndroidRuntime(28556): at org.smilec.smile.bu.BoardManager.processQuestions(BoardManager.java:186) E/AndroidRuntime(28556): at org.smilec.smile.bu.BoardManager.loadBoard(BoardManager.java:158) E/AndroidRuntime(28556): at org.smilec.smile.bu.BoardManager.getBoard(BoardManager.java:63) E/AndroidRuntime(28556): at org.smilec.smile.ui.GeneralActivity.loadBoard(GeneralActivity.java:711) E/AndroidRuntime(28556): at org.smilec.smile.ui.GeneralActivity.access$1600(GeneralActivity.java:73) E/AndroidRuntime(28556): at org.smilec.smile.ui.GeneralActivity$UpdateBoardTask.doInBackground(GeneralActivity.java:760) E/AndroidRuntime(28556): at org.smilec.smile.ui.GeneralActivity$UpdateBoardTask.doInBackground(GeneralActivity.java:754) E/AndroidRuntime(28556): at android.os.AsyncTask$2.call(AsyncTask.java:287) E/AndroidRuntime(28556): at java.util.concurrent.FutureTask.run(FutureTask.java:234) E/AndroidRuntime(28556): ... 3 more

truedat101 commented 10 years ago

We will beef up stability in a later release.