Cronet crashing on API 16 devices |
||
Issue descriptionIt is really important we get this fixed before tomorrow's Dev channel release: java.lang.RuntimeException: java.lang.NullPointerException: expected receiver of type android.app.ActivityThread, but got null at org.chromium.base.ContextUtils.getProcessName(ContextUtils.java:191) at org.chromium.base.ContextUtils.initJavaSideApplicationContext(ContextUtils.java:139) at org.chromium.base.ContextUtils.initApplicationContext(ContextUtils.java:69) Internal bug b/76403552
,
Mar 26 2018
The crux of this issue is that getProcessName() doesn't work if called from the non-UI thread on Android < JB MR2. The "fix", which is causing the issues here, is that I added a call to getProcessName() from initApplicationContext() in order to cache the value of getProcessName() on application start. I assumed that initApplicationContext would always be called on the UI thread, but looks like that's not the case for cronet. Rather than revert, I'll just remove the call from initApplicationContext -> getProcessName()
,
Mar 26 2018
In progress here: https://chromium-review.googlesource.com/c/chromium/src/+/980586
,
Mar 26 2018
How's the fix going? Do you think this will make it into tomorrow's dev channel release?
,
Mar 26 2018
it's in cq
,
Mar 26 2018
Awesome, thank you! Hopefully it makes tomorrow's Dev channel... I'm never sure when the cutoff time is.
,
Mar 26 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/13f7d65e1ca2c68893ce7465763497a4d1d2ea5c commit 13f7d65e1ca2c68893ce7465763497a4d1d2ea5c Author: Andrew Grieve <agrieve@chromium.org> Date: Mon Mar 26 23:51:01 2018 Android: Do not call getProcessName() from initApplicationContext() In cronet, initApplicationContext() is not guaranteed to be called from the UI thread. NOTRY=true # time sensitive. bot timeout unrelated. Bug: 825920 Change-Id: I85a8a9560fee726268637ac96d87d7637407f50a Reviewed-on: https://chromium-review.googlesource.com/980586 Commit-Queue: agrieve <agrieve@chromium.org> Reviewed-by: Yaron Friedman <yfriedman@chromium.org> Cr-Commit-Position: refs/heads/master@{#545889} [modify] https://crrev.com/13f7d65e1ca2c68893ce7465763497a4d1d2ea5c/base/android/java/src/org/chromium/base/ContextUtils.java
,
Mar 27 2018
Fix is in 67.0.3381.0
,
Mar 27 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by pauljensen@chromium.org
, Mar 26 2018