Anki-android: New cards only being reviewed after existing cards when being added at beginning of session

Created on 29 Jul 2020  路  33Comments  路  Source: ankidroid/Anki-Android

Reproduction Steps
  1. Under Anki Settings > Reviewing > New card position > Set to "new cards before review"
  2. Add new cards to deck
  3. Start reviewing deck
  4. Go back to deck list after having viewed new cards
  5. Start review again later
Expected Result

New cards that that were added will appear mixed in between existing cards as reviews, as per the time limits on the cards.

Actual Result

All new cards are only reviewed after all old cards in deck have been marked as "good", even if the time span has been reached.
e.g.

  1. View new card, and mark as "view in 1 minute"
  2. Review existing card, and mark as "view in 10 minutes" for re-review.
  3. Review other existing cards, taking 10 minutes.
  4. Re-review bad existing card mentioned in step 2.
  5. Review the remaining existing cards.
  6. New card that was mentioned in step 1 finally shows now.

This means that the new card that was set to "view in 1 minute" was only viewed after at least 10 minutes.

Debug info

AnkiDroid Version = 2.12.1

Android Version = 10

ACRA UUID = 65e0aafa-1437-41d0-82f2-321630f96fce

Research

Enter an [x] character to confirm the points below:

  • [x] I have read the support page and am reporting a bug or enhancement request specific to AnkiDroid
  • [x] I have checked the manual and the FAQ and could not find a solution to my issue
  • [x] I have searched for similar existing issues here and on the user forum
  • [ ] (Optional) I have confirmed the issue is not resolved in the latest alpha release (instructions)
2.12.x Bug Keep Open Needs Triage Reviewer

All 33 comments

Hello! 馃憢 Thanks for logging this issue. Please remember we are all volunteers here, so some patience may be required before we can get to the issue. Also remember that the fastest way to get resolution on an issue is to propose a change directly, https://github.com/ankidroid/Anki-Android/wiki/Contributing

Hi @nickkossolapov, thanks for the report!

How does Anki Desktop behave when attempting this?

All the best,

David

Thanks for the quick reply @david-allison-1. I haven't tried it out yet, and I've finished my reviews for today. I'll try it out tomorrow and get back to you.

@david-allison-1 I've tried this morning with two decks, one on desktop, and one on AnkiDroid. The desktop one worked as expected, with the new cards being reviewed throughout the session, but with AnkiDroid all the new cards seem to have accumulated at the end of the session. Both decks have the same settings.

The time actually seem to be ignored for new cards, particularly when I mark them as "good", or view again in 10 minutes. For example, I'll have a new card that I'll mark to view in 10 minutes. Then afterwards I'll come across a mature card, and mark to view for re-review in 10 minutes. After some time, I'll see the mature card again even though I'd expect to see the new card first. I can keep on marking the mature card as bad, and I'll still keep on seeing it before I get to the new cards, sometimes even seeing the mature card immediately afterwards, despite there being a backlog of cards to review. It seems I can't review the new cards after the first initial view or two until all old cards have been reviewed.

Thanks! I'll add it to my backlog of things to take a look at.

Has this started occurring with 2.12.x, or has it been an issue for a while?

I can't remember the specific version, but definitely has only recently started. So it could potentially be 2.12.x?

I聽am sorry, what do you mean by:

as per the time limits on the cards.

The only time limit I can think of is that, for statistical purpose, we cap the timer to one minute. So that if you leave your phone during one hours and come back, it's not logged that you took one hour to review a card. But it seems entirely unrelated to the current problem.

New cards that that were added will appear mixed in between existing cards as reviews

I don't understand either. By "new cards" do you mean what anki call a new card ? I.e. a card that has never been reviewed since you added it to your collection (or since you resetted it as new). By "review" do you mean cards that you have already succesfully reviewed, and that anki believes you should see again today ?

Because, the expected result in this case is that you begin by seing new cards, and then later you see review cards. But they are not mixed.

Note in particular that here "new" card does not mean that you see the last card you added first. So if they are cards you have never seen yet, they are considered as new, even if you added them a year ago. If your deck is not in random order, you are going to see the oldest new card first, and that's the expected behavior. (I do realize that "the oldest new card" is quite confusing and the name "new" is probably badly chosen)

If you know how to film/record your use of the app, it may helps. It would allow us to see exactly what you are doing and may make things simpler to follow through

Which scheduler are you using ? In particular, can you confirm that you are using the same on desktop and on ankidroid ?

My intuition would be that instead of moving to QUEUE_TYPE_LRN it moves to QUEUE_TYPE_DAY_LEARN_RELEARN. This would explain why the card of step 1聽is in learning mode but appear at the end of the review. That is, it believes that the delay for the next review is long enough that the next step is another day.
That would be the case if either there is a problem with the timer (mTime insteal of Utils ?) or with the limit of today. The first case would not be entirely surprising if it is scheduler V1, indeed, this scheduler uses two different timers depending on the method called, so the error may appear only some times and not always

Sorry for the delayed response.

Unfortunately it'll be difficult to record a video of this behaviour, as I notice on decks where I spend over half an hour reviewing. I just mentioned temporary closing the deck in the bug to try and replicate this.

I'll start the deck off with 10 new cards, and 100 to review. My AnkiDroid is set for "New cards before reviews", with the steps 1 5 10. I'll view the new cards once or twice at the beginning, but then I often won't see them again until the end of the session and the 100 cards have been reviewed, only after half an hour. It is intermittent though. There are some days where I don't notice this behaviour, like this morning.

I don't recall ever having this behaviour on Anki desktop, or on the AnkiDroid before a few weeks ago.

I'm using the V1 scheduler. Should I try use the V2 scheduler instead to see if it resolves this problem?

I assume that each time you click "good" so that the steps are simply 1 5 and 10 ?聽Right ?

Yes, so I'll click on "Good", and I'd expect to see it again in 5 minutes, but I often only see it again at the end of the session

We had two reports with V1 and no problem with V2. However, that's clearly a problem we should resume ourselve (assuming we can reproduce it) and you are not expected to change it yourself.

I'm still trying to figure out what's going on. I'm quite perplex. I'm making some wild guess here to try to get more hint.

Does this problem occur with all cards ?聽Or are there some cards that you still see and other that get moved to end of the review session ?

I clearly be interested in knowing whether you see all of them once, twice, or if they are some that you see once and some twice. The process "new->in learning" is not the same as "one step to the next one", so it would really help to know what to look for in the code.

The numbers of cards to see currently are shown correctly ? You don't see "0 new card" and "0 review card" at any point ? If it believed there were only cards in learning, it would maybe make sens, but I don't expect that it's the problem either

Oh, I forgot a more important question: the third number is not 0 ? It correctly shows that there are cards to review ?

If possible, can you please start reviewing, and when you know there is a card that you should be seeing now, export your collection and share it here or directly to me arthur.[email protected] and let me know which card you are expecting to see again. I.e. something allowing me to find the exact note and the name of the card type (front, back... )

The problem seems to mostly occur with "new cards", unseen cards. It might have occurred with seen/marked-as-bad cards, but it seems more prevalent with new cards.

I can't recall the exact pattern in which I see them. But I think it was usually new card -> mark as good - view in 5 minutes -> see cards again in 5 minutes, mark as good again - view in 10 minutes -> only see at end of session. It only happened when I marked the card as good. If I marked as bad - view in 1 minute, it wasn't moved to the end of the session.

Yes, the number of cards has been correct whenever I've checked, at least in terms of being reasonable. Like I've never had "1 card left" and then reviewed 10 cards.

Yes, the third (green) number would be 0 before I start viewing the cards I added at the beginning of the session.

I did track my cards this morning, intending to send my deck through, but the behaviour wasn't there with any of my decks.

I don't think I've had the problem for the past few days actually, even though my AnkiDroid app hasn't received any updates.

