App crashes with the whole UI being rotated to landscape mode
Open app again and play any video
The UI changes automatically to landscape mode and App crashes again
Turn auto rotation on
Open app again and play a video
Now video plays
Expected behavior
The app shouldn't crash when screen rotation is off
The app shouldn't erratically adjust rotation UI without the device actually being rotated physically
The app should automatically adjust layouts based on auto rotation
Actual behavior
App crashes when video is played with auto rotation
If the auto rotation was turned on initially and then turned off after loading newPipe, the UI automatically turns to landscape mode (even if the phone is held in portrait mode only) and then video plays fine
If the auto rotation is turned off before the app was loaded, the app crashes when a video is played
OS: Linux Nokia/Phoenix_00WW/PNX_sprout:11/RKQ1.200906.002/00WW_6_210:user/release-keys 11 - 30
Crash log
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.
Checklist
Affected version
0.24.1
Steps to reproduce the bug
Expected behavior
Actual behavior
Screenshots/Screen recordings
https://user-images.githubusercontent.com/53407417/214132494-b3acfeb2-c9bf-4448-959e-b1c899f0a312.mp4
Logs
Exception
Crash log
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.