Mailing List archive

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

[vdr] Re: Bugfix-patch for the show replay mode -crash



"Dr. Werner Fink" wrote:
> 
> On Thu, Jul 29, 2004 at 12:13:09AM +0300, Kimmo Tykkala wrote:
> > Hi,
> >
> > On Wed, 28 Jul 2004, Achim Tuffentsammer wrote:
> > > Kimmo Tykkala wrote:
> > >
> > > >Press fast-forward/rewind/pause button while the menu is on.
> > > >VDR crashes immediately and writes the following line to the
> > > >/var/log/messages -file:
> > > >Jul 27 21:16:42 tiivitaavi vdr[2684]: ERROR: attempt to open OSD
> > while
> > > >it is already open!
> > > >
> > > >If the "show replay mode" is turned off, the crash won't happen.
> > > >
> > > >
> > > I can confirm this crash. When this error occurs cOsdProvider::NewOsd
> > > returns NULL. There are several places in the source code where this
> > is
> > > not checked for NULL.
> > >
> >
> > attached is a small fix for the bug described above.
> >
> > The fix is a couple of NULL-checkings before the skins try
> > to show the replay mode -indicator on screen. With the fix the
> > replay mode will change, but VDR does not try to show the changed
> > replay mode if the screen is already occupied by the menu.
> >
> > The patch is written for 1.3.12 and it fixes both the classic and new
> > VDR-skin.
> 
> Nice patch ... but one point more, IMHO after the delete od the osd
> you should set it to NULL:
> 
>           if ( osd != NULL)
>              delete osd;
>           osd = NULL;
> 
> only to be sure that the checks about the existence of the osd remains
> even after the first run.

If I'm not mistaken, this "delete" is done in the destructor, so there really
isn't anybody going to use the 'osd' pointer any more ;-)

Klaus




Home | Main Index | Thread Index