[InfoBarExtensions] Unnecessary instances of AutoTimer and AutoPoll created

Issue #626 resolved
prl created an issue

If long-GREEN is used to open the AutoTimer overview list, Screens.InfoBarGenerics.InfoBarExtensions.showAutoTimerList() is called, and instead of it acting on the master instances of Plugins.Extensions.AutoTimer.plugin.autotimer and autopoller to open the AutoTimer overview list, it creates new instances of AutoTimer and AutoPoller and operates on them.

The attempts in the original code to stop the AutoPoller while editing fail because they only stop the new instance of AutoPoller, not the one in the plugin.

The unnecessary instance of AutoPoller also continues polling in parallel with the master instance, so that for the default 30 min AutoTimer poll time, the AutoTimer is polled an extra time in each interval, starting 30 minutes after the AutoTimer overview list is exited. In combination with bug #625, the AutoTimer is polled 3 times every poll interval if the showAutoTimerList() method is called.

Each time showAutoTimerList() is called, new instances of AutoTimer and AutoPoller are created, but the old ones are destroyed, so that the time within the poll cycle where the additional poll takes place changes, but an additional poll isn't added.

In Beyonwiz firmware, because config.vixsettings.ColouredButtons is always False, showAutoTimerList() isn't called via the ActionMap in InfoBarExtensions. Instead, it is called on long-GREEN via Screens.ButtonSetup.ButtonSetupKeys.

Replication Steps

Enable debug logging and reboot the PVR's UI with long-POWER>Restart GUI.

As soon as the UI is running, use long-GREEN in live TV to open the AutoTimer overview list, and then exit it. This starts the extra polling.

Allow the PVR to do a few AutoTimer polls, and the in the commandline interface run grep 'current auto poll' with the current log file as an argument. If bug #625 is still active, the pattern of: "poll, delay, poll, delay, poll, delay" should be apparent with the default 30-minute poll interval. If bug #625 has been fixed, there will be two polls per normal poll interval.

Comments (3)

  1. Peter Urbanec

    Fix Bug #626: [InfoBarExtensions] Unnecessary instances of AutoTimer and AutoPoll created

    Rewrite the code for the actions on long-GREEN (called via Screens.ButtonSetup.ButtonSetupKeys) to use the plugin descriptors to find the function to call rather than by creating unnecessary new instances of the AutoTimer and AutoPoller.

    → <<cset 51da4f2f8766>>

  2. Log in to comment