Closed Bug 1391338 Opened 7 years ago Closed 3 years ago

StrictMode policy violation while opening Sync Settings

Categories

(Firefox for Android Graveyard :: General, defect, P5)

defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: Grisha, Unassigned)

References

Details

08-17 18:12:08.555 14781 14781 D StrictMode: StrictMode policy violation; ~duration=15 ms: android.os.StrictMode$StrictModeDiskReadViolation: policy=65567 violation=2
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1415)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at java.io.UnixFileSystem.checkAccess(UnixFileSystem.java:251)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at java.io.File.exists(File.java:807)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ContextImpl.getDataDir(ContextImpl.java:2165)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ContextImpl.getPreferencesDir(ContextImpl.java:498)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ContextImpl.getSharedPreferencesPath(ContextImpl.java:692)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ContextImpl.getSharedPreferences(ContextImpl.java:360)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.content.ContextWrapper.getSharedPreferences(ContextWrapper.java:167)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.preference.PreferenceManager.getSharedPreferences(PreferenceManager.java:510)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.preference.Preference.getSharedPreferences(Preference.java:1203)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.preference.Preference.dispatchSetInitialValue(Preference.java:1554)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.preference.Preference.onAttachedToHierarchy(Preference.java:1327)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.preference.PreferenceInflater.onMergeRoots(PreferenceInflater.java:110)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.preference.PreferenceInflater.onMergeRoots(PreferenceInflater.java:104)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.preference.GenericInflater.inflate(GenericInflater.java:321)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.preference.GenericInflater.inflate(GenericInflater.java:264)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:324)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at java.lang.reflect.Method.invoke(Native Method)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at org.mozilla.gecko.background.preferences.PreferenceManagerCompat.inflateFromResource(PreferenceManagerCompat.java:145)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at org.mozilla.gecko.background.preferences.PreferenceFragment.addPreferencesFromResource(PreferenceFragment.java:230)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at org.mozilla.gecko.fxa.activities.FxAccountStatusFragment.addPreferences(FxAccountStatusFragment.java:166)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at org.mozilla.gecko.fxa.activities.FxAccountStatusFragment.onCreate(FxAccountStatusFragment.java:162)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.support.v4.app.Fragment.performCreate(Unknown Source:15)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source:327)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.support.v4.app.BackStackRecord.setLastIn(Unknown Source:46)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.support.v4.app.BackStackRecord.calculateFragments(Unknown Source:88)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.support.v4.app.BackStackRecord.run(Unknown Source:73)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.support.v4.app.FragmentManagerImpl.execPendingActions(Unknown Source:146)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.support.v4.app.FragmentController.execPendingActions(Unknown Source:4)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.support.v4.app.FragmentActivity.onStart(Unknown Source:32)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1333)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.Activity.performStart(Activity.java:6997)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2780)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ActivityThread.-wrap11(Unknown Source:0)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.os.Handler.dispatchMessage(Handler.java:105)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.os.Looper.loop(Looper.java:164)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ActivityThread.main(ActivityThread.java:6540)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at java.lang.reflect.Method.invoke(Native Method)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
08-17 18:12:08.555 14781 14781 D StrictMode: StrictMode policy violation; ~duration=15 ms: android.os.StrictMode$StrictModeDiskReadViolation: policy=65567 violation=2
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1415)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at java.io.UnixFileSystem.checkAccess(UnixFileSystem.java:251)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at java.io.File.exists(File.java:807)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ContextImpl.ensurePrivateDirExists(ContextImpl.java:553)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ContextImpl.ensurePrivateDirExists(ContextImpl.java:544)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ContextImpl.getPreferencesDir(ContextImpl.java:500)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ContextImpl.getSharedPreferencesPath(ContextImpl.java:692)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ContextImpl.getSharedPreferences(ContextImpl.java:360)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.content.ContextWrapper.getSharedPreferences(ContextWrapper.java:167)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.preference.PreferenceManager.getSharedPreferences(PreferenceManager.java:510)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.preference.Preference.getSharedPreferences(Preference.java:1203)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.preference.Preference.dispatchSetInitialValue(Preference.java:1554)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.preference.Preference.onAttachedToHierarchy(Preference.java:1327)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.preference.PreferenceInflater.onMergeRoots(PreferenceInflater.java:110)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.preference.PreferenceInflater.onMergeRoots(PreferenceInflater.java:104)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.preference.GenericInflater.inflate(GenericInflater.java:321)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.preference.GenericInflater.inflate(GenericInflater.java:264)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:324)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at java.lang.reflect.Method.invoke(Native Method)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at org.mozilla.gecko.background.preferences.PreferenceManagerCompat.inflateFromResource(PreferenceManagerCompat.java:145)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at org.mozilla.gecko.background.preferences.PreferenceFragment.addPreferencesFromResource(PreferenceFragment.java:230)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at org.mozilla.gecko.fxa.activities.FxAccountStatusFragment.addPreferences(FxAccountStatusFragment.java:166)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at org.mozilla.gecko.fxa.activities.FxAccountStatusFragment.onCreate(FxAccountStatusFragment.java:162)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.support.v4.app.Fragment.performCreate(Unknown Source:15)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source:327)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.support.v4.app.BackStackRecord.setLastIn(Unknown Source:46)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.support.v4.app.BackStackRecord.calculateFragments(Unknown Source:88)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.support.v4.app.BackStackRecord.run(Unknown Source:73)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.support.v4.app.FragmentManagerImpl.execPendingActions(Unknown Source:146)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.support.v4.app.FragmentController.execPendingActions(Unknown Source:4)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.support.v4.app.FragmentActivity.onStart(Unknown Source:32)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1333)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.Activity.performStart(Activity.java:6997)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2780)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ActivityThread.-wrap11(Unknown Source:0)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.os.Handler.dispatchMessage(Handler.java:105)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.os.Looper.loop(Looper.java:164)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ActivityThread.main(ActivityThread.java:6540)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at java.lang.reflect.Method.invoke(Native Method)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
08-17 18:12:08.555 14781 14781 D StrictMode: StrictMode policy violation; ~duration=9 ms: android.os.StrictMode$StrictModeDiskReadViolation: policy=65567 violation=2
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1415)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at java.io.UnixFileSystem.checkAccess(UnixFileSystem.java:251)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at java.io.File.exists(File.java:807)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ContextImpl.ensurePrivateDirExists(ContextImpl.java:553)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ContextImpl.ensurePrivateDirExists(ContextImpl.java:544)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ContextImpl.getPreferencesDir(ContextImpl.java:500)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ContextImpl.getSharedPreferencesPath(ContextImpl.java:692)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ContextImpl.getSharedPreferences(ContextImpl.java:360)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.content.ContextWrapper.getSharedPreferences(ContextWrapper.java:167)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at org.mozilla.gecko.fxa.authenticator.AndroidFxAccount.getSyncPrefs(AndroidFxAccount.java:382)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at org.mozilla.gecko.fxa.activities.FxAccountStatusFragment.refresh(FxAccountStatusFragment.java:444)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at org.mozilla.gecko.fxa.activities.FxAccountStatusActivity.onResume(FxAccountStatusActivity.java:95)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1354)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.Activity.performResume(Activity.java:7084)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3619)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3684)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2898)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ActivityThread.-wrap11(Unknown Source:0)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.os.Handler.dispatchMessage(Handler.java:105)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.os.Looper.loop(Looper.java:164)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at android.app.ActivityThread.main(ActivityThread.java:6540)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at java.lang.reflect.Method.invoke(Native Method)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
08-17 18:12:08.555 14781 14781 D StrictMode: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Note that SharedPreferences _technically_ hits disk, and so can cause this. It's rarely worth the effort to fix: you either block UI inflation to wait for a background read (bad), or you just make sure SharedPreferences is inited somewhere else first (acceptable).
Indeed, and the latter is what I propose to do in Bug 1407316.
Depends on: 1407316
Re-triaging per https://bugzilla.mozilla.org/show_bug.cgi?id=1473195

Needinfo :susheel if you think this bug should be re-triaged.
Priority: P3 → P5
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.