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 #54

Closed
TheLastProject opened this issue Oct 24, 2020 · 3 comments
Closed

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

TheLastProject opened this issue Oct 24, 2020 · 3 comments
Labels
type: bug Something isn't working

Comments

@TheLastProject
Copy link
Member

Issue by brarcher
Monday Jan 06, 2020 at 07:24 GMT
Originally opened as brarcher/loyalty-card-locker#340


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.

@TheLastProject TheLastProject added the type: bug Something isn't working label Oct 24, 2020
@TheLastProject
Copy link
Member Author

Comment by TheLastProject
Wednesday Feb 05, 2020 at 15:03 GMT


1.2.0-alpha02 is out now: https://developer.android.com/jetpack/androidx/releases/appcompat

@TheLastProject
Copy link
Member Author

Comment by brarcher
Tuesday Feb 25, 2020 at 06:30 GMT


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.

@TheLastProject
Copy link
Member Author

Should be fixed in 799b82e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant