Achievements activity is crashing on Android 8.1
See original GitHub issueSummary:
The app crashes on clicking on the trophy icon that opens achievements.
Steps to reproduce:
Click on the trophy icon. App crashes.
Expected: Achievements activity should open.
Add System logs:
2018-10-12 12:02:28.557 9191-9191/fr.free.nrw.commons.beta E/AndroidRuntime: FATAL EXCEPTION: main
Process: fr.free.nrw.commons.beta, PID: 9191
java.lang.RuntimeException: Unable to start activity ComponentInfo{fr.free.nrw.commons.beta/fr.free.nrw.commons.achievements.AchievementsActivity}: android.content.res.Resources$NotFoundException: Drawable fr.free.nrw.commons.beta:drawable/badge with resource ID #0x7f08005b
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2815)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2893)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1614)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:171)
at android.app.ActivityThread.main(ActivityThread.java:6649)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:824)
Caused by: android.content.res.Resources$NotFoundException: Drawable fr.free.nrw.commons.beta:drawable/badge with resource ID #0x7f08005b
Caused by: android.content.res.Resources$NotFoundException: File res/drawable/badge.xml from drawable resource ID #0x7f08005b
at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:837)
at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:638)
at android.content.res.MiuiResourcesImpl.loadDrawable(MiuiResourcesImpl.java:312)
at android.content.res.Resources.getDrawableForDensity(Resources.java:891)
at android.content.res.Resources.getDrawable(Resources.java:833)
at android.content.Context.getDrawable(Context.java:614)
at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:358)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:198)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:186)
at android.support.v7.content.res.AppCompatResources.getDrawable(AppCompatResources.java:100)
at android.support.v7.widget.AppCompatImageHelper.setImageResource(AppCompatImageHelper.java:85)
at android.support.v7.widget.AppCompatImageView.setImageResource(AppCompatImageView.java:93)
at fr.free.nrw.commons.achievements.AchievementsActivity.onCreate(AchievementsActivity.java:123)
at android.app.Activity.performCreate(Activity.java:7088)
at android.app.Activity.performCreate(Activity.java:7079)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1215)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2768)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2893)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1614)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:171)
at android.app.ActivityThread.main(ActivityThread.java:6649)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:824)
Caused by: java.lang.IllegalArgumentException: Path string cannot be empty.
at android.util.PathParser.nCreatePathDataFromString(Native Method)
at android.util.PathParser.-wrap1(Unknown Source:0)
at android.util.PathParser$PathData.<init>(PathParser.java:76)
at android.graphics.drawable.VectorDrawable$VFullPath.updateStateFromTypedArray(VectorDrawable.java:1931)
at android.graphics.drawable.VectorDrawable$VFullPath.inflate(VectorDrawable.java:1882)
at android.graphics.drawable.VectorDrawable.inflateChildElements(VectorDrawable.java:741)
at android.graphics.drawable.VectorDrawable.inflate(VectorDrawable.java:639)
at android.graphics.drawable.DrawableInflater.inflateFromXmlForDensity(DrawableInflater.java:142)
2018-10-12 12:02:28.557 9191-9191/fr.free.nrw.commons.beta E/AndroidRuntime: at android.graphics.drawable.Drawable.createFromXmlInnerForDensity(Drawable.java:1295)
at android.graphics.drawable.Drawable.createFromXmlForDensity(Drawable.java:1254)
at android.content.res.ResourcesImpl.createFromXmlForDensity(ResourcesImpl.java:1471)
at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:822)
... 25 more
Device and Android version:
Redmi Note 5. Android 8.1
Commons app version:
master and betaDebug/prodDebug
Would you like to work on the issue?
Preferably not.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Detect and diagnose crashes - Android Developers
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java...
Read more >Why do my apps keep crashing on Android, How to fix it
To do this, go to Settings -> Apps and select the app that keeps crashing. Tap on the app's name and then tap...
Read more >Why Do My Apps Keep Crashing on Android? - Avast
1. The “Force stop” method · 2. Restart your Android device · 3. Keep your phone updated · 4. Clear your cached data...
Read more >12 Reasons Why Your Games Keep Crashing (And How to Fix ...
Sometimes it's a fault with the game itself, while other times it's due to inadequate hardware or a slow internet connection. Working out...
Read more >Fix an installed Android app that isn't working - Google Support
Try the following steps if an app installed on your phone has any of these problems: Crashing. Won't open. Won't respond. Isn't working...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I would like to work on this issue
@albendz That PR was crashing at some points so I closed it Older one is still open. That is working fine