Excessive script time relaunch

James Sentman james at sentman.com
Mon Apr 20 10:02:16 EDT 2020


I used to have the problem once a year with weatherman, but lately it’s been perfect so I’m not sure what it was. if you’re still having that problem I would add with timeout blocks around the parts of the script that talk to it and catch the timeout error to do a log or an alert or email or something to let you know it’s hung up.

As far as Video Pitcher is concerned, it will use a lot of CPU if it’s saving movies or receiving streams with a high framerate. It should share nicely with XTension though it is possible for it to slow things down it shouldn’t be able to really hang up the whole machine for any length of time. If your scripts are already taking 99% of the time before that message is logged and then they overlap with the finalizing of a large movie to disk that could push it over the edge.

There is another way that Video Pitcher can cause the machine to hang up for a while though. VP offloads a lot of the image processing load of each frame to the GPU and it turns out that if you send the GPU certain kinds of corrupt image data it will cause the whole machine to hang up or a while. I can’t pre-validate the image data without actually decompressing the image which I’d have to do on the main CPU and then there would be no point of sending it to the GPU for decompressing and processing a second time. it has been a hard thing to completely fix. I do have a check in there to throw out frames that are hugely different in size data wise than the previous frame looking for a goofy frame. But that also can throw away frames when there are huge changes in what is displayed which is also a problem. I think the setting is usually a good compromise between dropping frames unnecessarily and hanging up the machine, but both can still happen. There should be an error in the XTension log about the VP process taking too long, or a timeout error on frame processing or something like that. Sorry I can’t remember exactly what it is I log without digging out that source code. But if you find such an error in the log around the same time that your other scripts are throwing errors then you might be able to narrow it down to a specific camera that is having trouble or find something else that I can use to help sort that out better in future versions.

And sometimes it will be cryptogenic. Our computers are too unpredictable and are doing too many things we know nothing about all the time to be completely deterministic on how long any one task is going to take!



> On Apr 20, 2020, at 9:04 AM, Tom Yarmas <tom at yarmas.com> wrote:
> 
> The only things I have ever had as run away processes that cause my XTension system to be a problem have been Weatherman and Video Pitcher. The former more than the latter, but both way too frequently.
> 

Thanks,
 James


James Sentman                       http://www.PlanetaryGear.org		http://MacHomeAutomation.com




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.machomeautomation.com/pipermail/xtensionlist/attachments/20200420/e9e9a8ef/attachment.html>


More information about the XTensionList mailing list