Anki-Android icon indicating copy to clipboard operation
Anki-Android copied to clipboard

Random "Processing" popups

Open user1823 opened this issue 2 years ago • 7 comments

While using the app, a popup saying "Processing" randomly appears on the screen.

I suspect this indicates that AnkiDroid is creating a backup. If it is so, either this should occur in the background (if possible) or the popup should clearly say "Creating a backup". Otherwise, it's not clear what it is "processing".

user1823 avatar Dec 04 '23 14:12 user1823

Idk if this is a 2.16 or 2.17 bug, but I have been experiencing this eventually since a reasonable amount of time

BrayanDSO avatar Dec 05 '23 00:12 BrayanDSO

A debug setting here would be useful: potentially either walk the stack, or accept a user-supplied debug string to display on the dialog

I suspect this is loadCounts, but we should be able to know the cause

david-allison avatar Dec 05 '23 00:12 david-allison

Lazy code which gets a good debug string

Exception().stackTraceToString().split("\n").reversed().takeWhile { !it.contains("launchCatchingTask") && !it.contains("withProgress") }.reversed().take(7).joinToString("\n")

david-allison avatar Dec 05 '23 00:12 david-allison

awaitBackupCompletion() can be moved out of withCol() and called via getBackend().awaitBackupCompletion() instead, which will prevent other collection ops from blocking while a backup completes.

dae avatar Dec 05 '23 00:12 dae

@david-allison, I still see random popups appearing on the screen for a fraction of second (for such a small amount of time that I can only see a flash). Today, I noticed that there is a backup created at the same time. So, I think that these popups are due to automated backups.

AnkiDroid version 2.18 alpha 6

user1823 avatar Mar 24 '24 12:03 user1823

Recently (most probably since 2.19 alpha 6), the frequency of the "Processing" popups has increased. A popup appears almost every time I launch the app. These popups don't seem to be associated with automated backups because there is no backup created at the same time.

user1823 avatar Jun 21 '24 17:06 user1823

With alpha 6, I am using the old directory location (/storage/emulated/0/AnkiDroid) because I had to uninstall and then reinstall the app after I installed alpha 5 which had a bug making it impossible to launch.

Can the recent increase in the frequency of these popups be caused by a shift from the new location (/storage/emulated/0/Android/data/com.ichi2.anki/files/AnkiDroid) to the old location?

In http://github.com/ankidroid/Anki-Android/wiki/Storage-Migration-FAQ, I read

If AnkiDroid 2.16 is using the new location ... file operations (media sync, import etc...) are much faster

So, maybe, the slow reading of the collection file from the old location is causing these "Processing" popups to appear?

Edit: I switched back to the new directory location and I am still seeing the problem. So, the directory location was not the cause.

user1823 avatar Jun 22 '24 16:06 user1823

I believe this is fixed in #16765

If not, please ping and I'll reopen

  • #16765

david-allison avatar Aug 04 '24 00:08 david-allison