material-components / material-components/material-components-android
[Material Button] - PlayStore crash with Security Exception
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
**Description:** Looking at my application crashes on Google Play Store, I'm seeing a lot of this crash, but without any more information.
My application theme is using: `parent="Theme.MaterialComponents.Light.NoActionBar"`
**Android API version:** Most of crashes are on Android T
**Material Library version:** 1.9.0
Crash stack trace:
```
Exception java.lang.SecurityException:
at android.os.Parcel.createExceptionOrNull (Parcel.java:3028)
at android.os.Parcel.createException (Parcel.java:3012)
at android.os.Parcel.readException (Parcel.java:2995)
at android.database.DatabaseUtils.readExceptionFromParcel (DatabaseUtils.java:190)
at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel (DatabaseUtils.java:153)
at android.content.ContentProviderProxy.openTypedAssetFile (ContentProviderNative.java:780)
at android.content.ContentResolver.openTypedAssetFileDescriptor (ContentResolver.java:2027)
at android.content.ContentResolver.openTypedAssetFileDescriptor (ContentResolver.java:1965)
at android.graphics.ImageDecoder$ContentResolverSource.createImageDecoder (ImageDecoder.java:280)
at android.graphics.ImageDecoder.decodeBitmapImpl (ImageDecoder.java:1935)
at android.graphics.ImageDecoder.decodeBitmap (ImageDecoder.java:2058)
at android.view.View.performClick (View.java:7535)
at com.google.android.material.button.MaterialButtonHelper.isToggleCheckedStateOnClick (MaterialButtonHelper.java)
at com.google.android.material.button.MaterialButton.performClick (MaterialButton.java)
at android.view.View.performClickInternal (View.java:7512)
at android.view.View.-$$Nest$mperformClickInternal
at android.view.View$PerformClick.run (View.java:29496)
at android.os.Handler.handleCallback (Handler.java:984)
at android.os.Handler.dispatchMessage (Handler.java:104)
at android.os.Looper.loopOnce (Looper.java:238)
at android.os.Looper.loop (Looper.java:357)
at android.app.ActivityThread.main (ActivityThread.java:8149)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:957)
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at MaterialButton.performClick and MaterialButtonHelper.isToggleCheckedStateOnClick, then trace the Android T ImageDecoder and ContentResolver calls shown in the stack trace. Reproduce the crash with Material Components 1.9.0 on Android T, identify its cause, and verify that button clicks no longer raise SecurityException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100