Skip to content

refactor: handle onRenderProcessGone in image preview - #21565

Open
criticalAY wants to merge 1 commit into
ankidroid:mainfrom
criticalAY:17486-multimedia-render-process-gone
Open

refactor: handle onRenderProcessGone in image preview#21565
criticalAY wants to merge 1 commit into
ankidroid:mainfrom
criticalAY:17486-multimedia-render-process-gone

Conversation

@criticalAY

@criticalAY criticalAY commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Purpose / Description

  • Startup failure: InvocationTargetException: Cannot call WebViewCachedFlags.init more than once. #21529 shows users a Chromium assert, Cannot call WebViewCachedFlags.init more than once, which says nothing about why their app won't start. Android doesn't cache a failed WebView load, so our second WebView call re-runs Chromium's provider constructor and dies on re-entry, while the first failure, the real one, was already thrown away. This keeps the first failure so the crash report actually tells us what broke.

Fixes

Approach

See commit

How Has This Been Tested?

Unit testing

Learning (optional, can help others)

NA

Checklist

Please, go through these checks before submitting the PR.

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

@criticalAY
criticalAY marked this pull request as draft August 19, 2026 17:22
The preview never set a WebViewClient, so the default onRenderProcessGone
ran and returned false, killing the app process instead of the preview so use SafeWebViewLayout
@criticalAY
criticalAY force-pushed the 17486-multimedia-render-process-gone branch from 0e19f56 to c5ade06 Compare August 19, 2026 17:54
@criticalAY criticalAY changed the title fix: handle onRenderProcessGone in image preview refactor: handle onRenderProcessGone in image preview Aug 19, 2026
@criticalAY
criticalAY marked this pull request as ready for review August 19, 2026 17:54

@david-allison david-allison left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, cheers!

nit: non-blocker. destroy isn't called in this activity; probably one for a quick issue


timebox another couple days for a second reviewer, then let's merge

@david-allison david-allison added Needs Second Approval Has one approval, one more approval to merge and removed Needs Review labels Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Second Approval Has one approval, one more approval to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants