Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crashes when loading About dialog on Android 5 devices #340

Open
brarcher opened this issue Jan 6, 2020 · 2 comments
Open

App crashes when loading About dialog on Android 5 devices #340

brarcher opened this issue Jan 6, 2020 · 2 comments
Labels

Comments

@brarcher
Copy link
Owner

brarcher commented Jan 6, 2020

Due to a bug in androidx.appcompat:appcompat versions 1.1.0 through 1.2.0-alpha01, loading the About dialog on Android 5 devices results in a crash:

FATAL EXCEPTION: ControllerMessenger
Process: protect.card_locker, PID: 14560
android.content.res.Resources$NotFoundException: String resource ID #0x3040002
	at android.content.res.HwResources.getText(HwResources.java:1252)
	at android.content.res.Resources.getString(Resources.java:374)
	at com.android.org.chromium.content.browser.ContentViewCore.setContainerView(ContentViewCore.java:948)
	at com.android.org.chromium.content.browser.ContentViewCore.initialize(ContentViewCore.java:848)
	at com.android.org.chromium.android_webview.AwContents.createAndInitializeContentViewCore(AwContents.java:649)
	at com.android.org.chromium.android_webview.AwContents.setNewAwContents(AwContents.java:788)
	at com.android.org.chromium.android_webview.AwContents.<init>(AwContents.java:635)
	at com.android.org.chromium.android_webview.AwContents.<init>(AwContents.java:573)
	at com.android.webview.chromium.WebViewChromium.initForReal(WebViewChromium.java:315)
	at com.android.webview.chromium.WebViewChromium.access$100(WebViewChromium.java:100)
	at com.android.webview.chromium.WebViewChromium$1.run(WebViewChromium.java:267)
	at com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue.drainQueue(WebViewChromium.java:127)
	at com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue$1.run(WebViewChromium.java:114)
	at com.android.org.chromium.base.ThreadUtils.runOnUiThread(ThreadUtils.java:144)
	at com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue.addTask(WebViewChromium.java:111)
	at com.android.webview.chromium.WebViewChromium.init(WebViewChromium.java:264)
	at android.webkit.WebView.<init>(WebView.java:548)
	at android.webkit.WebView.<init>(WebView.java:483)
	at android.webkit.WebView.<init>(WebView.java:466)
	at android.webkit.WebView.<init>(WebView.java:453)
	at android.webkit.WebView.<init>(WebView.java:443)
	at protect.card_locker.MainActivity.displayAboutDialog(MainActivity.java:343)
	at protect.card_locker.MainActivity.onOptionsItemSelected(MainActivity.java:291)

The root cause of the bug is this change: https://android.googlesource.com/platform/frameworks/support/+/26079d87c79a64829f036236353fac1dae4e0613%5E%21/#F2

sAlwaysOverrideConfiguration forces updating the Resources configuration and thereby messes up the webview inflation on older devices.

A fix in appcompat will be available in 1.2.0-alpha02. As of this writing, that version has not yet been released.

@brarcher brarcher added the bug label Jan 6, 2020
@TheLastProject
Copy link
Contributor

@brarcher
Copy link
Owner Author

True. But I'm a little hesitant to rely on an alpha version. The problem is pretty limited (does not affect a critical user journey in the app, and is only on Android 5). To avoid potential breakage to other parts of the app (as it is an alpha version), it may be better to wait for a release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants