jellyfin-webos icon indicating copy to clipboard operation
jellyfin-webos copied to clipboard

Debugging possible memory leak?

Open stoically opened this issue 2 years ago • 11 comments

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?

stoically avatar Apr 06 '22 18:04 stoically

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

Danacus avatar Apr 24 '22 14:04 Danacus

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?.

dab2020 avatar Jun 23 '22 03:06 dab2020

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.

stoically avatar Jun 23 '22 04:06 stoically

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.

dab2020 avatar Jun 29 '22 06:06 dab2020

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.

stoically avatar Jul 01 '22 00:07 stoically

Hmm.. Maybe try using 10.8.1 hotfix.

This seems to be a niche issue.

dab2020 avatar Jul 01 '22 03:07 dab2020

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 avatar Jul 01 '22 06:07 stoically

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.

stoically avatar Jul 01 '22 06:07 stoically

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.

LordDeimos666 avatar Aug 16 '22 18:08 LordDeimos666

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.

Arzte avatar Jan 08 '23 01:01 Arzte

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 ?

maximushugus avatar Jun 21 '23 12:06 maximushugus