Channel starting sometimes fails with "no buffer file"

Access your ARGUS TV system from your sofa using Kodi or XBMC (http://kodi.tv/)
Post Reply
planetix
Posts: 172
Joined: Mon Apr 20, 2009 10:13 pm

Re: Channel starting sometimes fails with "no buffer file"

Post by planetix » Sun May 26, 2013 7:50 pm

There's some interaction that happens when the plugin contacts Argus, Argus tunes the channel which in turn generates the buffer file which the client then reads but I really don't think the problem is there. Some weird SMB issue is at play here because the "fixed" client, as Red points out, is nothing more than a hack to keep retrying the buffer file longer. That's all there is to it. It tried, waits, tries, waits, and finally gets it. Works every time. And doesn't happen on Windows. So it's got to be some weird SAMBA thing but I'll be damned if I know what.

Red_F
Posts: 533
Joined: Wed May 19, 2010 10:31 pm
Location: The Netherlands

Re: Channel starting sometimes fails with "no buffer file"

Post by Red_F » Mon May 27, 2013 9:05 pm

This is certainly one of the issues that is making my head ache. Mainly because I just can't get it to fail on any of my systems. And as you know a failing system on your desk is a great way to get to the real underlying problem.

I have been thinking about ways to slightly alter how buffer files are opened, XBMC provides an alternative to the way I currently get the file stats. I may try that one of the upcoming weekends.

Sadly my real job has me flooded with work for a very intensive project. I've gone from 3 days per week to 6 days per week. Many complaints from the family of course :D, but it does not look that it will get better before the end of July...

Luckily I can escape one week at the end of June to go to Madrid and attend the Microsoft TechEd Europe (http://europe.msteched.com/), that is always a fun week.

Cheers,
Fred
Growing old is inevitable. Growing up is optional!

planetix
Posts: 172
Joined: Mon Apr 20, 2009 10:13 pm

Re: Channel starting sometimes fails with "no buffer file"

Post by planetix » Fri May 31, 2013 1:05 am

Can you point me to any docs on the alternative method? I may give it a crack myself, since I have a system I can reproduce the problem on.

unfledged
Posts: 13
Joined: Sat May 04, 2013 1:02 am

Re: Channel starting sometimes fails with "no buffer file"

Post by unfledged » Mon Jun 03, 2013 4:08 am

If you can't point towards documentation, can you let us know the name of the method you currently use to get the stats, and the alternative method? Then we can look up documentation ourselves!

Red_F
Posts: 533
Joined: Wed May 19, 2010 10:31 pm
Location: The Netherlands

Re: Channel starting sometimes fails with "no buffer file"

Post by Red_F » Thu Jun 06, 2013 4:59 pm

I have created a new branch, argus_buffer2 https://github.com/Red-F/xbmc-pvr-addon ... us_buffer2.

If any of you can build this and run it on one of your systems that has the 'no buffer file' issue, I will be very interested in the resulting debug log.

What has changed?

I'm using the XBMC->StatFile() now to determine the size of the .tsbuffer metafile before opening it. For now I left the XBMC->GetFileSize() calls in the internal handling of this .tsbuffer file. And I'm curious if we will see differences.

If there are any, and XBMC->GetFileSize() is flawed somehow, I will update the handling to XBMC->StatFile(). And hopefully that will then prove to be a nice workaround.

In case there are no differences, then we're back to where we were before and the problem is somewhere deep inside the XBMC filesystem handling. Then all we can do is make our clumsy solution permanent in the master branch :(

Let me know your results.

Cheers,
Fred
Growing old is inevitable. Growing up is optional!

unfledged
Posts: 13
Joined: Sat May 04, 2013 1:02 am

Re: Channel starting sometimes fails with "no buffer file"

Post by unfledged » Fri Jun 07, 2013 11:56 am

Thanks for your work. It's hard to be definitive with something like this, due to the fact that the problem can't be reliably recreated, but so far I've not had any "no buffer file" errors using this plugin (Mac 10.8.4 x64, Frodo 12.0). I'll keep trying it over the next couple of day when I get the chance, and keep my fingers crossed!

Red_F
Posts: 533
Joined: Wed May 19, 2010 10:31 pm
Location: The Netherlands

Re: Channel starting sometimes fails with "no buffer file"

Post by Red_F » Fri Jun 07, 2013 12:32 pm

unfledged wrote:Thanks for your work. It's hard to be definitive with something like this, due to the fact that the problem can't be reliably recreated, but so far I've not had any "no buffer file" errors using this plugin (Mac 10.8.4 x64, Frodo 12.0). I'll keep trying it over the next couple of day when I get the chance, and keep my fingers crossed!
Could you post a debug log to pastebin or http://xbmclogs.com/? I'm interested to see if the StatFile() is actually showing that the .tsbuffer creation is delayed yes or no. And if any retries are done etc. etc.

I want to be able to find a proper solution and create a pull request for Team XBMC so that we can be sure that no one is having this problem anymore.
Growing old is inevitable. Growing up is optional!

planetix
Posts: 172
Joined: Mon Apr 20, 2009 10:13 pm

Re: Channel starting sometimes fails with "no buffer file"

Post by planetix » Fri Jun 07, 2013 3:03 pm

Thanks for this Fred! I am going to build and try this today too, I'll post logs.

unfledged
Posts: 13
Joined: Sat May 04, 2013 1:02 am

Re: Channel starting sometimes fails with "no buffer file"

Post by unfledged » Fri Jun 07, 2013 3:28 pm

Red_F wrote:Could you post a debug log to pastebin or http://xbmclogs.com/? I'm interested to see if the StatFile() is actually showing that the .tsbuffer creation is delayed yes or no. And if any retries are done etc. etc.
OK, partial log (just the channel tuning and playback - if you need the full log just say) at http://xbmclogs.com/show.php?id=25567. I tried to recreate the conditions that I would normally expect the no buffer file issue to possibly manifest (connecting via wifi, hdd the buffer file is stored on asleep), so hopefully it's representative.

User avatar
wileecoyote
Posts: 84
Joined: Mon Feb 27, 2012 6:16 pm

Re: Channel starting sometimes fails with "no buffer file"

Post by wileecoyote » Sat Jun 08, 2013 5:14 am

Fred,
My first tests show this version works great. I will continue to test this weekend, but it looks like you nailed it.

The only small issue is the start time of a channel after the first start. The log I have provided here should show the first start is around 1-2 seconds (running on OpenElec 3.0.3), and subsequent starts are around 10 seconds. Again, this is a VERY small issue compared to the buffer issues :)

Log: http://www.dotnetdevelopers.net/XBMC/logs/fredtest.zip

Let me know if you need any other information.

Also, I will post these builds (Linux 32 & 64 bit) on my builds site.

Thanks again!

Edit: Anyone wanting to try this build, you can download from my binaries page (see my signature.) NOTE: THIS IS A TEST BUILD ONLY. TRY AT YOUR OWN RISK!
XBMC PVR Addon Unofficial Builds for Frodo Nightly Builds.
http://www.dotnetdevelopers.net/xbmc/

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests