jernejsk / OpenELEC-OPi2

OpenELEC - The living room PC for everyone
http://openelec.tv
87 stars 25 forks source link

Crash when switching channels in PVR mode #40

Open KungfuPancake opened 8 years ago

KungfuPancake commented 8 years ago

If i change channels using HTSP/tvheadend, the screen sometimes freezes. Sound still plays for a couple of seconds but the picture just shows some garbled green-ish color.

jernejsk commented 8 years ago

I'm aware of that issue, but currently I'm unable to debug that (no DVB USB device).

KungfuPancake commented 8 years ago

I might be able to contribute. Are there any leads where to start looking for the issue? I'll also try to provide a tvheadend configuration that uses dummy sources, i.e. a reproducible debug environment that doesn't require DVB hardware.

jernejsk commented 8 years ago

I think the problem is in rendering code, but I'm not sure. I'm suspecting that DVDVideoCodecCedarX.cpp and modifications done to LinuxRendererGLES.cpp don't play nicely together.

I have a long term plan to remove any modifications to LinuxRendererGLES.cpp and write proper standalone render which would be a nice base to start solving some annoying issues.

But in the mean time, if you find proper fix, I would welcome it.

KungfuPancake commented 8 years ago

I started browsing the sources but can't spare enough time to come up with something any time soon. Would it help if I sent you some hardware?

jernejsk commented 8 years ago

Sorry, I have a lot of work to do also in my private life. This will be eventually fixed once I replace rendering code.

KungfuPancake commented 8 years ago

No worries.

jernejsk commented 8 years ago

This is fixed by commit 20ca9b235c561764467c23a783d3fb0bbe403a6a

markh-de commented 8 years ago

I don't mean to be a party pooper, but I'm afraid this issue is not yet completely fixed. I can confirm that 20ca9b235c561764467c23a783d3fb0bbe403a6a helps a lot. Now, when directly switching channels (Tvheadend with 3x DVB-S2), the green distorted screen only shows up for a split second, after that TV works perfectly again. But after some more zapping (maybe 20 times or so), Kodi froze again with the familiar green screen (and then automatically restarted after approx. a minute -- OOM killer?). Who can confirm this behavior? Should I try different settings (resolution/rate)? Thanks for addressing this issue (like I said, it's the only real issue I have in my setup -- everything else works just great).

jernejsk commented 8 years ago

Don't worry. You are not the only one. However, I would like to ask you few things to speed up debugging:

  1. Can you post crash log somwhere (for example, pastebin)? Please enable debug log before in settings.
  2. Can you reproduce this issue with deinterlacing disabled?
  3. Is the resolution of the channels different when this happen?
markh-de commented 8 years ago

Regarding speedup of debugging, unfortunately I won't get my hands on the hardware before next weekend. But when I'm there, I will happily gather the info you requested.

jernejsk commented 8 years ago

No hurry, take your time. Currently I don't have a slightest idea what could be wrong.

markh-de commented 8 years ago

Hi Jernej. Thanks for looking into this!

1.

Can you post crash log somwhere (for example, pastebin)? Please enable debug log before in settings.

Seems to crash at:

#2 0xb5453ccc in FbmReturnPicture () from /usr/lib/libvdecoder.so

> Stack traces and logs available on Google Drive <

If you require CedarX logs, please tell me how to enable them, and where to find them on the target machine.

2.

Can you reproduce this issue with deinterlacing disabled?

Reproducible with and without deinterlacing (tried with "Enabled" and "Disabled" for all media types). Seems to crash at the same point (check both logs).

3.

Is the resolution of the channels different when this happen?

In my case: No. Same resolution on each zapped channel (HD 720, h.264). Tried zapping forward and backward between very similar channels (same program broadcasted via three different channels for three different German Federal States, identical picture, all on the same DVB-S2 mux). Should I check switching between different resolutions? What do you consider the critical case? Same or different resolution/encoding/... ?

jernejsk commented 8 years ago

Ok, issue is somewhere else. I would need CedarX output. Please follow these steps to obtain it:

  1. connect to board via ssh or serial terminal
  2. close Kodi with "systemctl stop kodi"
  3. run Kodi in console with "/usr/lib/kodi/kodi.sh"
  4. trigger the issue
  5. upload CedarX output from console.
KungfuPancake commented 8 years ago

CedarX output from console: http://pastebin.com/bm8cifdt Kodi crash log: http://pastebin.com/ZA1Yh1Ct

jernejsk commented 8 years ago

What about this update (valid for 14 days): https://transfer.sh/2T4e5/openelec-h3.arm-7.0-devel-20160823231652-r22887-g72d778d.tar

Solution is probably not final due to possible frame drops, but here I'm more interested if it still crashes or not.

KungfuPancake commented 8 years ago

I will try this build tonight and report back.

KungfuPancake commented 8 years ago

Still crashing.

  1. After 4 channel switches with a briefly garbled (green) video output, then black after 2 seconds. Output: http://pastebin.com/J6fdVVPM
  2. After 2 channel switches, non-garbled video output, frozen image/interface. Output: http://pastebin.com/LTjb1W4w
  3. After 8 channel switches, solid green video output, frozen image/interface. Output: http://pastebin.com/CFQ7AtLG
jernejsk commented 8 years ago

Please test this image (available for 14 days): https://transfer.sh/gVlO2/openelec-h3.arm-7.0-devel-20161016143930-r23108-g97f809b.tar

Allwinner published new CedarX drivers which have slightly different memory management.

KungfuPancake commented 8 years ago

Problem still exists, green/purple noise and frozen screen after 4-5 channel switches.

magicse commented 8 years ago

OPi2 work well

KungfuPancake commented 8 years ago

Which Image did you use?

jernejsk commented 7 years ago

Another image to test (available for 14 days): https://transfer.sh/aMDip/openelec-h3.arm-7.0-devel-20170112235053-r23261-ge328780e4.tar

Please report.

KungfuPancake commented 7 years ago

I was unable to test images for some time. Please re-upload - I'll test ASAP.

jernejsk commented 7 years ago

Unfortunatelly I removed everything related to this project from my computer and moved to other projects...