Next time I encounter it I'll definitely try to send my collection along to you.

Thank you. It鈥檚 quite hard to correct a bug I can鈥檛 reproduce so any help would be appreciated. Thanks a lot for doing the extra work of teaching the big during your review session

You explained that you left the reviewer and then started reviewing again, right ? That the problem occurs when you stop reviewing and comme back, When you start the reviewer again, the red number should be positive since you have cards in learning. It's it the case that this number become positive while you send cards to be reviewed in some minutes ?

It's not necessarily the case that I have to leave the review. I've noticed it even when I don't leave at all. And yes, the red number does increase, as all those new cards in are now in learning.

Okay. Thank you again for all of those informations.

I'm going to make even wilder guess, because those are the only hypothesis that remains which would make sens given my current understanding of the scheduler.

Would you, by any luck, have done your review 10 minutes before the start of a new day ?
By default Anki consider that a new day starts at 4am. I.e. at 4 am it adds cards to review and to discover that were not seen. You can change it to any hour you want, you may want to check it in your preference.
If you were reviewing your cards just before the start of new day, then the cards would be marked as "next still will occur tomorrow". In this case, the due date would not actually be "10 minutes" but "in one day". Then, during review, since they are considered as "card from yesterday" they are not considered priorities and postpone to the end of the review. This is a technical details of implementation and normally users should not really have to look at this fact, but that's currently the best explanation that I could imagine.

Another explanation could be that you are changing timezone often. I could imagine that if someone goes back in time (i.e. change hour of their phone, move to a different country/state, trigger daytime saving...) similar problem could occurs. They should not occur, but as far as I know we never had anyone testing what occurs if you regularly change timezone during your review, so I can imagine that this would postpone cards' next due. But if you were to regularly change timezone because you live and work in different timezone for example, it may create this bug.

I have been doing my reviews at the same time every morning, and in the same time zone. It's not near the new-day time though.

I tracked my new cards this weekend, and I didn't encounter it at all. So I'm starting to think maybe there was just a weird backlog glitch that happened. It was pretty consistent for a couple of days when I created the issue, but recently I haven't replicated it. It's probably going to be a nightmare to debug.

Then I'm going to stop looking at it and going back to alpha. @david-allison-1 if you have any idea,聽I'd be more than happy if you can investigate. If you can write a unit test reproducing it which fails that would be extremely wonderful, and I'd love to try to debug it. Until I know how to create the error I'll stop trying.
@nickkossolapov if at some point this occurs again, please let us know, and if possible, share your collection at this very moment so I could get a better idea.

Do you think you could go to alpha https://docs.ankidroid.org/#betaTesting and let us know if the problem still exists ? A lot of change occurred since 2.12 and I'd be curious to know whether it was solved.

Apologies for the delayed response. I entered the beta program this morning, and I'll try it out for a few days and let you know if I encounter the issue again.

Thank you very much.
I mentioned alpha however. Unless I wrong, we currently don't have any beta, so you probably still have the same version of the application. Am I wrong @mikehardy ?

Correct, 2.12.1 is stable enough I'm leaving it to focus on 2.13. Accessing the alpha is the way to help collaborate and solve this at the moment. I think we can do it too, so any effort there is appreciated

I've joined the alpha group on Google Groups and searched for updates on the Play Store, but I still only have 2.12.1 available. Am I missing any additional steps? Or will it take some time before the alpha is available to me?

Sometimes it takes a little time for the Play store to make it available, in the meantime you can always just directly install the release https://github.com/ankidroid/Anki-Android/releases - as mentioned there the arm64 build is the likely choice for everyone, or you can install the parallel '.A' build

Thanks for the info! I've updated to the alpha version now. I'll get back to you @Arthur-Milchior after a couple of days to see if I encounter the problem again

Thanks.

I've tried it with 2.13 alpha for a few days, and I haven't encountered the issue so far.

Because I can't replicate the issue any more, I'll close the issue.

Was this page helpful?
0 / 5 - 0 ratings