Kodi Community Forum

Full Version: CPU spikes after playing videos for a bit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've picked up a problem on Frodo RC3 that manifests a random distance into different video files. I have a Zotac ION2 based HTPC running Win7 32 bit plugged into a LG A/V receiver via HDMI, Sound is properly configured as per the FAQ and I don't have the immediate stuttering issues. Videos start playing fine with good sound.

At a random point, between 15 minutes at one point and an hour at the longest, the video starts to slow down, 2-3 seconds of either freezeframe or slideshow, then it returns to normal speed for a few seconds. Initially I paused and resumed, or stopped and played on and that solved the problem. Earlier I alt-tabbed out of XBMC to look at the processor load in Task Manager and it returned to normal when I returned. Task Manager shows 100% CPU for the period and then drops to 5% when playing normally.

Eden does not do this on the same files. Drivers are the latest, I'm running WASAPI out via the NVidia device, exclusive mode is set and the correct sound formats are supported. My videos are shared over a 1Gbit network, but that has been the case since before Eden and I only get the problem with Frodo.

Any suggestions please?
Debug logs (wiki) needed.
Ran it with debugging on for two videos, neither produced the 100% load while debugging was on. I did observe an increase on the CPU % load from 6% to 32% at 20:26 with the first video and 21:15 with the second that remained until the videos ended. Windows reports 4 processors, so one hyperthreaded processor was being maxed. Debug logs attached.

With debugging off afterwards, the problem recurred. I am going to run Process Monitor to log what processes are doing what at the time.

Part 1 http://pastebin.com/QFZrwSDT
Part 2 http://pastebin.com/TDU6c3e2
Update, with problem identified, but not root cause. Windows Security Essentials is causing the load problem by deciding to run. It is configured to run a scheduled scan at a specified time, but only to do so when the PC is idle. When Frodo is running and playing a video, it decides the machine is idle and runs the scan. When Eden is running, WSE doesn't detect an idle state and run the scan.
This should help prevent WSE from kicking in and should be included for Frodo final: https://github.com/xbmc/xbmc/pull/2068
I pulled the nightly build after the pull request went into xbmc:master and after returning WSE to its automatic scanning configuration, so far it has not started scanning my HTPC while videos are playing. The fix seems to be working as suggested. If it recurs, I will inform you.
Sounds great, thanks for the feedback.