ankidroid / Anki-Android

AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.
GNU General Public License v3.0
8.43k stars 2.19k forks source link

AnkiDroid restarts randomly #4097

Closed jytou closed 5 years ago

jytou commented 8 years ago

As stated in the title, AnkiDroid sometimes restarts during reviewing of cards. I believe it happens mostly when showing the answer for cards that have sounds. The problem here is that there is no error report, nothing to send you guys. It just freezes, and restarts. In the meantime, it also loses some of the progress made in the current session, which is really not fun. How can I get some error report somewhere (if any?).

timrae commented 8 years ago

Hi please paste your "debug info". A crash report should have been sent the very first time the issue occurred. Reports are not sent on subsequent occurrences.

jytou commented 8 years ago

Here you go: AnkiDroid Version = 2.5.4 Android Version = 4.1.2 ACRA UUID = da2c7fc5-e28b-496c-818f-7a77d17183e8 Thanks!

timrae commented 8 years ago

Thanks for that. In spite of what I said, actually we have not received any crash reports from you.

Is there anything non-standard about your device? What device is it? Are you able to test it on any other devices? Are you storing the media on a removable SD card? When you notice that it happens on a given card, does it subsequently always happen when that same card comes up?

hssm commented 8 years ago

If you continually review cards with no sound, do you experience the problem?

It sounds like we have a memory leak with sound playback and eventually the application restarts to free up the memory it's taken.

timrae commented 8 years ago

(If you uncheck "Automatically play audio" under "General" in deck options you should be able to review without audio)

hssm commented 8 years ago

The audio queues are built if there is audio on the card so turning that setting off might still trigger the problem. We need to test cards with no audio on them at all just to be certain.

jytou commented 8 years ago

Hi again guys, sorry for not answering before, but I wanted to stress-test it a little before giving any definite answers since it sometimes feels like the restart is a little random. Here are my findings:

timrae commented 8 years ago

It sounds like it's a device specific issue, maybe a problem with your webview. Not much we can do about that unfortunately On 27 Feb 2016 05:33, "jytou" notifications@github.com wrote:

Hi again guys, sorry for not answering before, but I wanted to stress-test it a little before giving any definite answers since it sometimes feels like the restart is a little random. Here are my findings:

  • this happens only on that tablet (a Samsung Galaxy Tab - nothing exotic), I've tried on my cell phone (not so practical to review vocabulary!) and never encountered the problem (even though it is an exotic one - Fairphone https://www.fairphone.com/),
  • it will happen sometimes on a card and restart systematically on it... then it will pass it correctly and work again (just to crash on another card seconds or minutes later), so it is not a memory leak problem as it sometimes happen on the very first card I'm reviewing after a restart,
  • it is not 100% related to sound, as I did have a systematic crash on a course that has no sound, and some courses with sounds never have any problem,
  • I believe it may be related to media in general (most of my cards have at least one media, most have at least a picture and a sound),
  • when this happens, it does play the correct sound itself, but shows a blank card, and then restarts (most of the time losing the current progress), just as if it couldn't show the layout of the card (or maybe because it crashes when loading some media and doesn't have time to show the card),
  • the medias are not held locally, they are hosted on a web site (and sorry, I have 80.000+ media files, not putting them on my tablet anytime soon),
  • if I just shut down the wifi so that it cannot get the media files at all, it never crashes (at least it never did in the last few days),
  • some courses that have sounds never crash ever, I couldn't figure what's the critical difference between the courses that crash and those that don't. That's pretty much all I've got so far. Overall, it may be more of a layout problem than just sound.

— Reply to this email directly or view it on GitHub https://github.com/ankidroid/Anki-Android/issues/4097#issuecomment-189473338 .

hssm commented 8 years ago

the medias are not held locally, they are hosted on a web site

if I just shut down the wifi so that it cannot get the media files at all, it never crashes

Which makes it very likely to be the culprit then, right?

The syntax [sound:http://some/file.mp3] isn't officially supported and I would say a lot of behavior with it is undefined. For this reason I'd like to close this issue. I would recommend trying to debug the application yourself, and if you provide us with the details of what you find we might be able to better understand what is going on and provide some assistance.

But since we can't reproduce it and we don't have more specific details there isn't much else we can do with this.

jytou commented 8 years ago

I have to agree that at this stage, you don't have enough info to reproduce it and thus fix it. However, as I was pointing out in my last message, I finally don't think it's about the sound since some cards without sound crash as well. It's much more about layout. Still trying to find the culprit (as some courses with sound+images never crash, ever. There must be something in the layout of cards or data that causes the crash).

andreas1974 commented 8 months ago

I know this is closed... Should I report things like this anyway, on the closed issue, if I believe it to be the same? Edit: Sorry... this it's very old! It is likely not the same.

Anyway I've had four random restarts while using Anki, after switching to the new "backend" a few days ago (then I was still using the latest release from Google Play store). Before that I used the old backend for some months without noticing any similar problems. After upgrading to the latest alpha version (2.17 alpha 15) yesterday, Anki has restarted once, which was about 20-40 minutes ago. I don't think my phone had internet connection at that moment, and I don't know if it will have sent an error report now, after connecting again. I have no sounds on my card so that is not the problem.

AnkiDroid Version = 2.17alpha15 (e5b25f3fef737140ae396d1b212a8d638551500f) 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 ACRA UUID = 5b935c08-681b-4ebb-87c5-7701905caf7a Crash Reports Enabled = true