jellyfin / jellyfin-webos

WebOS Client for Jellyfin
https://jellyfin.org
Mozilla Public License 2.0
638 stars 65 forks source link

Debugging possible memory leak? #81

Open stoically opened 2 years ago

stoically commented 2 years ago

One of my media files sometimes leads to a webos message popup saying "restarting app to free memory". Doesn't happen with other media files. I'd be happy to provide debug logs but not sure how to?

Danacus commented 2 years ago

I had the same issue when viewing photos. Never had any problems with videos.

dab2020 commented 2 years ago

I hardly doubt that this is a issue on Jellyfin's side, it's most likely the hardware . I mean these TV's are pretty low spec and have a tiny amount of RAM.

How old is your TV and what version of webOS are you running?.

stoically commented 2 years ago

Model: LG 49UN71006LB Version: 5.3.1-29

The fact that other media files larger in size work without this issue was an indicator for me that it might be an app issue. However, havent tested since the 10.8 server release - and using the app from the store might help as well, since running in dev mode seems to put additional stress on the hardware.

dab2020 commented 2 years ago

This Guy found that video's played via the native video player bypasses webOS directly:

All decoding is done through hardware and the decoded video is displayed directly on the screen through decoder’s own internal video output, bypassing webOS entirely.

I believe software video streams do have to pass through webOS, at-least for some time before being passed on.

Try playing a live stream within your browser and see if you get the same error.

stoically commented 2 years ago

Thanks for the hint, playing the same file via the browser works fine, no crashes. 👍

Also tried with the app again and server 10.8.0-beta2 (because of https://github.com/jellyfin/jellyfin/issues/8043), but crashed with the low memory error after like 10 minutes again.

dab2020 commented 2 years ago

Hmm.. Maybe try using 10.8.1 hotfix.

This seems to be a niche issue.

stoically commented 2 years ago

As described in the issue, I did test with 10.8.1 - but can't really verify as the behavior is different (HDR vs no HDR).

stoically commented 2 years ago

This seems to be a niche issue.

Yeah, memory leaks can be sneaky. That's why I initially asked for instructions to debug them myself and/or provide logs.

Also it only happens with that one specific file - so I'd agree that it is niche.

LordDeimos666 commented 2 years ago

Happening also to me, while playing big 4k video there's no problem at all. While playing some small anime episode with ASS subtitles enabled, disabling ASS subtitles does not give the memory leak.

Playing from the TV browser does not give any problem.

Arzte commented 1 year ago

I can confirm with @LordDeimos666's issue of subtitles causing issues. It's fine when there isn't a lot of text on screen, or not a lot of text in quick secession. (EG sign/songs subtitles available for some anime) However, outside of that, I've had issues with webOS killing the client if subtitles come in too rapidly.

I do wonder if #107 might be relevant because it doesn't seem to be killed for memory until a couple of seconds after whichever set of subtitles shows on the screen, usually out of sync to a degree. - I should note that sometimes subtitles don't have to show for it to be killed, just usually

Playing from the browser, or forcing the subtitles to be burned in do not have the same issue.

maximushugus commented 1 year ago

I can also confirm, on my rooted LG TV on WebOS 05.40.26, if I play a movie without enabling subtitles there is no problem. As soon as I enable ASS subtitles, the app crashes in less than a second. I can SSH on the TV, and I can see the memory leak, with used RAM going up until the crash. There is no problem with other types of subtitle. How could we debug this problem ?