Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: Error handling vs. user friendliness.



Klaus.Schmidinger@cadsoft.de(Klaus Schmidinger)  03.01.05 15:47


>Rainer Zocholl wrote:
>>
>> I had it at least once, that VDR had a problem to tune to
>> a second channel and so it restarts every 30sec.
>> The other 2 recordings were broken that way too,
>> as they had gaps every 30sec...
>> That's not what i expect.
>>
>>>With no recording going on I can watch a replay without
>>>interruption, even when the reception is badly broken due to a
>>>thunderstorm etc...
>>

>If everything is so stable for you, why don't you just completely
>disable the "emergency exit"?

Because i don't know where to do and don't know all reasons
why an emergency exit can occure?
And i assume that simply removing the code will not be sufficient,
as the callers may assume that VDR will reboot, and "forgets"
to free memory etc... 

Too it might make sense to check if another recording 
is running without any problem. (On mixed DVB-S,DVB-T,DVB-C 
systems not unlikely)
In that case an immediately "emergency exit" is the
worst thing to do. The "emergency exit" could be delayed 
until there are no timers running for example.

Too vdr could try to investigate the reason for the
"no more data" condition.

bad weahter?
bad antenna?
dead ARM?
dead driver?

I don't know all reasons why vdr is doing an "emergency exit"
and what could be checked to get a benign reaction.



Too VDR could signal the "emergency exit" to "runvdr" and
checks when the last "emergency exit" occured.
If it was less than 2 minutes ago, vdr could signal a 
"power down emergency exit"(*) as this is often the only way 
to make bad cards working aga, if that was not already 
done in the last 30 minutes.




>Just comment out this sequence in VDR/vdr.c:

>         // Handle emergency exits:
>         if (cThread::EmergencyExit()) {
>            esyslog("emergency exit requested - shutting down");
>            break;
>            }

>Oh, and don't complain if it doesn't do an emergency exit when one
>would have helped ;-)

I don't think that to simply remove that is sufficient.
There must be some error handling as the caller expects
that vdr will be restarted...
Are you sure that there are no such "side effects" like
memory leaks?


But:
Good error handling is a very difficult task!
So it should be the first thing to implement.
At least Apple, inventor of the userfriendlyist OS known, 
wrote that in their programming guides.




Rainer



(*) nvram-wakeup would adjust the wakeup clock so that
the PC is turned off only for 1..2 minutes






Home | Main Index | Thread Index