Klaus Schmidinger | 1 Aug 2005 16:11
Picon
Favicon

Re: [PATCH] fix segfault in cSkins::Message

Wolfgang Rohdewald wrote:
> On Sonntag 31 Juli 2005 18:29, Klaus Schmidinger wrote:
> 
>>>Does vdr have a way to notice if a background thread accesses the
>>>OSD?
>>
>>A background thread should never access the OSD directly.
> 
> 
> I do understand that. I just think it might be helpful to not
> simply say it is forbidden but to enforce it instead of
> segfaulting.
> 
> Considering the enormous amount of plugins there will always be
> some plugin developers trying to do forbidden things and if a
> user tells them "sometimes vdr restarts but I have no idea why"
> it is almost impossible to debug that.
> 
> If you take my original two patches you could do
> 
>  void cSkinClassicDisplayMessage::Flush(void)
>  {
>   if (osd)
>          osd->Flush();
>   else
> 	     warn: background thread is not allowed to access osd
>  }

You don't _know_ that this is because of a background thread.
Besides, I'd hate to have to check 'osd' all over the place
(Continue reading)

Klaus Schmidinger | 27 Nov 2005 17:28
Picon
Favicon

Re: [PATCH] fix segfault in cSkins::Message

Klaus Schmidinger wrote:
> Wolfgang Rohdewald wrote:
> 
>> On Sonntag 31 Juli 2005 18:29, Klaus Schmidinger wrote:
>>
>>>> Does vdr have a way to notice if a background thread accesses the
>>>> OSD?
>>>
>>>
>>> A background thread should never access the OSD directly.
>>
>>
>>
>> I do understand that. I just think it might be helpful to not
>> simply say it is forbidden but to enforce it instead of
>> segfaulting.
>>
>> Considering the enormous amount of plugins there will always be
>> some plugin developers trying to do forbidden things and if a
>> user tells them "sometimes vdr restarts but I have no idea why"
>> it is almost impossible to debug that.
>>
>> If you take my original two patches you could do
>>
>>  void cSkinClassicDisplayMessage::Flush(void)
>>  {
>>   if (osd)
>>          osd->Flush();
>>   else
>>          warn: background thread is not allowed to access osd
(Continue reading)

Luca Olivetti | 27 Nov 2005 19:44

Re: [PATCH] fix segfault in cSkins::Message

En/na Klaus Schmidinger ha escrit:
> 
> Well, after a weekend of consideration I decided to implement
> a function that can be used by background threads to queue a
> message for display (the thread can even wait for user input)
> in VDR 1.3.37. Since a plugin's MainMenuFunction can
> now (since VDR 1.3.32) be launched programmatically, a plugin that
> wants to do more than just display a message can always launch
> itself and interact with the user in the foreground.

It isn't working really well for my use case (dish position): while the
dish is moving I'm trying to call QueueMessage either with Seconds=0 and
Seconds=-1. Timeout is -1 (so that vdr should display the message no
matter what). Instead of a steady message with the position updating in
real time I just see a flash with the (same) position for a couple of
messages, then the message disappears to show a new one with a new position.

> 
> I've abandoned the idea of implementing something like cPlugin::Popup()
> because it would only make things very complicated.

this one would have worked :-(

Bye
--

-- 
- Yo también quiero una Europa libre de Patentes de Software  -
- I want a Software Patents Free Europe too! And you?         -
---------------------------------------------------------------
  EuropeSwPatentFree - http://EuropeSwPatentFree.hispalinux.es

(Continue reading)

Luca Olivetti | 27 Nov 2005 19:49

Re: [PATCH] fix segfault in cSkins::Message

En/na Luca Olivetti ha escrit:
> It isn't working really well for my use case (dish position): while the
> dish is moving I'm trying to call QueueMessage either with Seconds=0 and
> Seconds=-1. Timeout is -1 (so that vdr should display the message no
> matter what). Instead of a steady message with the position updating in
> real time I just see a flash with the (same) position for a couple of
> messages, then the message disappears to show a new one with a new position.

that should read "for a couple of seconds".

Bye
--

-- 
- Yo también quiero una Europa libre de Patentes de Software  -
- I want a Software Patents Free Europe too! And you?         -
---------------------------------------------------------------
  EuropeSwPatentFree - http://EuropeSwPatentFree.hispalinux.es

_______________________________________________
vdr mailing list
vdr <at> linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

Gmane