Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when trying to switch to my currently playing playlist #3320

Closed
VGkav opened this issue Mar 31, 2020 · 3 comments · Fixed by #3322
Closed

Crash when trying to switch to my currently playing playlist #3320

VGkav opened this issue Mar 31, 2020 · 3 comments · Fixed by #3322
Labels
ASAP Issue needs to be fixed as soon as possible bug Issue is related to a bug

Comments

@VGkav
Copy link

VGkav commented Mar 31, 2020

This is a super-frequent crash that happens when I am playing a video on popup (that I have started from the What's New tab) and I tap on the Notification in order to get to the playlist I am currently watching. I don't mean a normal playlist, I mean the videos I have been enqeuing and watching.

{
   "user_action": "ui error",
   "exceptions": [
      "android.content.res.Resources$NotFoundException: File res\/drawable\/ic_volume_up_white_24dp.xml from drawable resource ID #0x7f08015c. If the resource you are trying to use is a vector resource, you may be referencing it in an unsupported way. See AppCompatDelegate.setCompatVectorFromResourcesEnabled() for more info.\n\tat android.content.res.Resources.loadDrawable(Resources.java:2103)\n\tat android.content.res.Resources.getDrawable(Resources.java:700)\n\tat org.schabi.newpipe.player.ServicePlayerActivity.getThemedDrawable(ServicePlayerActivity.java:706)\n\tat org.schabi.newpipe.player.ServicePlayerActivity.onMaybeMuteChanged(ServicePlayerActivity.java:701)\n\tat org.schabi.newpipe.player.ServicePlayerActivity.onCreateOptionsMenu(ServicePlayerActivity.java:156)\n\tat android.app.Activity.onCreatePanelMenu(Activity.java:2538)\n\tat androidx.fragment.app.FragmentActivity.onCreatePanelMenu(FragmentActivity.java:325)\n\tat androidx.appcompat.view.WindowCallbackWrapper.onCreatePanelMenu(WindowCallbackWrapper.java:94)\n\tat androidx.appcompat.app.AppCompatDelegateImpl$AppCompatWindowCallback.onCreatePanelMenu(AppCompatDelegateImpl.java:2830)\n\tat androidx.appcompat.view.WindowCallbackWrapper.onCreatePanelMenu(WindowCallbackWrapper.java:94)\n\tat androidx.appcompat.app.ToolbarActionBar.populateOptionsMenu(ToolbarActionBar.java:455)\n\tat androidx.appcompat.app.ToolbarActionBar$1.run(ToolbarActionBar.java:56)\n\tat android.os.Handler.handleCallback(Handler.java:733)\n\tat android.os.Handler.dispatchMessage(Handler.java:95)\n\tat android.os.Looper.loop(Looper.java:136)\n\tat android.app.ActivityThread.main(ActivityThread.java:5133)\n\tat java.lang.reflect.Method.invokeNative(Native Method)\n\tat java.lang.reflect.Method.invoke(Method.java:515)\n\tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)\n\tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)\n\tat dalvik.system.NativeStart.main(Native Method)\nCaused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #1: invalid drawable tag vector\n\tat android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:933)\n\tat android.graphics.drawable.Drawable.createFromXml(Drawable.java:877)\n\tat android.content.res.Resources.loadDrawable(Resources.java:2099)\n\t... 20 more\norg.xmlpull.v1.XmlPullParserException: Binary XML file line #1: invalid drawable tag vector\n\tat android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:933)\n\tat android.graphics.drawable.Drawable.createFromXml(Drawable.java:877)\n\tat android.content.res.Resources.loadDrawable(Resources.java:2099)\n\tat android.content.res.Resources.getDrawable(Resources.java:700)\n\tat org.schabi.newpipe.player.ServicePlayerActivity.getThemedDrawable(ServicePlayerActivity.java:706)\n\tat org.schabi.newpipe.player.ServicePlayerActivity.onMaybeMuteChanged(ServicePlayerActivity.java:701)\n\tat org.schabi.newpipe.player.ServicePlayerActivity.onCreateOptionsMenu(ServicePlayerActivity.java:156)\n\tat android.app.Activity.onCreatePanelMenu(Activity.java:2538)\n\tat androidx.fragment.app.FragmentActivity.onCreatePanelMenu(FragmentActivity.java:325)\n\tat androidx.appcompat.view.WindowCallbackWrapper.onCreatePanelMenu(WindowCallbackWrapper.java:94)\n\tat androidx.appcompat.app.AppCompatDelegateImpl$AppCompatWindowCallback.onCreatePanelMenu(AppCompatDelegateImpl.java:2830)\n\tat androidx.appcompat.view.WindowCallbackWrapper.onCreatePanelMenu(WindowCallbackWrapper.java:94)\n\tat androidx.appcompat.app.ToolbarActionBar.populateOptionsMenu(ToolbarActionBar.java:455)\n\tat androidx.appcompat.app.ToolbarActionBar$1.run(ToolbarActionBar.java:56)\n\tat android.os.Handler.handleCallback(Handler.java:733)\n\tat android.os.Handler.dispatchMessage(Handler.java:95)\n\tat android.os.Looper.loop(Looper.java:136)\n\tat android.app.ActivityThread.main(ActivityThread.java:5133)\n\tat java.lang.reflect.Method.invokeNative(Native Method)\n\tat java.lang.reflect.Method.invoke(Method.java:515)\n\tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)\n\tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)\n\tat dalvik.system.NativeStart.main(Native Method)\n"
   ],
   "os": "Linux Android 4.4.4 - 19",
   "time": "2020-03-31 22:33",
   "request": "App crash, UI failure",
   "package": "org.schabi.newpipe",
   "service": "none",
   "content_language": "GB",
   "user_comment": "",
   "version": "0.19.1"
}

What causes this error? And why are there backslashes and forward slashes there in that filename?

@VGkav VGkav added the bug Issue is related to a bug label Mar 31, 2020
@mauriciocolli
Copy link
Contributor

@TobiGr @B0pol @Stypox 🤦‍♂️

//2) Icon change accordingly to current App Theme
item.setIcon(player.isMuted() ? getThemedDrawable(R.attr.volume_off) : getThemedDrawable(R.attr.volume_on));
}
}
private Drawable getThemedDrawable(int attribute) {
return getResources().getDrawable(
getTheme().obtainStyledAttributes(R.style.Theme_AppCompat, new int[]{attribute})
.getResourceId(0, 0));
}


@Anotherlife

This is a super-frequent crash [...]

Yes, in fact, super-frequent is an understatement, it's impossible to open that screen in your version.

And why are there backslashes and forward slashes there in that filename?

The library that is used to build the JSON string opted to escape the forward slash, although it's just optional. I think the standard one from Android is being used right now.

PS: Always try to follow the issue template, it's easier for us to see exactly what the issue is (for example, you didn't used the "incredible bugreport to markdown converter" mentioned there).

@mauriciocolli mauriciocolli added the ASAP Issue needs to be fixed as soon as possible label Apr 1, 2020
@Stypox
Copy link
Member

Stypox commented Apr 1, 2020

@mauriciocolli I have already fixed this in #3271, if needed I can open another pr (will do in 1 hour if nobody answers)

@Stypox
Copy link
Member

Stypox commented Apr 1, 2020

By the way, if I remember correctly that getThemedDrawable was remved because it was a duplicate of ThemeHelper.resolveResourceIdFromAttr, but apparently it reappeared 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ASAP Issue needs to be fixed as soon as possible bug Issue is related to a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants