WebView Renderer OOM - kills application if triggered on startup
#5 883 ouverte le 31 mars 2020
Métriques du dépôt
- Stars
- (11 132 stars)
- Métriques de merge PR
- (Merge moyen 9j 12h) (93 PRs mergées en 30 j)
Description
If Anki Logcat doesn't display a line, then a WebView Renderer crash has the possibility to take down the process even if we hook onRenderProcessGone. This doesn't appear to be any of our WebViews, and might be due to bloatware in my OS, or an unexpected WebView in a dependency.
Phone does not crash if the following appears:
2020-03-31 11:45:10.978 24674-24674/com.ichi2.anki E/chromium: [ERROR:aw_browser_terminator.cc(125)] Renderer process (24741) crash detected (code -1).
Phone OS: Honor 9 Lite
Description below is a bit rough as it's copy/pasted.
Had a long debug session for this yesterday. It takes a long time to occur, but once it does, it happens with regularity.
I could only get it to crash on the first instance. After that, it seemed stable.
HEAD is now at 9c12b9aac Gracefully handle WebView Crashes
Steps (repeat 2-6 until crash):
- Modify
displayCardAnswer()to crash chrome - Open Android "Current App" screen and swipe Anki away to kill it
- Open Anki
- Open a deck with cards
- Display Answer
- Anki Crashes
2020-03-31 09:28:27.989 6955-6955/com.ichi2.anki A/chromium: [FATAL:crashpad_client_linux.cc(552)] Render process (7023)'s crash wasn't handled by all associated webviews, triggering application crash.
2020-03-31 09:28:27.989 6955-6955/com.ichi2.anki A/libc: Fatal signal 5 (SIGTRAP), code -6 (SI_TKILL) in tid 6955 (com.ichi2.anki), pid 6955 (com.ichi2.anki)
No clue about the cause.
Fix:
- Open Anki
- While on the deck screen, switch to Chrome
- Press 'Back' in Chrome
- See Log Line:
2020-03-31 11:45:10.978 24674-24674/com.ichi2.anki E/chromium: [ERROR:aw_browser_terminator.cc(125)] Renderer process (24741) crash detected (code -1). - Back to Anki
- Review as normal, crashes occur and are fixed by onRenderProcessGone
Originally posted by @david-allison-1 in https://github.com/ankidroid/Anki-Android/issues/5780#issuecomment-606481534