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

[Bug] app crash when using color highlighter #710

Open
2 tasks done
error-reporting opened this issue Feb 12, 2025 · 19 comments
Open
2 tasks done

[Bug] app crash when using color highlighter #710

error-reporting opened this issue Feb 12, 2025 · 19 comments
Labels
bug Something isn't working Waiting For Release Implemented but not released yet

Comments

@error-reporting
Copy link

error-reporting commented Feb 12, 2025

  • Tried latest version

  • This issue is not duplicated with any other open or closed issues

Describe the bug

ytdlnis crash once every two use of extractor args and download in Terminal
Attempt to invoke virtual method 'int java.lang.Object.hashCode()' on a null object reference

android.text.SpannableStringInternal.hashCode(SpannableStringInternal.java:488)
android.text.SpannedString.hashCode(Unknown Source:0)
java.util.Objects.hashCode(Objects.java:98)
android.view.inputmethod.CursorAnchorInfo.(CursorAnchorInfo.java:435)
android.view.inputmethod.CursorAnchorInfo.(Unknown Source:0)
android.view.inputmethod.CursorAnchorInfo$Builder.build(CursorAnchorInfo.java:391)
android.widget.Editor$CursorAnchorInfoNotifier.updatePosition(Editor.java:4277)
android.widget.Editor$PositionListener.onPreDraw(Editor.java:3135)
android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:977)
android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2642)
android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1601)
android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7355)
android.view.Choreographer$CallbackRecord.run(Choreographer.java:1038)
android.view.Choreographer.doCallbacks(Choreographer.java:850)
android.view.Choreographer.doFrame(Choreographer.java:766)
android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1024)
android.os.Handler.handleCallback(Handler.java:790)
android.os.Handler.dispatchMessage(Handler.java:99)
android.os.Looper.loop(Looper.java:200)
android.app.ActivityThread.main(ActivityThread.java:6971)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

Expected behavior

the app and terminal work without crashing

Steps to reproduce

copy and paste this command
--write-pages
press keyboard enter key
then copy and paste this command
"https://www.youtube.com/watch?v=4fk2prKnYnI"
wait then app crash

Device information

oppo cph1853
android 8.1 stock

Screenshots / Recordings

Image

Additional context

it crash mid editing of yt-dlp extractor args
Attempt to invoke virtual method 'int java.lang.Object.hashCode()' on a null object reference

android.text.SpannableStringInternal.hashCode(SpannableStringInternal.java:488)
android.text.SpannedString.hashCode(Unknown Source:0)
java.util.Objects.hashCode(Objects.java:98)
android.view.inputmethod.CursorAnchorInfo.(CursorAnchorInfo.java:435)
android.view.inputmethod.CursorAnchorInfo.(Unknown Source:0)
android.view.inputmethod.CursorAnchorInfo$Builder.build(CursorAnchorInfo.java:391)
android.widget.Editor$CursorAnchorInfoNotifier.updatePosition(Editor.java:4277)
android.widget.Editor$PositionListener.onPreDraw(Editor.java:3135)
android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:977)
android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2642)
android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1601)
android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7355)
android.view.Choreographer$CallbackRecord.run(Choreographer.java:1038)
android.view.Choreographer.doCallbacks(Choreographer.java:850)
android.view.Choreographer.doFrame(Choreographer.java:766)
android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1024)
android.os.Handler.handleCallback(Handler.java:790)
android.os.Handler.dispatchMessage(Handler.java:99)
android.os.Looper.loop(Looper.java:200)
android.app.ActivityThread.main(ActivityThread.java:6971)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

@error-reporting error-reporting added the bug Something isn't working label Feb 12, 2025
@deniscerri
Copy link
Owner

Can you send a video recording

@error-reporting
Copy link
Author

Record_2025-02-12-18-37-36.mp4

@deniscerri
Copy link
Owner

Pretty stage. Looks like as soon as you pasted it it crashed 🤔

@deniscerri
Copy link
Owner

Send me that command

@error-reporting
Copy link
Author

error-reporting commented Feb 12, 2025

edit the player client to ios and -f string of this in ytdlnis terminal
--extractor-args "youtube:player_client=android;lang=en;player_skip=webpage,configs;visitor_data=Cgtza2syNGU0ZVhpSSjd2Kq9BjIKCgJWThIEGgAgYg%3D%3D;po_token=web.gvs+MnhpBsz2yFIG5Wk6KuYp6_3yrkT7nQxpO_xS-tFA_d9tOxrCWsIXH4ZXTkhXW40ROVR8LGxLhm3cCnH-EJ6888ougC5AaTp7UHJc_xCjJEKadx5Zr9lbsDFSm-J5ef8lvwUAAckrSmJXFukjkRktGP2X1UrRbZUVgLg=,web.player+MlTshLS3fNt9Muy5Z-ZUYGYOVq4JS_BD5Wsud6ZD0CoDSKEez0dvH6WyKMeUfZCerGDERwuxsAeP7dowGv1j1hpopNLScrqoAKnJA06ud_lrR3hhkCg=" -f "(bv*+ba/b)[protocol=https]" "https://www.youtube.com/watch?v=_66gWwERbps"

@error-reporting
Copy link
Author

error-reporting commented Feb 12, 2025

and press run command and cancel the command then repeat as said above

@deniscerri
Copy link
Owner

@error-reporting can't for the life of me reproduce this. 😔

@error-reporting
Copy link
Author

error-reporting commented Feb 13, 2025

copy and paste this command
--write-pages
press keyboard enter key
then copy and paste this command
"https://www.youtube.com/watch?v=4fk2prKnYnI" wait then app crash
you need to do it quick enough and having a low end phone

@error-reporting
Copy link
Author

closing the issue because low end android 8.1 device is needed to reproduce the crash and not all commands crash the app

@error-reporting error-reporting closed this as not planned Won't fix, can't repro, duplicate, stale Feb 14, 2025
@deniscerri
Copy link
Owner

I'll try to reprod again

@error-reporting
Copy link
Author

error-reporting commented Feb 14, 2025

I'll try to reprod again

copy and paste this command
--write-pages
press keyboard enter key
then copy and paste this command
"https://www.youtube.com/watch?v=4fk2prKnYnI" do it quickly

@deniscerri
Copy link
Owner

This could be related to the color highlighter, probably cant keep up with changes and crashes. It will be challenging to figure out how to solve it

@error-reporting
Copy link
Author

the app only crash like this on android 8

@deniscerri
Copy link
Owner

I see

@error-reporting
Copy link
Author

error-reporting commented Feb 17, 2025

the url color highlighter In ytdlnis is bad on oppo android 8 and i think also android 7

@deniscerri
Copy link
Owner

What do you think of only adding color highlighter on Android 9 and up
Or make it a toggle to disable it

@error-reporting
Copy link
Author

error-reporting commented Feb 24, 2025

only adding terminal color highlighter on Android 10 and up
the gui color highlighter don't crash with Attempt to invoke virtual method 'int java.lang.Object.hashCode()' on a null object reference

@deniscerri
Copy link
Owner

I feel this is more related to phone memory.
I have found that color highlighter is taxing. So it's not related to android version.

I should add a toggle to disable it

@deniscerri
Copy link
Owner

Interesting. Well since highlighter doesn't crash in static environments i guess it's better if i made a toggle instead of completely removing it

@deniscerri deniscerri changed the title [Bug] app crash [Bug] app crash when using color highlighter Feb 25, 2025
@deniscerri deniscerri added the Waiting For Release Implemented but not released yet label Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Waiting For Release Implemented but not released yet
Projects
None yet
Development

No branches or pull requests

2 participants