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

Issue 781005 link

Starred by 2 users

Issue metadata

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



Sign in to add a comment

Chrome_Android: Crash Report - android.os.StrictMode

Project Member Reported by parastoog@chromium.org, Nov 2 2017

Issue description

Open chromium -> Settings -> Autofill and Payments -> Addresses -> crash!

Product Version: 64.0.3254.0

This is the stack:

11-02 16:58:29.014 19764 19764 D StrictMode: StrictMode policy violation; ~duration=9 ms: android.os.StrictMode$StrictModeDiskReadViolation: policy=18153535 violation=2
11-02 16:58:29.014 19764 19764 D StrictMode: 	at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1440)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at java.io.UnixFileSystem.checkAccess(UnixFileSystem.java:251)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at java.io.File.exists(File.java:807)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at android.app.ContextImpl.getDataDir(ContextImpl.java:2194)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at android.app.ContextImpl.getPreferencesDir(ContextImpl.java:514)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at android.app.ContextImpl.getSharedPreferencesPath(ContextImpl.java:711)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at android.app.ContextImpl.getSharedPreferences(ContextImpl.java:365)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at android.content.ContextWrapper.getSharedPreferences(ContextWrapper.java:166)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at android.preference.PreferenceManager.getSharedPreferences(PreferenceManager.java:510)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at android.preference.Preference.getSharedPreferences(Preference.java:1204)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at android.preference.Preference.dispatchSetInitialValue(Preference.java:1555)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at android.preference.Preference.onAttachedToHierarchy(Preference.java:1328)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at android.preference.PreferenceGroup.addPreference(PreferenceGroup.java:163)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at org.chromium.chrome.browser.preferences.autofill.AutofillProfilesFragment.rebuildProfileList(AutofillProfilesFragment.java:83)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at org.chromium.chrome.browser.preferences.autofill.AutofillProfilesFragment.onResume(AutofillProfilesFragment.java:43)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at android.app.Fragment.performResume(Fragment.java:2554)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1322)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at android.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1552)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1613)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at android.app.FragmentManagerImpl.dispatchMoveToState(FragmentManager.java:3022)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at android.app.FragmentManagerImpl.dispatchResume(FragmentManager.java:2984)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at android.app.FragmentController.dispatchResume(FragmentController.java:200)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at android.app.Activity.performResume(Activity.java:7129)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3556)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3621)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2862)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at android.app.ActivityThread.-wrap11(Unknown Source:0)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at android.os.Handler.dispatchMessage(Handler.java:106)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at android.os.Looper.loop(Looper.java:164)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at android.app.ActivityThread.main(ActivityThread.java:6494)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at java.lang.reflect.Method.invoke(Native Method)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
11-02 16:58:29.014 19764 19764 D StrictMode: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
11-02 16:58:29.014 19764 19764 D AndroidRuntime: Shutting down VM
11-02 16:58:29.015 19764 19764 E AndroidRuntime: FATAL EXCEPTION: main
11-02 16:58:29.015 19764 19764 E AndroidRuntime: Process: org.chromium.chrome, PID: 19764
11-02 16:58:29.015 19764 19764 E AndroidRuntime: android.os.StrictMode$StrictModeViolation: policy=18153535 violation=2
11-02 16:58:29.015 19764 19764 E AndroidRuntime: 	at android.os.StrictMode.executeDeathPenalty(StrictMode.java:1686)
11-02 16:58:29.015 19764 19764 E AndroidRuntime: 	at android.os.StrictMode.-wrap3(Unknown Source:0)
11-02 16:58:29.015 19764 19764 E AndroidRuntime: 	at android.os.StrictMode$AndroidBlockGuardPolicy.handleViolation(StrictMode.java:1679)
11-02 16:58:29.015 19764 19764 E AndroidRuntime: 	at android.os.StrictMode$AndroidBlockGuardPolicy$1.run(StrictMode.java:1557)
11-02 16:58:29.015 19764 19764 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:790)
11-02 16:58:29.015 19764 19764 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:99)
11-02 16:58:29.015 19764 19764 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:164)
11-02 16:58:29.015 19764 19764 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6494)
11-02 16:58:29.015 19764 19764 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
11-02 16:58:29.015 19764 19764 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
11-02 16:58:29.015 19764 19764 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
11-02 16:58:29.023  3379  6511 W ActivityManager:   Force finishing activity org.chromium.chrome/.browser.preferences.Preferences
11-02 16:58:29.028  3379  6511 W ActivityManager:   Force finishing activity org.chromium.chrome/.browser.preferences.Preferences
11-02 16:58:29.040  3379  3537 I ActivityManager: Showing crash dialog for package org.chromium.chrome u0

 
Cc: gogerald@chromium.org
It's already using that function. The problem is             getPreferenceScreen().addPreference(pref);

Cc: rouslan@chromium.org

Comment 5 Deleted

Status: ExternalDependency (was: Untriaged)
Yep, preference readers in Android framework should have suppressed strict mode checkers. Good call!
Project Member

Comment 7 by bugdroid1@chromium.org, Nov 6 2017

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

commit 40e9f590de4af2ba818d0906b48e4f961daf1aac
Author: Parastoo Geranmayeh <parastoog@google.com>
Date: Mon Nov 06 18:42:35 2017

Suppress Strict Mode Violation for Autofil

In AutofillProfilesFragment calling PreferenceGroup.addPreference
causes strict mode violation. We'll suppress that for now.


Bug:  781005 
Change-Id: I59d41a2c10ea9f668a029da5f4b6e62c3014bf4b
Reviewed-on: https://chromium-review.googlesource.com/753848
Commit-Queue: Parastoo Geranmayeh <parastoog@google.com>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Cr-Commit-Position: refs/heads/master@{#514193}
[modify] https://crrev.com/40e9f590de4af2ba818d0906b48e4f961daf1aac/chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillProfilesFragment.java

Status: Fixed (was: ExternalDependency)
Issue 784559 has been merged into this issue.
Status: Started (was: Fixed)
Project Member

Comment 11 by bugdroid1@chromium.org, Nov 27 2017

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

commit 8f6f81d2cadd8276b14eb2fbb5be8ac9a617f855
Author: Parastoo Geranmayeh <parastoog@google.com>
Date: Mon Nov 27 20:14:41 2017

Suppress Strict Mode Violation for Autofil

In AutofillProfilesFragment calling PreferenceGroup.addPreference
causes strict mode violation. We'll suppress that for now.

Bug:  781005 
Change-Id: I93093bb69214629afceac0962b9d3562fe305c64
Reviewed-on: https://chromium-review.googlesource.com/788279
Reviewed-by: David Trainor <dtrainor@chromium.org>
Commit-Queue: Parastoo Geranmayeh <parastoog@google.com>
Cr-Commit-Position: refs/heads/master@{#519380}
[modify] https://crrev.com/8f6f81d2cadd8276b14eb2fbb5be8ac9a617f855/chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillProfilesFragment.java

Status: Fixed (was: Started)

Sign in to add a comment