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

[Bug] Crash on armeabi-v7a Device When Switch to Another Video #592

Open
3 tasks done
densetsunozero opened this issue Dec 12, 2024 · 9 comments
Open
3 tasks done

Comments

@densetsunozero
Copy link

Checklist (Your issue will be automatically closed if you delete this part)

  • I make sure that there are no existing issues - open or closed - which I could contribute my information to.
  • I am able to reproduce the bug with the latest version given here: CLICK THIS LINK.
  • I have attached the error report in the issue.

Describe the bug
I have an Android tv box which is 32-bit so I use armeabi-v7a build on it. When I open a video, it plays fine. But if I click on another video to switch to it, PipePipe will crash.

Looks like the issue only happens on armeabi-v7a devices. All my arm64-v8a devices (smartphone, tablet) can switch to another video smoothly.

Frequency
100% crashes when switch to another video on armeabi-v7a device.

Steps to reproduce the bug

  1. Open one video
  2. Click another video in related video area.
  3. Crash

Device (e.g. Pixel 9 Pro)
X96-X4 TV Box with Andorid 11

Error report

  • User Action: ui error
  • Request: ACRA report
  • Content Country: JP
  • Content Language: ja
  • App Language: zh_CN
  • Service: none
  • Version: 4.0.1
  • OS: Linux Android 11 - 30
Crash log

java.lang.RuntimeException: Unable to start service org.schabi.newpipe.player.MainPlayer@f54365b with Intent { cmp=InfinityLoop1309.NewPipeEnhanced/org.schabi.newpipe.player.MainPlayer (has extras) }: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.SharedPreferences org.schabi.newpipe.player.Player.getPrefs()' on a null object reference
	at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4338)
	at android.app.ActivityThread.access$1800(ActivityThread.java:237)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1951)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:223)
	at android.app.ActivityThread.main(ActivityThread.java:7664)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:952)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.SharedPreferences org.schabi.newpipe.player.Player.getPrefs()' on a null object reference
	at org.schabi.newpipe.player.NotificationUtil.initializeNotificationSlots(NotificationUtil.java:225)
	at org.schabi.newpipe.player.NotificationUtil.createNotification(NotificationUtil.java:99)
	at org.schabi.newpipe.player.NotificationUtil.createNotificationAndStartForeground(NotificationUtil.java:196)
	at org.schabi.newpipe.player.MainPlayer.onStartCommand(MainPlayer.java:128)
	at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4320)
	... 8 more


@whistlingwoods
Copy link

Isn't this issue similar to upstream NewPipe issue TeamNewPipe/NewPipe#8384

And maybe NullPointerException can be fixed by code in this comment was available at AndroidTv branch in this repo

@InfinityLoop1308
Copy link
Owner

Please test if the this patch solves the problem

@densetsunozero
Copy link
Author

Still crash with the debug version

Exception

  • User Action: ui error
  • Request: ACRA report
  • Content Country: CN
  • Content Language: zh-CN
  • App Language: zh_CN
  • Service: none
  • Version: 4.0.1
  • OS: Linux Android 11 - 30
Crash log

java.lang.RuntimeException: Unable to start service org.schabi.newpipe.player.MainPlayer@7127a8c with Intent { cmp=InfinityLoop1309.NewPipeEnhanced.debug/org.schabi.newpipe.player.MainPlayer (has extras) }: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.SharedPreferences org.schabi.newpipe.player.Player.getPrefs()' on a null object reference
   at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4338)
   at android.app.ActivityThread.access$1800(ActivityThread.java:237)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1951)
   at android.os.Handler.dispatchMessage(Handler.java:106)
   at android.os.Looper.loop(Looper.java:223)
   at android.app.ActivityThread.main(ActivityThread.java:7664)
   at java.lang.reflect.Method.invoke(Native Method)
   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:952)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.SharedPreferences org.schabi.newpipe.player.Player.getPrefs()' on a null object reference
   at org.schabi.newpipe.player.NotificationUtil.createNotification(NotificationUtil.java:112)
   at org.schabi.newpipe.player.NotificationUtil.createNotificationAndStartForeground(NotificationUtil.java:196)
   at org.schabi.newpipe.player.MainPlayer.onStartCommand(MainPlayer.java:128)
   at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4320)
   ... 8 more


@InfinityLoop1308

This comment was marked as outdated.

@InfinityLoop1308

This comment was marked as outdated.

@InfinityLoop1308
Copy link
Owner

@whistlingwoods yeah bro you are 100% right. Thanks for finding this.
@densetsunozero try this one

@densetsunozero
Copy link
Author

Still crash with the apk from send

Exception

  • User Action: ui error
  • Request: ACRA report
  • Content Country: CN
  • Content Language: zh-CN
  • App Language: zh_CN
  • Service: none
  • Version: 4.0.1
  • OS: Linux Android 11 - 30
Crash log

java.lang.RuntimeException: Unable to start service org.schabi.newpipe.player.MainPlayer@33edc5f with Intent { cmp=InfinityLoop1309.NewPipeEnhanced/org.schabi.newpipe.player.MainPlayer (has extras) }: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.SharedPreferences org.schabi.newpipe.player.Player.getPrefs()' on a null object reference
   at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4338)
   at android.app.ActivityThread.access$1800(ActivityThread.java:237)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1951)
   at android.os.Handler.dispatchMessage(Handler.java:106)
   at android.os.Looper.loop(Looper.java:223)
   at android.app.ActivityThread.main(ActivityThread.java:7664)
   at java.lang.reflect.Method.invoke(Native Method)
   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:952)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.SharedPreferences org.schabi.newpipe.player.Player.getPrefs()' on a null object reference
   at org.schabi.newpipe.player.NotificationUtil.createNotification(NotificationUtil.java:112)
   at org.schabi.newpipe.player.NotificationUtil.createNotificationAndStartForeground(NotificationUtil.java:196)
   at org.schabi.newpipe.player.MainPlayer.onStartCommand(MainPlayer.java:128)
   at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4320)
   ... 8 more


@Diamochang
Copy link

Same error also can be find by the same way in Android 8.

Exception

  • User Action: ui error
  • Request: ACRA report
  • Content Country: HK
  • Content Language: zh-CN
  • App Language: zh_CN
  • Service: none
  • Version: 4.0.1
  • OS: Linux Android 8.0.0 - 26
Crash log

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Enum.equals(java.lang.Object)' on a null object reference
	at org.schabi.newpipe.fragments.detail.VideoDetailFragment.handleResult(VideoDetailFragment.java:1656)
	at org.schabi.newpipe.fragments.detail.VideoDetailFragment.lambda$runWorker$8(VideoDetailFragment.java:976)
	at org.schabi.newpipe.fragments.detail.VideoDetailFragment.$r8$lambda$CnVBxNd6FD1qYhdxNEp-GTmpDz0(Unknown Source:0)
	at org.schabi.newpipe.fragments.detail.VideoDetailFragment$$ExternalSyntheticLambda14.accept(Unknown Source:6)
	at io.reactivex.rxjava3.internal.observers.ConsumerSingleObserver.onSuccess(ConsumerSingleObserver.java:62)
	at io.reactivex.rxjava3.internal.operators.single.SingleObserveOn$ObserveOnSingleObserver.run(SingleObserveOn.java:81)
	at io.reactivex.rxjava3.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:123)
	at android.os.Handler.handleCallback(Handler.java:808)
	at android.os.Handler.dispatchMessage(Handler.java:101)
	at android.os.Looper.loop(Looper.java:166)
	at android.app.ActivityThread.main(ActivityThread.java:7529)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)


@InfinityLoop1308
Copy link
Owner

@Diamochang Go #613.
@densetsunozero does it still happen in 4.0.2?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants