[OLD/CLOSED] PseudoTV Live - Set-Top box solution
(2014-12-09, 20:20)windsorguy1979 Wrote:
(2014-12-09, 18:20)Lunatixz Wrote:
(2014-12-09, 16:24)windsorguy1979 Wrote: I recently upgrade to 0.5.6c and I gotta say this addon has improved dramatically in both stability and featureset over the last couple of month, great work Luna, very impressive.
Code related question for you Luna, in FileAccess.py, what is the intent of the refreshLocks method? I've been having a strange issue on my FireTVs and I think it's related to that method. Long story short, my system works great for a seemingly random period of time and then it becomes unstable and can't play any videos either via PSTVL or direct launching. Any attempts to play a video just bring up the XBMC loading indicator and the video never starts (no buffering, just never starts). Checking the log shows that the request to start the video happens, but it just doesn't start.
After some digging, I believe on the FireTVs that the refreshLocks method is spinning up threads that never return and eventually there aren't enough system threads available to even start up a video which is why I spin like this. Restarting XBMC (not the whole FireTV) temporarily solves the issue. A couple of weeks ago I put a return statement at the top of the refreshLocks method so that the refreshLocksTimer doesn't get reset and no more threads get spun up. This has solved my issue and my system is good to go, or at least appears to be. I'm curious what this method is for and if I may have caused downstream side effects that I haven't noticed yet. Thanks!

If you don't mind me asking... what makes you believe this has anything to do with your problem? other then you see a print of it on your log? Just wondering...

Anyway, refreshLock doesn't call new threads, then abandon them. It's only called once, and doesn't run more then one thread.

Debugging by guessing Wink. refreshLocks is the only thing active in my logs when this issue starts and returning False right away was the only change I made and seems to have solved my issue. Python isn't my bread and butter but I was looking at "self.refreshLocksTimer = threading.Timer(4.0, self.refreshLocks)" and thinking that was spinning up a new thread but not seeing anything to kill the old thread. I just re-read the timer API that while it is true that it is starting a new thread, the old thread stops when refreshLocks ends. Looking at this now, I'm not sure why this change seems to have corrected my problem. What is this method for anyhow? Not looking for a fix in the codebase, this might be a one-off that I run on my system that works for me for some reason.

It's part of channel sharing and file locking... it runs once, every 4 minutes as designed. If you could send me a log when you experience your problem I could provide further input.
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?


Messages In This Thread
RE: [FORK] - by jcaa6479 - 2013-07-16, 23:25
Re: RE: - by bry - 2013-07-19, 08:42
Audio Muting Consistently ? - by gjwAudio - 2013-08-18, 08:25
PTVL Anomalies... - by gjwAudio - 2013-08-25, 01:15
Help Find The BAD Channel... - by gjwAudio - 2013-08-27, 02:12
RE: - by DLWhittet - 2013-10-13, 02:48
Problems with Pseudo TV Live - by media-mogul - 2013-11-07, 22:45
Setup wifi cam stream - by rebelmaveric19 - 2013-12-12, 00:54
Black Screen - by Antisthenes - 2014-03-03, 02:06
RE: [FORK] - by Lunatixz - 2014-03-25, 18:21
Re: RE: - by Lunatixz - 2014-04-26, 17:10
Update breaks autostart? - by grumpygamer - 2014-07-12, 11:48
Re: RE: Update breaks autostart? - by bry - 2014-07-12, 13:44
PseudoTV Live + HDHomerun Tutorial - by bry - 2014-07-25, 23:17
RE: [FORK] - by tromy - 2014-09-22, 19:14
Custom Live Channel - by GavinCampbell - 2014-11-01, 18:20
Options menu? - by Pendragon445 - 2014-11-02, 20:23
Prevent Stop Button - by GavinCampbell - 2014-11-13, 22:45
RE: [FORK] "PseudoTV Live" w/ LiveTV, InternetTV and added Strm Support - by Lunatixz - 2014-12-09, 20:44
RE: [FORK] - by herpkektop - 2015-02-11, 11:22
RE: [FORK] - by herpkektop - 2015-02-11, 17:55
PseudoTv issue - by adamp237 - 2015-03-02, 03:41
No Guide - Android Arm - by MoRbIdBoY - 2015-03-14, 20:26
Chanel Issues - by BlueKalel - 2015-05-03, 07:23
RE: donation - by gkithes - 2015-06-11, 02:27
RE: donation - by bornagainpenguin - 2015-06-11, 03:55
Channel Sharing Feature Freezing - by RORO-RR - 2015-07-11, 18:48
Logout Mark Read Team Forum Stats Members Help
[OLD/CLOSED] PseudoTV Live - Set-Top box solution45