Menu

#623 Database list shows sometimes wrong card numbers

iphone_1.10
open
None
8
2020-07-18
2018-07-25
No

The following issue was seen on devices (iPhone 6, iPhone 8, with iOS 11.x).
After returning from test or drill, the card numbers sometimes show old values.
It happens not reproducible, and looks like a race condition.

Related

iphone: #623

Discussion

  • Christa Runge

    Christa Runge - 2018-07-29

    Possibly this is related to the root cause of #612 and/or #613.
    These were crashes when a card could not be loaded during test or drill.
    We never understood the true root cause, but made the code more robust in this situation.
    Root cause of #612 / #613 could be a race condition with the effect that a test / drill button is not disabled (showing 0 cards), although the related list is empty.
    On the other side, the root cause of #612 / #613 could be a wrong handling of a low memory condition.

     
  • Christa Runge

    Christa Runge - 2018-07-29

    Mathias sees wrong numbers from time to time ( ~ once a month?) in a scenario like the following:

    • working with one database
    • in the morning: perform the test
    • stop testing while number of cards > 0, go back to the database list
    • in the evening: performs the drill till number of cards == 0, go back to the database list
      Expected behavior: see drill number == 0
      Observed behavior: see drill number > 0
     
  • Christa Runge

    Christa Runge - 2018-07-29

    r3924 added consistency checks (to be enabled with #define VERIFY_DRILL_NUMBERS).
    2018-07-29: today I saw it (on a true device iPhone 8):

    • perform drill till no card left. See finished screen with correct numbers.
    • go back to database list.
      Expected behavior: see 0 cards in drill, animation from 26.
      Observed behavior: no animation, see 26 cards in drill.

    • press drill button and see it turn yellow (this is the indication of the wrong number).

    • turn to landscape and back to portrait: drill button stays yellow with wrong number
    • press Edit button, then Done button: drill button still yellow with wrong number
    • press i button, then Done button: see About screen appear and disappear.
      Drill button is still yellow, but shows the correct number now.
     

    Last edit: Christa Runge 2018-07-30
  • Christa Runge

    Christa Runge - 2018-07-30

    At r3924 plus #define VERIFY_DRILL_NUMBERS, I can now reproduce the issue with a scenarium like the following:

    • in the database list, see 0 cards in test and 32 cards in drill.
    • start drill and see the question with the card count (0 / 32) at the top
    • exit application and restart. See question again with card count (0 / 32) as expected
    • continue drill. After a successfull answer see the next question with card count as (0 / 31).
    • press Done button. See the Drill Finished screen with 0 cards in test and 31 cards in drill.
    • press Done button and see the database list.
      Expected behaviour: see 0 cards in test and 31 cards in drill.
      Observed behaviour: see 0 cards in test but 32 cards in drill.

    Note: after exit and restarting the application, the numbers are shown correctly.

     
  • Christa Runge

    Christa Runge - 2018-07-30

    Analysis: Usually, the DrillNavigationController is presented modally by the DBListViewController. In this case, the view of DBListViewController disappears, and after the drill is finished, the view appears again. In [DBListViewController viewWillAppear] we are currently calling [dbOverview scanCurrentDBFile], which updates the card numbers for test and drill for the database list.
    If we exit and restart the application during drill or test, however, the program flow is different. In this case the DrillNavigationController is presented by the DBNavigationController in a custom transition style (CrossDissolve). The view of DBListViewController never disappears, so after the drill [DBListViewController viewWillAppear] is not called.
    The card numbers for test and drill for the database list are not updated at the end of the drill.

     
  • Christa Runge

    Christa Runge - 2018-08-01

    viewWillAppear is the notification to a view controller when its view is added to the view hierarchy.
    viewWillDisappear is the notification to a view controller when its view is removed from the view hierarchy.
    UIModalPresentationStyle = UIModalPresentationFullScreen: A presentation style in which the presented view covers the screen. The views belonging to the presenting view controller are removed after the presentation completes.

     
  • Christa Runge

    Christa Runge - 2020-06-12
    • assigned_to: Christa Runge
     
    • Sidney

      Sidney - 2020-06-12

      Hi Christa,

      Glad to hear from you today and that you are still at the wheel of Karatasi.
      And by implication, you all are healthy, covid free. Any chance we in the US
      could borrow Merkel for a few months?

      FYI: I acquired a iPhone 8 in January. .has the same quirk, but it's more
      of annoyance than a problem. The correct totals appear after exiting and
      re-opening the app or just tapping the incorrect total. This iPhone has all
      kinds of little annoyance like that. I miss my ole reliable iPhone 5se.

      Best and be well,

      Sidney

      From: Christa Runge ndegendogo@users.sourceforge.net
      Sent: June 12, 2020 05:55
      To: [karatasi:bugs] 623@bugs.karatasi.p.re.sourceforge.net
      Subject: [karatasi:bugs] #623 Database list shows sometimes wrong card
      numbers

      • assigned_to: Christa Runge

      [bugs:#623] https://sourceforge.net/p/karatasi/bugs/623/ Database list
      shows sometimes wrong card numbers

      Status: open
      Milestone: iphone_1.10
      Created: Wed Jul 25, 2018 04:22 PM UTC by Christa Runge
      Last Updated: Wed Aug 01, 2018 08:10 PM UTC
      Owner: Christa Runge

      The following issue was seen on devices (iPhone 6, iPhone 8, with iOS 11.x).
      After returning from test or drill, the card numbers sometimes show old
      values.
      It happens not reproducible, and looks like a race condition.


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/karatasi/bugs/623/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      iphone: #623

  • Christa Runge

    Christa Runge - 2020-07-18
    • Priority: 5 --> 8
     

Log in to post a comment.