Yes.
About your problem.
Once things go awol.
Are the recordings still active on the disk ?
Meaning, are they increasing in size ?
Your problem about tvservice being unresponsive and consuming 100% cpu.
It seems that the recordingdetail is never removed from the collection _recordingsInProgressList.
Like:
_recordingsInProgressList.Remove(recording); //only remove recording from the list, if we are succesfull
Look at:
it has a while (true)
it keeps on iterating the _recordingsInProgressList LIST.
And it keeps on calling; StopRecord
In order to avoid the 100% cpu usage, we need to use a Thread.Sleep(100) before calling "StopRecord" in that loop.
Although this wont stop your main problem, also the logs will still fill up with garbage.
We need to figure out what goes on in:
private void StopRecord(RecordingDetail recording)
...
You could try and add a lot more logging in this method.
Is it a threading issue ?
/gibman
About your problem.
Once things go awol.
Are the recordings still active on the disk ?
Meaning, are they increasing in size ?
Your problem about tvservice being unresponsive and consuming 100% cpu.
It seems that the recordingdetail is never removed from the collection _recordingsInProgressList.
Like:
_recordingsInProgressList.Remove(recording); //only remove recording from the list, if we are succesfull
Look at:
Code:
private void HandleRecordingList()
{
while (true)
{
bool removed = false;
foreach (RecordingDetail recording in _recordingsInProgressList)
{
if (!recording.IsRecording)
{
StopRecord(recording);
removed = true;
break;
}
}
if (removed == false)
{
return;
}
}
}
it has a while (true)
it keeps on iterating the _recordingsInProgressList LIST.
And it keeps on calling; StopRecord
In order to avoid the 100% cpu usage, we need to use a Thread.Sleep(100) before calling "StopRecord" in that loop.
Although this wont stop your main problem, also the logs will still fill up with garbage.
We need to figure out what goes on in:
private void StopRecord(RecordingDetail recording)
...
You could try and add a lot more logging in this method.
Is it a threading issue ?
/gibman