Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: OSD "ERROR: attempt to open OSD while it is alreadyopen!"
Nicolas Huillard wrote:
>
> Nicolas Huillard wrote:
> > Achim Tuffentsammer wrote:
> >
> >> Nicolas Huillard wrote:
> >>
> >>> Since cOsdProvider::NewOsd() can return NULL, osd->anything shouldn't
> >>> be called without testing.
> >>> I simply cannot decide how to handle the case, since we are in the
> >>> constructor cSkinSTTNGDisplayMessage::cSkinSTTNGDisplayMessage and
> >>> many methods after that will try to use the osd property, and
> >>> crash... The cSkinSTTNGDisplayMessage should simply abort it's
> >>> construction, but I don't know how to write it in C++...
> >>
> >> Why don't you simply return from the constructor after NewOsd returns
> >> NULL?
> >> There was a patch posted some days ago concerning this problem:
> >>
> >> http://www.linuxtv.org/mailinglists/vdr/2004/07-2004/msg00520.html
> >
> > I started from this post and the answer from Klaus, and went Klaus's
> > way. See attached patch.
> > This patch solve the problem, whatever skin is used. The other way would
> > involve patching every skin, to check the return value of
> > cOsdProvider::NewOsd(), that can be NULL. This fix would be necessary,
> > but involve each and every method of all skins around... I'm just lazy.
>
> Lazyness was not the Good Thing this time... This patch effectively
> disables confirmation prompts shown when deleting a recording, a timer,
> etc...
> So a huge inventory of all osd checks before calling osd->Method() will
> be necessary.
Don't bother. I'll change this so that a skin can always rely on
getting a valid (but maybe dummy) osd object to write to. I'll also make
sure that no skin functions will be called if an osd object is already
active. Checking the osd pointer in each and every skin seems like
overkill. And besides, this would only cure the symptom, not the cause.
Klaus
Home |
Main Index |
Thread Index