SkyTubeTeam / SkyTube

Copylefted libre / open source YouTube player for Android
GNU General Public License v3.0
2.22k stars 318 forks source link

App crashed when load comment #1240

Closed TruongTanLuc201270 closed 2 months ago

TruongTanLuc201270 commented 2 months ago

https://github.com/SkyTubeTeam/SkyTube/assets/145727083/7b936e74-d181-48b8-8307-c333815572d0

tervor commented 2 months ago

I experience the same issue here with Sky Tube 2.987 on Android 13. I managed to get a stack trace from the logs. Hopefully this is useful:

04-20 10:00:51.709  9483  9483 E AndroidRuntime: FATAL EXCEPTION: main
04-20 10:00:51.709  9483  9483 E AndroidRuntime: Process: free.rm.skytube.oss, PID: 9483
04-20 10:00:51.709  9483  9483 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String org.schabi.newpipe.extractor.stream.Description.getContent()' on a null object reference
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at free.rm.skytube.gui.businessobjects.adapters.CommentsAdapter$CommentViewHolder.updateInfo(Unknown Source:108)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at free.rm.skytube.gui.businessobjects.adapters.CommentsAdapter.getGroupView(Unknown Source:13)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.widget.ExpandableListConnector.getView(ExpandableListConnector.java:446)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.widget.AbsListView.obtainView(AbsListView.java:2458)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.widget.ListView.makeAndAddView(ListView.java:2067)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.widget.ListView.fillDown(ListView.java:793)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.widget.ListView.fillFromTop(ListView.java:855)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.widget.ListView.layoutChildren(ListView.java:1810)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.widget.AbsListView.onLayout(AbsListView.java:2255)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.view.View.layout(View.java:23798)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.view.ViewGroup.layout(ViewGroup.java:6413)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1103)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.view.View.layout(View.java:23798)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.view.ViewGroup.layout(ViewGroup.java:6413)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at hollowsoft.slidingdrawer.SlidingDrawer.onLayout(Unknown Source:93)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.view.View.layout(View.java:23798)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.view.ViewGroup.layout(ViewGroup.java:6413)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.view.View.layout(View.java:23798)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.view.ViewGroup.layout(ViewGroup.java:6413)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.view.View.layout(View.java:23798)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.view.ViewGroup.layout(ViewGroup.java:6413)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.view.View.layout(View.java:23798)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.view.ViewGroup.layout(ViewGroup.java:6413)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1891)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1729)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.widget.LinearLayout.onLayout(LinearLayout.java:1638)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.view.View.layout(View.java:23798)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.view.ViewGroup.layout(ViewGroup.java:6413)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.view.View.layout(View.java:23798)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.view.ViewGroup.layout(ViewGroup.java:6413)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1891)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1729)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.widget.LinearLayout.onLayout(LinearLayout.java:1638)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.view.View.layout(View.java:23798)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.view.ViewGroup.layout(ViewGroup.java:6413)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at com.android.internal.policy.DecorView.onLayout(DecorView.java:799)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.view.View.layout(View.java:23798)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.view.ViewGroup.layout(ViewGroup.java:6413)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:4118)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3459)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2371)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9297)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1231)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1239)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.view.Choreographer.doCallbacks(Choreographer.java:899)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.view.Choreographer.doFrame(Choreographer.java:832)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1214)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.os.Handler.handleCallback(Handler.java:942)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:99)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.os.Looper.loopOnce(Looper.java:201)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:288)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:7918)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
04-20 10:00:51.709  9483  9483 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
04-20 10:00:51.715  1486  8800 W ActivityTaskManager:   Force finishing activity free.rm.skytube.oss/free.rm.skytube.gui.activities.YouTubePlayerActivity
drogga commented 2 months ago

Guys, the NewPipeExtractor was updated 2 weeks ago, but a new release wasn't made, you can test the latest CI (GH Actions) debug build before the files expire to see if that fixes the comments loading... BTW - Yes, trying to load them crashes the app for me as well, but I'm avoiding swiping left to show them at the moment, untill a proper release is being published here, tho sometimes I do the gesture by mistake and ofc. it crashes it, which is an annoyance, but I have hopes...

tervor commented 2 months ago

@drogga I shortly tested the SkyTube Extra version from build 538 and it does not crash when displaying the comments, but it is not showing the comments correctly. See the screen shot: Screenshot_20240421-171613_1

drogga commented 2 months ago

I confirm - the comments text is blank (no avatars or comment likes as well), I've tested them both myself and also it looks like videos with multi-channel / multilingual audio are not in English, you can check a trending video by MrBeast when using Dash/HLS (with the "Try newer Video formats" option enabled). Probably that's the reason on why it's still not pushed as a release and unfortunately there are no comments related preferences at all, like at least to be able to disable the swipe gesture for them...

The problems come from the NewPipeExtractor, the comments there are blank as well and there's a audio stream language picker, which is missing here, hence the issue.

The Snapshots / Debug builds versionCode / Build number is still 47, so I'm not sure from where you got that 538 one...

drogga commented 2 months ago

@gzsombor It looks like NP updated the Extractor along with the new ver., you might consider doing the same here and I really hope you have time to handle the Audio ML thing anytime soon. Thank You !

gzsombor commented 2 months ago

After upgrading to the latest NewPipeExtractor it seems to be working again.