Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.17.5] "Invalid input: card was modified" while answering card after day cutoff #15889

Open
david-allison opened this issue Mar 14, 2024 · 5 comments
Labels
Bug Help Wanted Requesting Pull Requests from volunteers Priority-High
Milestone

Comments

@david-allison
Copy link
Member

david-allison commented Mar 14, 2024

I installed AnkiDroid 2.17.5 and I still get this "card modified" error when leaving a card open overnight (unrated) and rate it in the morning.

AnkiDroid Version = 2.17.5 (1c1aa94ec466f37d33fd2f75020d9f9021ac811e)
Backend Version = 0.1.34-anki23.12.1 (23.12.1 1a1d4d5419c6b57ef3baf99c9d2d9cf85d36ae0a)
Android Version = 9 (SDK 28)
ProductFlavor = full
Manufacturer = LGE
Model = LG-H930
Hardware = joan
Webview User Agent = Mozilla/5.0 (Linux; Android 9; LG-H930 Build/PKQ1.190414.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/120.0.6099.210 Mobile Safari/537.36
Crash Reports Enabled = true

Screenshot_20240314-082100

Originally posted by @andreas1974 in #12946 (comment)

@david-allison david-allison added this to the 2.17.6 release milestone Mar 14, 2024
@david-allison
Copy link
Member Author

@david-allison
Copy link
Member Author

I see 3 possibilities:

  • DayRolloverHandler failure
  • Failure of Reviewer: onResume
  • Failure of Reviewer: not handling a studyQueues change correctly

@david-allison david-allison added the Help Wanted Requesting Pull Requests from volunteers label Mar 14, 2024
@andreas1974
Copy link

Hi again David!

Since the previous solution was mentioned as a hack, I had another suggestion – still a hack, but one that ought to be simpler and not required to run all the time.

[The following part of this message was moved from link]

Quote from previous location:

⚠️ This is a hack, please suggest a better method, happy to rewrite

Thank you, David, for trying to deal with this issue!
I do however have another suggestion: Could you add an error handler that just suppresses / ignores this exact error instead, on this place in the code? I guess it would mean one question, at the most, not rated every 24 hours, right? Personally I'd prefer that to code running every second.

"> withCol { sched.dayCutoff } takes 0-5ms on a background thread, I'm not worried about a hit to battery life from this"

Yes, I read you are not worried about the hit to battery life, but if many app programmers argue the same way, running 5 ms code every second, there will eventually be a hit on performance and battery life.
That is why I would prefer losing one rated card every day, or getting the same card again (if that is what will happen). I don't mind much getting a question just one extra time a day.

Thanks,
Andreas Jansson

@david-allison
Copy link
Member Author

david-allison commented Apr 16, 2024

Could you add an error handler that just suppresses / ignores this exact error instead, on this place in the code? I guess it would mean one question, at the most, not rated every 24 hours, right? Personally I'd prefer that to code running every second.

We should diagnose and fix the bug. The code runs every minute.

Yes, I read you are not worried about the hit to battery life, but if many app programmers argue the same way, running 5 ms code every second, there will eventually be a hit on performance and battery life.

If there are alternative APIs which we can use, I'm open to it. We should first be correct. Users shouldn't miss a card

@mikehardy mikehardy modified the milestones: 2.18 release, 2.19 release May 13, 2024

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Help Wanted Requesting Pull Requests from volunteers Priority-High
Projects
None yet
Development

No branches or pull requests

3 participants