Open JackMostow opened 5 years ago
@amogh112 - I added you to these 3 repeatable bugs in case you'd like to help solve them. I have a feeling that they're related, since they all involve getting stuck at a particular point in a story -- but not entirely deterministic in one case, and apparently activity-dependent in another. Hypothesized causes so far -- and there may be multiple causes -- include:
As @JackMostow hypothesized, this particular bug was due to an illegal construct in storydata.json. It leads to the following error trace.
System.err: java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
at cmu.xprize.comp_questions.CQn_ViewManagerASB.seekToStoryPosition(CQn_ViewManagerASB.java:1267)
at cmu.xprize.comp_questions.CQn_ViewManagerASB.incPage(CQn_ViewManagerASB.java:2024)
W/System.err: at cmu.xprize.comp_questions.CQn_ViewManagerASB.nextPage(CQn_ViewManagerASB.java:1987)
at cmu.xprize.comp_questions.CQn_ViewManagerASB.execCommand(CQn_ViewManagerASB.java:1795)
at cmu.xprize.comp_questions.CQn_Component$Queue.run(CQn_Component.java:860)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:165)
at android.app.ActivityThread.main(ActivityThread.java:6375)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802)
And the info just before this is: D/CQn_ViewManagerASB: seekToStoryPosition: Page: 4 - Paragraph: 0 - line: 0 - word: 0
.
The error occurs here https://github.com/RoboTutorLLC/RoboTutor/blob/db6da8778f73d05f360dd20e6622c83c57e16bee/comp_questions/src/main/java/cmu/xprize/comp_questions/CQn_ViewManagerASB.java#L1448
This was supposed to be by handled by if condition here: https://github.com/RoboTutorLLC/RoboTutor/blob/db6da8778f73d05f360dd20e6622c83c57e16bee/comp_questions/src/main/java/cmu/xprize/comp_questions/CQn_ViewManagerASB.java#L1391 But the scope of the if condition ends just before the error.
A similar error can occur in questions component and maybe at some other place in the code. https://github.com/RoboTutorLLC/RoboTutor/blob/db6da8778f73d05f360dd20e6622c83c57e16bee/comp_reading/src/main/java/cmu/xprize/rt_component/CRt_ViewManagerASB.java#L632
@sedflix - Nice work!
Besides fixing these bugs in the code, what if any changes should we make to: a. specific stories? b. the storydata.json generator?
RoboTutor now detects and logs CRASH events but not STUCK or FREEZE, even after the fact in logs. If you can tell us where (e.g. which story and sentence) to find instances of this bug in logs, we can use them to test heuristics for detecting STUCK in logs, e.g. a long hiatus followed by Back.
Any idea how often these bugs occur?
Thanks! - Jack
"1. In the debug build, navigate to story 78.
{"class":"ERROR","tag":"CQn_Component","type":"Exception","time":"1540831707251","msg":"Run Error: cmd:NEXT_PAGE tar: null >","exception":"java.lang.ArrayIndexOutOfBoundsException: length=0; index=0"}, {"type":"LOG_DATA","tutor":"story.gen.hear::story_78","class":"INFO","tag":"TSTag","time":"1540831810855","data":{"BACKBUTTON":"PRESSED"}},
story_78 picture on last page: "image": "level4_8_page_12_image_0001.jpg", Kisirusiru na mamake walishuka chini. Walipofungua yale magunia, walipata pesa, nguo, mablanketi, na kila kitu walichohitaji kuanzisha nyumba yao. Punde, walipata pahali pa kujenga nyumba na wakaishi kwa furaha tangu siku hiyo.
story.hear::story_78 stops with this full screen of text showing and no image: Siku iliyofuata, mvulana yule alichukuwa chungu kwenda mtoni.
Alikumbuka alichoambiwa na mamake, hivyo alikifungia chungu ndani ya kipande cha karatasi ili kukibeba kurudi nyumbani.
Lakini alipokuwa njiani, ile karatasi iliraruka na chungu kikaanguka chini na kuvunjika vipande vipande.
Maji yalimwagika chini.
Alipofika nyumbani, mamake alimweleza kwa subira, "Mtoto wangu, wakati ujao kiweke chungu kichwani.
Hivyo utakibeba bila kumwaga maji."
"Ndiyo mama, naelewa," Kisirusiru alisema.
Next is image with no text: { "image": "level4_8_page_06_image_0001.jpg", "text": [] },
Is "text": [] normal in storydata.json??