[mythtv-users] Segment Fault in mythfrontend using MythMusic.

Paul Harrison mythtv at sky.com
Sun Jan 27 00:26:15 UTC 2013


On 26 January 2013 23:51, Paul Harrison <mythtv at sky.com> wrote:
>
> On 25/01/13 05:51, Raymond Boettcher wrote:
>
> I've always been one to be a little impatient with dialogs that come up in MythTV.  Generally, I change something and the appearing dialog will interfere with the controls to a show or song.  So, I've always been in the habit of pressing Exit (Escape) to those little popup dialogs that come up in places like Playing a TV Program and the status bar is up.  Generally, MythTV handles this very gracefully and hides the dialog.
>
> Well in MythMusic they change the volume control to appear in the center of the UI unlike the old Music Player that put it off to the side and didn't interfere with the interface.  So now when I change the volume I end up falling back on old habits and press Exit (Escape) to get rid of the volume control itself so I can use the interface.  Well, MythMusic does not like that all all and it will Segment Fault causing the UI to go away.  This Segment Fault has never failed me and should be really easy to reproduce.  Change the Volume while playing Music from inside MythMusic and then immediately press Excape.  This is what gdb has to say about the backtrace.  Keep in mind this is based on a Checkout of MythTV 0.26.0+Fixes from about 4 days ago running on Slackware Version 13.1.
>
>
> I can't reproduce this at all using myth from my fork. The only difference I can think of that may affect this is my version of MythCenter-wide uses animation effects when showing/hiding popup dialogs which will affect the timing. The crash is in Qt so the version of Qt could also be a factor.
>
> Looking at the code I can see how it might crash if the Qt painter is being used but don't know why we don't see it elsewhere.  Are you using the Qt theme painter?
>
> Paul H.



Never mind I can reproduce it if I switch to the Qt painter.

The problem is MythScreenStack is deleting our MythScreenType while we
are still using it when using  the Qt painter. The fix is to change
the delete screen to screen->deleteLater() in
MythScreenStack::PopScreen(). I'm surprised we don't see more crashes
similar to this with other dialogs. I guess it depends what the
dialogs keypressEvent handler does after close() is called either
explicitly or by calling the default handler in MythScreenType. In
this case we try to use a QTimer that has already been deleted by the
time we get to it causing the segfault.

Paul H.


More information about the mythtv-users mailing list