ankidroid / ankidroid/Anki-Android
WebView Renderer OOM - kills application if triggered on startup
- Lenguaje dominante
- Kotlin
- Estrellas
- 11.8k
- Forks
- 2.9k
- Merge medio
- 2 d 3 h
- PR fusionados (30 d)
- 171
Descripción
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):
1. Modify `displayCardAnswer()` to crash chrome
2. Open Android "Current App" screen and swipe Anki away to kill it
3. Open Anki
4. Open a deck with cards
5. Display Answer
6. 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:
1. Open Anki
2. While on the deck screen, switch to Chrome
3. Press 'Back' in Chrome
4. 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).`
5. Back to Anki
6. 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_
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.