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 when touching on (some) comment #9052

Closed
6 tasks done
devlearner opened this issue Oct 2, 2022 · 6 comments · Fixed by #9065
Closed
6 tasks done

Crash when touching on (some) comment #9052

devlearner opened this issue Oct 2, 2022 · 6 comments · Fixed by #9065
Labels
bug Issue is related to a bug

Comments

@devlearner
Copy link
Contributor

Checklist

  • I am able to reproduce the bug with the latest version.
  • 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.

Affected version

0.24.0

Steps to reproduce the bug

  1. Load a video
  2. Switch to Comments tab
  3. Touch / long press the text of some comment

Expected behavior

Comment text copied to clipboard

Actual behavior

Crashes with a cast exception android.text.SpannedString cannot be cast to android.text.Spannable in CommentTextOnTouchListener

Screenshots/Screen recordings

No response

Logs

Exception

  • User Action: ui error
  • Request: ACRA report
  • Content Country: US
  • Content Language: en
  • App Language: en
  • Service: none
  • Version: 0.24.0
  • OS: Linux Android 8.0.0 - 26
Crash log

java.lang.ClassCastException: android.text.SpannedString cannot be cast to android.text.Spannable
	at org.schabi.newpipe.util.CommentTextOnTouchListener.onTouch(CommentTextOnTouchListener.java:29)
	at android.view.View.dispatchTouchEvent(View.java:12536)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3159)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2786)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3159)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2786)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3159)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2786)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3159)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2786)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3159)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2786)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3159)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2786)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3159)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2786)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3159)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2786)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3159)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2786)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3159)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2786)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3159)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2786)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3159)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2786)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3159)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2786)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3159)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2786)
	at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:601)
	at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1871)
	at android.app.Activity.dispatchTouchEvent(Activity.java:3384)
	at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:69)
	at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:563)
	at android.view.View.dispatchPointerEvent(View.java:12788)
	at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:5675)
	at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5470)
	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4963)
	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5016)
	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4982)
	at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:5119)
	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4990)
	at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:5176)
	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4963)
	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5016)
	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4982)
	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4990)
	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4963)
	at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:7742)
	at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:7682)
	at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:7643)
	at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:7853)
	at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:197)
	at android.os.MessageQueue.nativePollOnce(Native Method)
	at android.os.MessageQueue.next(MessageQueue.java:325)
	at android.os.Looper.loop(Looper.java:142)
	at android.app.ActivityThread.main(ActivityThread.java:6944)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)


Affected Android/Custom ROM version

Android 8.0

Affected device model

Samsung Galaxy C9 Pro

Additional information

Can't pinpoint the exact comment texts that trigger the exception. But higher chances it will throw for comments with emojis. Possibly related to the fact that the text I pressed on contain newer Unicode standard emojis (like 🥰) beyond that the native Android supports (Android 8.0 in my case).

@devlearner devlearner added bug Issue is related to a bug needs triage Issue is not yet ready for PR authors to take up labels Oct 2, 2022
@AudricV AudricV removed the needs triage Issue is not yet ready for PR authors to take up label Oct 2, 2022
@slavalamp
Copy link

I have the same problem, also on an Android 8 Galaxy phone (mine is a3 2017). An example crashing comment is the pinned one in this video: https://www.youtube.com/watch?v=_Nm6OWFleis

@Marcos6226

This comment was marked as duplicate.

@tsiflimagas
Copy link
Contributor

For anyone experiencing this issue, try out the debug build from #9065.

@TobiGr
Copy link
Contributor

TobiGr commented Oct 9, 2022

I am unable to reproduce the original issue in the emulator. @devlearner @janTaja does #9065 fix the crash ?

@slavalamp
Copy link

@TobiGr it does for me (at least i haven't had any crashes scrolling through comments, and that used to happen a lot with the release version)

@devlearner
Copy link
Contributor Author

yep, now I feel the peace of mind not having to watch out where my finger lies when scrolling through the comments ;-)

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants