[mythtv-commits] Ticket #12387: Invalid notifications screens added to stack prevent exiting playback
MythTV
noreply at mythtv.org
Wed Apr 29 10:31:52 UTC 2015
#12387: Invalid notifications screens added to stack prevent exiting playback
----------------------------------+-----------------------------
Reporter: stuartm | Owner: stuartm
Type: Bug Report - General | Status: accepted
Priority: major | Milestone: 0.28
Component: MythTV - General | Version: Master Head
Severity: high | Resolution:
Keywords: | Ticket locked: 0
----------------------------------+-----------------------------
Comment (by Roger Siddons <dizygotheca@…>):
This was caused by commits ccde7292, 6350a12a & 3016a7be.
Effects are;
1. Notifications are not displayed on playback window
2. Notifications displayed on main menu are shown once but not re-
displayed when they re-occur.
The assignment-operator is invoked in 2 places;
1. When a notification is removed from display (by expiry or
acknowledgement) it is copied to the suspended store for re-use if/when
the notification re-occurs (I'm not sure why). Theme elements should be
cleared as the theme may have have changed the next time it occurs.
Setting the created flag prevents the notification from re-loading the
theme on subsequent occurrences. As the theme elements remain
unintialised, the notification will fail to be re-displayed after its
first occurrence. Presumably this caused the ESC key consumption issue (I
haven't checked).
2. Notifications on the playback window are stored in the 'converted'
member to account for different OSD resolutions. When displayed, they are
refreshed on each frame with the latest metadata. Here, the created flag
should be reset so that the OSD loads the theme on first display, then
left set to prevent repeated re-loading. 6350a12a repeatedly reset the
flag, causing playback performance issues due to theme re-loading on every
frame. 3016a7be initialises the flag as set so that the notification is
never displayed and ESC is consumed, as in (1).
ccde7292 also incorrectly allocated new timers, causing a small memory
leak although seemingly no other adverse effects.
The confusion arose because the assignment-operator was intended/used to
update selected members only, to which cppcheck (correctly) objected.
This patch;
1. Detaches the copy-constructor from the assignment-operator (where it
was initialising twice) so that suspended notifications re-load the theme
and are displayed when they re-occur.
2. Changes the assignment-operator to a member function, where its
selective update is acceptable and more obvious.
Tested with basic notifications (Backend disconnected, No file found) but
not the more exotic ones (progressbar, music etc.)
--
Ticket URL: <https://code.mythtv.org/trac/ticket/12387#comment:3>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list