Tap and hold ending outside of LifeLine crashes the app

Issue #303 resolved
Cécile Camillieri created an issue
  • In MessageView view, tap and hold on a LifeLine
  • Before the bar fills up, slowly move a bit right or left outside of the LifeLine (see attachment)
  • When the TapAndHoldEvent is finally processed the app crashes as follows:
Exception in thread "Animation Thread" java.lang.IndexOutOfBoundsException: Index: 1, Size: 0
    at java.util.ArrayList.rangeCheck(Unknown Source)
    at java.util.ArrayList.get(Unknown Source)
    at ca.mcgill.sel.ram.ui.views.message.LifelineView.getFragmentContainerAt(LifelineView.java:1065)
    at ca.mcgill.sel.ram.ui.views.message.handler.impl.LifelineViewHandler.processTapAndHoldEvent(LifelineViewHandler.java:107)
    at ca.mcgill.sel.ram.ui.views.handler.BaseHandler.processGestureEvent(BaseHandler.java:93)
    at ca.mcgill.sel.ram.ui.views.message.LifelineView$Spacer$1.processGestureEvent(LifelineView.java:183)
    at org.mt4j.input.GestureEventSupport.fire(GestureEventSupport.java:184)

It probably happens because the app looks for a LifeLine at the location where the event ended, and not where it started.

Comments (3)

  1. Matthias Schoettle

    Looks like a bug in MT4j to me, because the "end point" when the tap-and-hold is complete should be the same as the start point. So we can either work around it in TouchCORE, or change that code in our version of MT4j :)

  2. Log in to comment