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

UI error crash when rotating screen while "add to playlist" modal is open. #7825

Closed
4 tasks done
Magicfulness opened this issue Feb 6, 2022 · 4 comments · Fixed by #8146
Closed
4 tasks done

UI error crash when rotating screen while "add to playlist" modal is open. #7825

Magicfulness opened this issue Feb 6, 2022 · 4 comments · Fixed by #8146
Assignees
Labels
bug Issue is related to a bug GUI Issue is related to the graphical user interface

Comments

@Magicfulness
Copy link

Magicfulness commented Feb 6, 2022

Checklist

Steps to reproduce the bug

  1. Long hold on any video and press add to playlist. (Alternatively, select the "add to playlist" option under any video when watching).
  2. Rotate the screen while "auto-rotate" feature is on.

Actual behavior

App crashes, and we are sent to home page.

Expected behavior

App does not crash. Ideally the "add to playlist" modal is still open, but doesn't matter if it isn't.

Screenshots/Screen recordings

#7825 (comment)

Logs

Exception

  • User Action: ui error
  • Request: ACRA report
  • Content Country: US
  • Content Language: en-US
  • App Language: en_US
  • Service: none
  • Version: 0.21.15
  • OS: Linux Android 11 - 30
Crash log

java.lang.RuntimeException: Unable to start activity ComponentInfo{org.schabi.newpipe/org.schabi.newpipe.MainActivity}: androidx.fragment.app.Fragment$InstantiationException: Unable to instantiate fragment org.schabi.newpipe.local.dialog.PlaylistAppendDialog: could not find Fragment constructor
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3622)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3786)
	at android.app.ActivityThread.handleRelaunchActivityInner(ActivityThread.java:5666)
	at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:5572)
	at android.app.servertransaction.ActivityRelaunchItem.execute(ActivityRelaunchItem.java:69)
	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:2257)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:233)
	at android.app.ActivityThread.main(ActivityThread.java:8030)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978)
Caused by: androidx.fragment.app.Fragment$InstantiationException: Unable to instantiate fragment org.schabi.newpipe.local.dialog.PlaylistAppendDialog: could not find Fragment constructor
	at androidx.fragment.app.Fragment.instantiate(Fragment.java:628)
	at androidx.fragment.app.FragmentContainer.instantiate(FragmentContainer.java:57)
	at androidx.fragment.app.FragmentManager$3.instantiate(FragmentManager.java:483)
	at androidx.fragment.app.FragmentStateManager.<init>(FragmentStateManager.java:85)
	at androidx.fragment.app.FragmentManager.restoreSaveState(FragmentManager.java:2728)
	at androidx.fragment.app.FragmentController.restoreSaveState(FragmentController.java:198)
	at androidx.fragment.app.FragmentActivity$2.onContextAvailable(FragmentActivity.java:149)
	at androidx.activity.contextaware.ContextAwareHelper.dispatchOnContextAvailable(ContextAwareHelper.java:99)
	at androidx.activity.ComponentActivity.onCreate(ComponentActivity.java:322)
	at androidx.fragment.app.FragmentActivity.onCreate(FragmentActivity.java:273)
	at org.schabi.newpipe.MainActivity.onCreate(MainActivity.java:143)
	at android.app.Activity.performCreate(Activity.java:8006)
	at android.app.Activity.performCreate(Activity.java:7990)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3595)
	... 13 more
Caused by: java.lang.NoSuchMethodException: org.schabi.newpipe.local.dialog.PlaylistAppendDialog.<init> []
	at java.lang.Class.getConstructor0(Class.java:2332)
	at java.lang.Class.getConstructor(Class.java:1728)
	at androidx.fragment.app.Fragment.instantiate(Fragment.java:613)
	... 27 more


Device info

  • Android version/Custom ROM version: Android 11, official version by OnePlus
  • Device model: OnePlus 8T
@Magicfulness Magicfulness added the bug Issue is related to a bug label Feb 6, 2022
@Magicfulness Magicfulness mentioned this issue Feb 6, 2022
@Magicfulness
Copy link
Author

22-02-05-23-23-25.mp4

@triallax triallax added the GUI Issue is related to the graphical user interface label Feb 7, 2022
@opusforlife2
Copy link
Collaborator

Thanks for the great bug report!

@GGAutomaton
Copy link
Contributor

I've found the problem and would like to work on this issue.

@GGAutomaton
Copy link
Contributor

GGAutomaton commented Apr 4, 2022

Going to fix it with this method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug GUI Issue is related to the graphical user interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants