polymorphicshade / NewPipe

A fork of NewPipe with SponsorBlock functionality.
GNU General Public License v3.0
3.22k stars 106 forks source link

App Crash when Screen Auto rotation is off #297

Closed aldrinjenson closed 1 year ago

aldrinjenson commented 1 year ago

Checklist

Affected version

0.24.1

Steps to reproduce the bug

  1. Make sure Auto rotation is turned off in device
  2. Play any video
  3. App crashes with the whole UI being rotated to landscape mode
  4. Open app again and play any video
  5. The UI changes automatically to landscape mode and App crashes again
  6. Turn auto rotation on
  7. Open app again and play a video
  8. Now video plays

Expected behavior

Actual behavior

Screenshots/Screen recordings

https://user-images.githubusercontent.com/53407417/214132494-b3acfeb2-c9bf-4448-959e-b1c899f0a312.mp4

Logs

Exception

java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.Activity.runOnUiThread(java.lang.Runnable)' on a null object reference at org.schabi.newpipe.fragments.detail.VideoDetailFragment.lambda$handleResult$23(VideoDetailFragment.java:1626) at org.schabi.newpipe.fragments.detail.VideoDetailFragment.$r8$lambda$kvbSCZYpk1eZXvjw0VQVcbHCIUo(Unknown Source:0) at org.schabi.newpipe.fragments.detail.VideoDetailFragment$$ExternalSyntheticLambda38.run(Unknown Source:4) at java.lang.Thread.run(Thread.java:923)


Affected Android/Custom ROM version

Android 11

Affected device model

Nokia 8.1

Additional information

Please note that in the whole of screen recording, the phone was held in portrait mode only in my hand. The whole UI shifting to landscape mode was solely due to the software (Newpipe sponsorblock). This occurs only with Newpipe sponsorblock.

I found #216 issue. But it's not exactly the same, so I'm creating this new one here. Feel free to close this if you think this belongs under that one. Thanks.

polymorphicshade commented 1 year ago

I believe this is now fixed.

I will re-open this issue if you can reproduce this issue with the latest version.