New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pvr] fix destructor visibility to allow polymorphic deletion #5338
Conversation
This fixes the polymorphic deletion in CGUIWindowPVRBase.
jenkins build this please |
yup, that'll fix it. thanks @FernetMenta for spotting it :) |
[pvr] fix destructor visibility to allow polymorphic deletion
I can't, but no one seems to be interested in argument. I said several times that it didn't solve my issue. One thing I noticed: the crash only happens when I close kodi by exit, but not by shutdown nor by closing the whole window. In the latter cases the dtors are called in another sequence, i.e., CGUIInfoManager is deleted before GUIWindowPVRChannels. |
dtors are called in order of direction to the base class if virtual. assume you have a protected dtor and delete this object. the protected dtor won't be called. now we have our hypothesis was that when object C is destructed, the protected dtor of B breaks the chain so that A won't be called either. |
But the problem is that the object is destructed and not that it is not! |
the dtor of class Observer does already what you added to the dtor of C in your PR. it is supposed to unregister the observer from all observables. if this does not work something other is wrong and needs to be investigated. |
I've described all of my observations in the second last comment. Imo it is the order of destructing objects and I guess no one can enforce the correct order (or prevent that some dev breaks that order in the future) and I therefore proposed that fix. But of course I could be wrong. |
if the order of destruction plays a role, something goes wrong I guess. what are the steps to make it crash?
does not happen here when I click the quit button. |
do you have time to chat (irc)? |
I'm using the vdr plugin with the hash 3949502043d520e4707bc3109abf3c6edb23cf67. |
This is a follow-up of #5334 which fixes the root cause of @ace20022's issue.
@opdenkamp mind taking a look .. if fine i will close the other PR.