TeamNewPipe / NewPipe

A libre lightweight streaming front-end for Android.
https://newpipe.net
GNU General Public License v3.0
30.99k stars 3.02k forks source link

Popup Player Crash #1855

Closed Perflyst closed 5 years ago

Perflyst commented 5 years ago

Exception

I also know you do not want crash logs in issue section but this happens not only on my device. I know there is xposed installed BUT xposed does NOT touch this app in any way!

The popup player starts and loads the video and when it tries to play the video it ends with a crash.

Crash log

``` java.lang.RuntimeException: Unable to stop activity {org.schabi.newpipe/org.schabi.newpipe.player.MainVideoPlayer}: java.lang.NullPointerException: Attempt to invoke virtual method 'int com.google.android.exoplayer2.SimpleExoPlayer.getPlaybackState()' on a null object reference at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4202) at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4258) at android.app.ActivityThread.-wrap6(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1557) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6186) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779) at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:107) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int com.google.android.exoplayer2.SimpleExoPlayer.getPlaybackState()' on a null object reference at org.schabi.newpipe.player.BasePlayer.isPlaying(BasePlayer.java:1109) at org.schabi.newpipe.player.MainVideoPlayer.createPlayerState(MainVideoPlayer.java:252) at org.schabi.newpipe.player.MainVideoPlayer.onStop(MainVideoPlayer.java:237) at android.app.Instrumentation.callActivityOnStop(Instrumentation.java:1290) at android.app.Activity.performStop(Activity.java:6859) at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4197) ... 10 more java.lang.NullPointerException: Attempt to invoke virtual method 'int com.google.android.exoplayer2.SimpleExoPlayer.getPlaybackState()' on a null object reference at org.schabi.newpipe.player.BasePlayer.isPlaying(BasePlayer.java:1109) at org.schabi.newpipe.player.MainVideoPlayer.createPlayerState(MainVideoPlayer.java:252) at org.schabi.newpipe.player.MainVideoPlayer.onStop(MainVideoPlayer.java:237) at android.app.Instrumentation.callActivityOnStop(Instrumentation.java:1290) at android.app.Activity.performStop(Activity.java:6859) at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4197) at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4258) at android.app.ActivityThread.-wrap6(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1557) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6186) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779) at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:107) ```


theScrabi commented 5 years ago

Please update to v0.14.2 And tell us if it works.

Perflyst commented 5 years ago

This is v0.14.2 from F-Droid.

theScrabi commented 5 years ago

Ok ill check it

theScrabi commented 5 years ago

This is weird, for me it works

Perflyst commented 5 years ago

Can I send you any further logs or try something else in order to help? I will also try a re-install of the app.

Perflyst commented 5 years ago

That is what I did. Played video and started popup from there while video was playing

theScrabi commented 5 years ago

This should have been fixed before release :/. Can someone help to fix this.

nitink133 commented 5 years ago

@theScrabi I tested on both 0.14.1 and 0.14.2 version. This crash was not there in the previous build. I'm working on it to fix this.

theScrabi commented 5 years ago

Thank you

nitink133 commented 5 years ago
Perflyst commented 5 years ago

Can you share apk here, please?

AnubrataDS commented 5 years ago

The exact same issue is happening with me when trying to run a debug build from dev branch on my cellphone (Android 8.0) Normal "Enqueue on popup" works perfectly fine Changing from full screen player to popup causes app crash with the same nullpointer exception as described Changing from full screen player to audio-only causes app crash with the same nullpointer exception as described

nitink133 commented 5 years ago

@Perflyst Sure, but this is a debug build. Here you go @AnubrataDS Ya, It's was there. I have fixed it. Don't worry, you can check my pull request.

AnubrataDS commented 5 years ago

@beNitinhere Ok so should I just copy your changes to my branch ? I'm working on another issue and I'm stuck because of this crash

nitink133 commented 5 years ago

@AnubrataDS ya sure, You should pull my changes to your branch

AnubrataDS commented 5 years ago

@beNitinhere can you tell me how to do that ? Should I set your branch as remote and then pull ? Right now I just copy-pasted the change to my code and it's working perfectly

nitink133 commented 5 years ago

@AnubrataDS I think the best way is to create a new local branch and pull my changes and then merge this with dev branch but before merging, you stash your changes otherwise merging can remove your local changes

AnubrataDS commented 5 years ago

@beNitinhere Ok I'll try and let you know

nitink133 commented 5 years ago

@AnubrataDS Ya sure

nitink133 commented 5 years ago

@theScrabi Plz close this issue. We have fixed it

Perflyst commented 5 years ago

Can you please share the pull request or add a commit message in it which closes this issue?

On November 6, 2018 3:26:03 PM UTC, Nitin Khanna notifications@github.com wrote:

@theScrabi Plz close this issue. We have fixed it

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/TeamNewPipe/NewPipe/issues/1855#issuecomment-436292203

nitink133 commented 5 years ago

@Perflyst I have already shared the PR. PR title is hacking-theme added I have also add a theme in this PR, Thanks This is my commit https://github.com/TeamNewPipe/NewPipe/pull/1851/commits/fd9ac311fbf746913089d7c534ff3b415c2cf98a

theScrabi commented 5 years ago

@beNitinhere please send a pullrequest.

nitink133 commented 5 years ago

@theScrabi I have already send pr actually I have also added a theme so my PR title commit is hacking theme added #1851plz review it and let me know if anything is needed. Thanks

On Wed, Nov 7, 2018, 8:02 PM Christian Schabesberger < notifications@github.com> wrote:

@beNitinhere https://github.com/beNitinhere please send a pullrequest.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/TeamNewPipe/NewPipe/issues/1855#issuecomment-436641688, or mute the thread https://github.com/notifications/unsubscribe-auth/AfV5Bi1qdI_dzc0V9h7x3Cnwa9yrcj6Nks5usu7hgaJpZM4X_1BZ .

theScrabi commented 5 years ago

You may not fix this in the theme PR please send a separate one.

TobiGr commented 5 years ago

Fixed by #1874