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

Issue 716238 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: ----



Sign in to add a comment

StrictMode policy violation for disk read on ShareHelper

Reported by ltian@chromium.org, Apr 27 2017

Issue description

StrictMode policy violated when sharing a page from Chrome. Chrome may or may not crash depending on system setting.

Steps to reproduce:
1. Open a webpage
2. Click overflow menu and then click share.

Errors:
StrictMode policy violation; ~duration=3 ms: android.os.StrictMode$StrictModeDiskReadViolation: policy=17891359 violation=2
at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1415)
at java.io.UnixFileSystem.canonicalize(UnixFileSystem.java:169)
at java.io.File.getCanonicalPath(File.java:606)
at android.support.v4.content.FileProvider$SimplePathStrategy.getUriForFile(FileProvider.java:695)
at android.support.v4.content.FileProvider.getUriForFile(FileProvider.java:400)
at org.chromium.chrome.browser.FileProviderHelper.getContentUriFromFile(FileProviderHelper.java:26)
at org.chromium.base.ContentUriUtils.getContentUriFromFile(ContentUriUtils.java:59)
at org.chromium.base.ApiCompatibilityUtils.getUriForImageCaptureFile(ApiCompatibilityUtils.java:634)
at org.chromium.chrome.browser.share.ShareHelper$3.onPostExecute(ShareHelper.java:426)
at org.chromium.chrome.browser.share.ShareHelper$3.onPostExecute(ShareHelper.java:397)
at android.os.AsyncTask.finish(AsyncTask.java:667)
at android.os.AsyncTask.-wrap1(Unknown Source:0)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:684)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6535)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

Looks like this recent changes introduced the problem: https://codereview.chromium.org/2772343003?

Kindly re-assign if this is not related to your changes.


 
Cc: wnwen@chromium.org
Owner: ltian@chromium.org
This shouldn't be related to wnwen@'s change.  This has likely always been the case.  I think we should just be able to move getUriForImageCaptureFile into doInBackground.

Assigning back to you to investigate.

Comment 2 by dskiba@chromium.org, May 26 2017

Issue 726385 has been merged into this issue.

Comment 3 by dskiba@chromium.org, May 26 2017

Guys, this causes StrictViolation crashes in the wild, see issue 726385.

Comment 4 by dskiba@chromium.org, May 26 2017

Cc: dskiba@chromium.org
Project Member

Comment 5 by sheriffbot@chromium.org, May 26 2017

Labels: Fracas FoundIn-M-60
Users experienced this crash on the following builds:

Android Dev 60.0.3107.3 -  0.58 CPM, 7 reports, 7 clients (signature [Android Java Exception] android.os.StrictMode$StrictModeDiskReadViolation at org.chromium.chrome.browser.FileProviderHelper.getContentUriFromFile(FileProviderHelper.java))

If this update was incorrect, please add "Fracas-Wrong" label to prevent future updates.

- Go/Fracas
Project Member

Comment 6 by sheriffbot@chromium.org, Jun 9 2017

Labels: FoundIn-M-61
Users experienced this crash on the following builds:

Android Dev 61.0.3124.3 -  1.54 CPM, 3 reports, 3 clients (signature [Android Java Exception] android.os.StrictMode$StrictModeDiskReadViolation at org.chromium.chrome.browser.FileProviderHelper.getContentUriFromFile(FileProviderHelper.java))

If this update was incorrect, please add "Fracas-Wrong" label to prevent future updates.

- Go/Fracas
Project Member

Comment 7 by sheriffbot@chromium.org, Sep 21 2017

Labels: FoundIn-M-63
Users experienced this crash on the following builds:

Android Dev 63.0.3214.0 -  0.74 CPM, 25 reports, 22 clients (signature [Android Java Exception] android.os.StrictMode$StrictModeDiskReadViolation at org.chromium.chrome.browser.FileProviderHelper.getContentUriFromFile(FileProviderHelper.java))

If this update was incorrect, please add "Fracas-Wrong" label to prevent future updates.

- Go/Fracas

Comment 8 by ltian@chromium.org, Jun 7 2018

Cc: ltian@chromium.org
Owner: ----
Status: Available (was: Assigned)

Sign in to add a comment