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

Crash on orientation change in viewpager 2 #85

Open
shafayatb opened this issue Aug 11, 2022 · 1 comment
Open

Crash on orientation change in viewpager 2 #85

shafayatb opened this issue Aug 11, 2022 · 1 comment

Comments

@shafayatb
Copy link

Hello, I am getting the following crash when I use this library with viewpager2 and android:configChanges="orientation|screenSize" in the manifest file.

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.widget.ImageButton.getTag()' on a null object reference
        at bg.devlabs.fullscreenvideoview.FullscreenVideoView.onConfigurationChanged(FullscreenVideoView.java:793)
        at android.view.View.dispatchConfigurationChanged(View.java:15681)
        at android.view.ViewGroup.dispatchConfigurationChanged(ViewGroup.java:1659)
        at android.view.ViewGroup.dispatchConfigurationChanged(ViewGroup.java:1667)
        at android.view.ViewGroup.dispatchConfigurationChanged(ViewGroup.java:1667)
        at android.view.ViewGroup.dispatchConfigurationChanged(ViewGroup.java:1667)
        at android.view.ViewGroup.dispatchConfigurationChanged(ViewGroup.java:1667)
        at android.view.ViewGroup.dispatchConfigurationChanged(ViewGroup.java:1667)
        at android.view.ViewGroup.dispatchConfigurationChanged(ViewGroup.java:1667)
        at android.view.ViewGroup.dispatchConfigurationChanged(ViewGroup.java:1667)
        at android.view.ViewGroup.dispatchConfigurationChanged(ViewGroup.java:1667)
        at android.view.ViewGroup.dispatchConfigurationChanged(ViewGroup.java:1667)
        at android.view.ViewRootImpl.updateConfiguration(ViewRootImpl.java:6202)
        at android.app.ActivityThread.handleActivityConfigurationChanged(ActivityThread.java:6812)
        at android.app.servertransaction.ActivityConfigurationChangeItem.execute(ActivityConfigurationChangeItem.java:55)
        at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2438)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loopOnce(Looper.java:226)
        at android.os.Looper.loop(Looper.java:313)
        at android.app.ActivityThread.main(ActivityThread.java:8669)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
2022-08-11 18:15:59.552 com.ccp.comm E/SchedPolicy: Failed to find cgroup for tid 21085`
`

Without the configChanges in the manifest file, I am not getting the crash. But my orientation gets locked to portrait or landscape mode after some time by swiping too fast on the viewpager.

@my-dad-bot
Copy link

Facing the same issue also.

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

2 participants