Skip to content

Crashes while changing theme to dark under some circumstances #2

Description

@whistlingwoods

Checklist

  • I am able to reproduce the bug with the latest version given here: CLICK THIS LINK.
  • I made sure that there are no existing issues - open or closed - which I could contribute my information to.
  • I have read the FAQ and my problem isn't listed.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.
  • I have read and understood the AI policy. The content of this bug report is not generated by AI.

Affected version

Android 13

Steps to reproduce the bug

  1. Set History as first tab on main page from Content of main page Settings.

  2. Change Night theme to Black (Note it is only available when Theme is set to Automatic device theme, though it should be greyed out when theme is other than automatic as in official app, but that is another thing)

  3. Use app by playing some videos in background by enqueueing & playing more of them from related items so that some streams are in backstack, when we press device back button to go back to previous stream, during meantime when previous stream is loading spinner is rotating, open drawer by swiping from left, Try to change Appearance from automatic theme to light to dark to black to automatic in cycle more than one time, go back each time after change theme to see the effect on app appearance, you would be able to reproduce the bug.

Expected behavior

There sould be no crash as upstream Vanilla NewPipe.

Actual behavior

Ir produces a crash after changing theme to dark under certain scenarios.

Screenshots/Screen recordings

No response

Logs

Exception

  • User Action: ui error
  • Request: ACRA report
  • Content Country: GB
  • Content Language: en-GB
  • App Language: en_GB
  • Service: <unknown_service>
  • Timestamp: 2026-05-16T11:36:10.369+05:30
  • Package: org.schabi.newpipe
  • Service: <unknown_service>
  • Version: 0.28.6
  • OS: Linux samsung/a22xnnxx/a22x:13/TP1A.220624.014/A226BXXU7DWH4:user/release-keys 13 - 33
Crash log

java.lang.NullPointerException: Attempt to read from field 'com.google.android.material.appbar.AppBarLayout org.schabi.newpipe.databinding.FragmentVideoDetailBinding.appBarLayout' on a null object reference in method 'void org.schabi.newpipe.fragments.detail.VideoDetailFragment$$ExternalSyntheticLambda1.run()'
	at org.schabi.newpipe.fragments.detail.VideoDetailFragment$$ExternalSyntheticLambda1.run(r8-map-id-b536a7dbb08187839d047806301a0d5063a28fe76cc0c0e7f4cdd1ae4d7ad208:12)
	at android.os.Handler.handleCallback(Handler.java:942)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:226)
	at android.os.Looper.loop(Looper.java:313)
	at android.app.ActivityThread.main(ActivityThread.java:8762)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)


Affected Android/Custom ROM version

Android 13

Affected device model

Samsung A70s

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions