Skip to content

Conversation

@dab246
Copy link
Member

@dab246 dab246 commented Oct 13, 2025

Issue

#4099

Root cause

  • Log analysis:
[ERROR:android_webview/browser/aw_browser_terminator.cc:165]
Renderer process (14064) crash detected (code -1).
[ERROR:android_webview/browser/aw_browser_terminator.cc:113]
Render process (14064) kill (OOM or update) wasn't handled by all associated webviews, killing application.

This is a typical crash of Android WebView renderer being OOM (Out Of Memory) or being force-killed due to low-memory policy.

Special:

Process com.linagora.android.teammail (pid 12911) has died: svc +1 LAST
skip restart com.linagora.android.teammail because this device is a lowmemory device!

Confirmed MIUI (system_server) killed the process to reclaim memory, as the device recognized it as a “lowmemory device”.

  • Conclude:

flutter_inappwebview creates its own sandbox renderer (Chromium engine) -> consumes a lot of RAM.

When file_picker turns on Intent.ACTION_OPEN_DOCUMENT, Android temporarily switches foreground to another app → causing MIUI or Android low-memory killer to think your app is in the background → kill WebView renderer.

Then WebView cannot recover because Chromium sandbox is dead → Flutter is terminated.

Workaround

  • Reduce WebView memory footprint
  • Enable android:largeHeap="true" in AndroidManifest => Allow process to keep more RAM, limit OOM kill when DocumentsUI is open.

@github-actions
Copy link

This PR has been deployed to https://linagora.github.io/tmail-flutter/4100.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant