Open 0xTyagi opened 2 years ago
What's your device and your device's ROM? It seems you removed this part when filling the template.
I couldn't reproduce this issue on my device (Honor 9X, EMUI 10.0/Android 10).
I'm also experiencing this issue. I'm using a Lenovo P2a42 with Android 7.0.
OS: Android 24(7.0) stock Device: Lenovo k33
This crash log may also be related to this
java.lang.RuntimeException: Unable to destroy activity {org.schabi.newpipe/org.schabi.newpipe.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'void android.view.IWindowSession.performDeferredDestroy(android.view.IWindow)' on a null object reference
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4167)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4185)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4459)
at android.app.ActivityThread.-wrap19(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1466)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'void android.view.IWindowSession.performDeferredDestroy(android.view.IWindow)' on a null object reference
at android.view.SurfaceView.updateWindow(SurfaceView.java:658)
at android.view.SurfaceView.onWindowVisibilityChanged(SurfaceView.java:255)
at android.view.View.dispatchDetachedFromWindow(View.java:15437)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3222)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3222)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3222)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3222)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3222)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3222)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3222)
at android.view.ViewGroup.removeViewInternal(ViewGroup.java:4758)
at android.view.ViewGroup.removeViewInternal(ViewGroup.java:4732)
at android.view.ViewGroup.removeView(ViewGroup.java:4663)
at androidx.fragment.app.FragmentContainerView.removeView(FragmentContainerView.java:350)
at androidx.fragment.app.SpecialEffectsController$Operation$State.applyState(SpecialEffectsController.java:452)
at androidx.fragment.app.SpecialEffectsController$1.run(SpecialEffectsController.java:211)
at androidx.fragment.app.SpecialEffectsController$Operation.complete(SpecialEffectsController.java:695)
at androidx.fragment.app.SpecialEffectsController$FragmentStateManagerOperation.complete(SpecialEffectsController.java:744)
at androidx.fragment.app.SpecialEffectsController$Operation.cancel(SpecialEffectsController.java:597)
at androidx.fragment.app.SpecialEffectsController.forceCompleteAllOperations(SpecialEffectsController.java:332)
at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3132)
at androidx.fragment.app.FragmentManager.dispatchDestroy(FragmentManager.java:3107)
at androidx.fragment.app.FragmentController.dispatchDestroy(FragmentController.java:334)
at androidx.fragment.app.FragmentActivity.onDestroy(FragmentActivity.java:330)
at androidx.appcompat.app.AppCompatActivity.onDestroy(AppCompatActivity.java:278)
at org.schabi.newpipe.MainActivity.onDestroy(MainActivity.java:446)
at android.app.Activity.performDestroy(Activity.java:6907)
at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1154)
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4154)
... 10 more
This comment may be helpful as this issues also have same crash signature.
https://github.com/lipangit/JiaoZiVideoPlayer/issues/62#issuecomment-217357273
This issue is also present in the newest version 21.15.
I'm also expiriensing crashes on Lenovo P2. You don't even need to play any video, just scroll a little bit to crash with something like this:
android.content.res.Resources$NotFoundException: Plural resource ID #0x7f10000d quantity=47701 item=one
at android.content.res.ResourcesImpl.getQuantityText(ResourcesImpl.java:277)
at android.content.res.Resources.getQuantityText(Resources.java:358)
at android.content.res.Resources.getQuantityString(Resources.java:434)
at org.schabi.newpipe.util.Localization.getQuantity(Localization.java:252)
at org.schabi.newpipe.util.Localization.shortViewCount(Localization.java:220)
at org.schabi.newpipe.info_list.holder.StreamInfoItemHolder.getStreamInfoDetailLine(StreamInfoItemHolder.java:80)
at org.schabi.newpipe.info_list.holder.StreamInfoItemHolder.updateFromItem(StreamInfoItemHolder.java:66)
at org.schabi.newpipe.info_list.InfoListAdapter.onBindViewHolder(InfoListAdapter.java:337)
at org.schabi.newpipe.info_list.InfoListAdapter.onBindViewHolder(InfoListAdapter.java:360)
at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:7337)
at androidx.recyclerview.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:6194)
at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6460)
at androidx.recyclerview.widget.GapWorker.prefetchPositionWithDeadline(GapWorker.java:288)
at androidx.recyclerview.widget.GapWorker.flushTaskWithDeadline(GapWorker.java:345)
at androidx.recyclerview.widget.GapWorker.flushTasksWithDeadline(GapWorker.java:361)
at androidx.recyclerview.widget.GapWorker.prefetch(GapWorker.java:368)
at androidx.recyclerview.widget.GapWorker.run(GapWorker.java:399)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6111)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
https://github.com/TeamNewPipe/NewPipe/issues/7549#issuecomment-997334348 is the same exception as in the issue
https://github.com/TeamNewPipe/NewPipe/issues/7549#issuecomment-1017855193 is an unrelated exception
Note: It looks like the problem only happens on Android 7.0 (as seen in the crash reports) and on Lenovo
devices.
The problem occurs inside the Android framework itself (likely here) however I was unable to located any source/branch which exactly matches the line numbers. So some kind of modification was likely done inside the class by the device manufacturer.
The problematic code is no longer present in Android 8+ and was likely fixed by a refactoring, adding a null check and the catching of all exceptions with this commit:
TL;DR
The problem is not fixable by us as it's a Android problem or a problem introduced by a modification from the manufacturer of the device (likely Lenovo
).
Android 8+ provides a fix so I recommend updating the OS if possible.
In a duplicate issue the reporter stated that s/he also uses a Lenovo device - I'm now 99% sure that there is a bug in Lenovo's Android 7 OS.
Reply to: https://github.com/TeamNewPipe/NewPipe/issues/7549#issuecomment-1020436139 (Mod-note: removed quote reply because it requires massive amounts of space)
As I remember correctly, the previous versions of the NewPipe versions (before 0.21.14) have worked properly. , and I loved putting something in the background and closing the phone screen.
Is this crash only related to the android version? Can not it be another bug?
Is this crash only related to the android version? Can not it be another bug?
→ see above
The problem is not fixable by us as it's a Android problem or a problem introduced by a modification from the manufacturer of the device (likely Lenovo). Android 8+ provides a fix so I recommend updating the OS if possible.
Checklist
Steps to reproduce the bug
1.Open any video.
Actual behavior
App crash
Expected behavior
Videos must be played without any carsh
Screenshots/Screen recordings
Not required.
Logs
Exception
Crash log