Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: Segmentation Fault with Remote Plugin
Klaus Schmidinger wrote:
> Oliver Endriss wrote:
> > Hi,
> > I wrote a remote control plugin for the NEWSTRUCT+Hauppauge remote
> > control. If this plugin is loaded and vdr terminates (e.g.
> > restart), it crashes with a segmentation fault.
> > ...
> > It appears that the segfault occurres when the remote control
> > objects are destroyed by vdr.
> > The plugin remote class is derived from the cRemote class, but it's
> > not a vanilla cRemote object.
> > The cRemotes class manages a list of cRemote objects.
> > I think that the problem occures because of a type conflict: vdr
> > tries to destroy an object in the cRemotes list which has a wrong
> > type. Could a C++ expert comment on this?
> >
> > Oliver
> >
> > P.S.: After removing the line 'Remotes.Add(this);' in remote.c,
> > the problem disappeared...
>
> Could it be that you delete your cRemote derived object when the
> program ends? From PLUGINS.html:
>
> Note that the object has to be created on the heap (using new),
> and you shall not delete it at any point (it will be deleted
> automatically ********************************
> when the program ends).
I create the object on the heap and I don't delete it anywhere.
(I double-checked with your instructions in PLUGINS.html.)
Meanwhile I did some more tests:
- I created a dummy plugin which is nothing more than the code copied
from PLUGINS.html. It is sufficient to create a object of a class which
is derived from cRemote. --> same problem.
- If I create an object of type cRemote, it works!
- I moved cKbdRemote into a plugin. --> same problem.
- I linked my plugin with the vdr main program --> problem gone!
Therefore, the problem must be related to shared object libraries.
Maybe, some object information is not transported correctly due to
dynamic linking?
Oliver
--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe vdr" as subject.
Home |
Main Index |
Thread Index