Opened 4 years ago
Closed 3 years ago
Last modified 3 years ago
Closing a screen when using the Qt painter can segfault
|Reported by:||paulh <mythtv@…>||Owned by:||paulh|
|Component:||MythTV - User Interface Library||Version:||Master Head|
This has been observed when closing the volume popup in MythMusic but could affect any screen. To reproduce change to the Qt painter then:-
- Change the volume in MythMusic which shows the volume popup dialog.
- Immediately press ESCAPE to close the dialog.
What's happening is
- The keypressEvent gets passed to MythMusicVolumeDialog::keyPressEvent() which in turn passes it to MythScreenType::keyPressEvent()
- MythScreenType::keyPressEvent() then calls MythScreenType::Close() which then calls MythScreenStack::PopScreen?()
- Because we are using the Qt painter there is no fade effect or animation to do so the screen gets deleted right away in PopScreen?().
- At this point we return to MythMusicVolumeDialog::keyPressEvent() of the now deleted screen where any access to any members is going to segfault which is what happens in this case.
A simple generic fix would be to change in MythScreenStack::PopScreen?()
so the keypressEvent handlers could complete safely before the screen is eventually deleted when control returns to the event loop.
Change History (5)
comment:1 Changed 3 years ago by paulh <mythtv@…>
comment:2 Changed 3 years ago by Paul Harrison <mythtv@…>
- Resolution set to fixed
- Status changed from new to closed
comment:3 Changed 3 years ago by wagnerrp
- Milestone changed from unknown to 0.27
comment:4 Changed 3 years ago by Paul Harrison <mythtv@…>
comment:5 Changed 3 years ago by paulh
- Milestone changed from 0.27 to 0.26.1
- Owner changed from stuartm to paulh