RoboTutorLLC / RoboTutor_2019

Main code for RoboTutor. Uploaded 11/20/2018 to XPRIZE from RoboTutorLLC/RoboTutor.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

2.7.5.1 VMC: "At the end of the story, text displays without an accompanying image, followed by ending on a blank/white screen that stays until the user backs out. https://drive.google.com/open?id=17q4uerioD82e6fN4l7zpTsbrT2XefM"

JackMostow opened this issue · comments

"1. In the debug build, navigate to story 78.
2. Wait until the end of the story.
3. Observe the last two panels."

{"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??

@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:

  • Too much text on the page to fit on one screen?
  • Illegal construct in storydata.json, e.g. "text": []
  • Resource issues, e.g. image too big to load -- though they didn't seem to be
  • Something speech related, perhaps a missing narration or filename mismatch
  • Other ideas?

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!

  1. Besides fixing these bugs in the code, what if any changes should we make to:
    a. specific stories?
    b. the storydata.json generator?

  2. 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.

  3. Any idea how often these bugs occur?

Thanks! - Jack