ankidroid / ankidroid/Anki-Android
WebView Renderer OOM - kills application if triggered on startup
- 主要语言
- Kotlin
- 星标
- 11.8k
- 派生
- 2.9k
- 平均合并
- 2 天 3 小时
- 30 天内合并 PR
- 171
描述
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_
贡献指南
评估
这个 Issue 还没有评估数据。