New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 702983 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Chrome Home creates a StrictMode Violation in the middle of tests.

Project Member Reported by jwanda@chromium.org, Mar 19 2017

Issue description

StrictMode Violation on a test that I'm running. Basically it seems that it goes into preferences when I'm starting the tests and crashes. It doesn't seem to happen all the time, but it happens enough that it consistently fails 1/3 tests.

03-19 13:26:49.574 21398-21398/? D/StrictMode: StrictMode policy violation; ~duration=182 ms: android.os.StrictMode$StrictModeDiskReadViolation: policy=18153503 violation=2
                                                   at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1293)
                                                   at android.app.SharedPreferencesImpl.awaitLoadedLocked(SharedPreferencesImpl.java:213)
                                                   at android.app.SharedPreferencesImpl.getBoolean(SharedPreferencesImpl.java:272)
                                                   at org.chromium.chrome.browser.preferences.ChromePreferenceManager.isChromeHomeEnabled(ChromePreferenceManager.java:405)
                                                   at org.chromium.chrome.browser.util.FeatureUtilities.isChromeHomeEnabled(FeatureUtilities.java:262)
                                                   at org.chromium.chrome.browser.ChromeTabbedActivity.createFullscreenManager(ChromeTabbedActivity.java:1924)
                                                   at org.chromium.chrome.browser.ChromeActivity.preInflationStartup(ChromeActivity.java:302)
                                                   at org.chromium.chrome.browser.ChromeTabbedActivity.preInflationStartup(ChromeTabbedActivity.java:1117)
                                                   at org.chromium.chrome.browser.init.ChromeBrowserInitializer.handlePreNativeStartup(ChromeBrowserInitializer.java:139)
                                                   at org.chromium.chrome.browser.init.AsyncInitializationActivity.onCreateInternal(AsyncInitializationActivity.java:252)
                                                   at org.chromium.chrome.browser.init.AsyncInitializationActivity.onCreate(AsyncInitializationActivity.java:219)
                                                   at android.app.Activity.performCreate(Activity.java:6682)
                                                   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
                                                   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2619)
                                                   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2727)
                                                   at android.app.ActivityThread.-wrap12(ActivityThread.java)
                                                   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1478)
                                                   at android.os.Handler.dispatchMessage(Handler.java:102)
                                                   at android.os.Looper.loop(Looper.java:154)
                                                   at android.app.ActivityThread.main(ActivityThread.java:6121)
                                                   at java.lang.reflect.Method.invoke(Native Method)
                                                   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
                                                   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
03-19 13:26:49.578 21398-21398/? E/AndroidRuntime: FATAL EXCEPTION: main
                                                   Process: org.chromium.chrome, PID: 21398
                                                   android.os.StrictMode$StrictModeViolation: policy=18153503 violation=2
                                                       at android.os.StrictMode.executeDeathPenalty(StrictMode.java:1536)
                                                       at android.os.StrictMode.-wrap3(StrictMode.java)
                                                       at android.os.StrictMode$AndroidBlockGuardPolicy.handleViolation(StrictMode.java:1529)
                                                       at android.os.StrictMode$AndroidBlockGuardPolicy$1.run(StrictMode.java:1410)
                                                       at android.os.Handler.handleCallback(Handler.java:751)
                                                       at android.os.Handler.dispatchMessage(Handler.java:95)
                                                       at android.os.Looper.loop(Looper.java:154)
                                                       at android.app.ActivityThread.main(ActivityThread.java:6121)
                                                       at java.lang.reflect.Method.invoke(Native Method)
                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9837cd2419f7d43f2bb34b83d1434353efd01c39

commit 9837cd2419f7d43f2bb34b83d1434353efd01c39
Author: Matthew Jones <mdjones@chromium.org>
Date: Tue Jun 06 18:29:03 2017

[Home] Silence strict mode violation when reading pref

This change temporarily allows reads from the disk when checking if
Chrome Home is enabled. This will prevent tests from flaking while
the feature is in development. Eventually this code will be removed.

BUG=729983,  702983 

Change-Id: I9b76e7ca33a7fd4624153c0f591846ab07fca6ba
Reviewed-on: https://chromium-review.googlesource.com/526113
Reviewed-by: Dan Alcantara <dfalcantara@chromium.org>
Commit-Queue: Matthew Jones <mdjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#477345}
[modify] https://crrev.com/9837cd2419f7d43f2bb34b83d1434353efd01c39/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java

Status: Fixed (was: Untriaged)

Sign in to add a comment