Crash when cancelling "Restore backup" during recording

Issue #552 resolved
Wade Coxon created an issue

The GUI will crash and restart if a user chooses to cancel a settings restoration action due to there being a recording in progress.

Reproduction steps:

Start a recording.

Select MENU->Setup->Software management->Restore backup

Select "Yes" to the prompt to restore and reboot

Select "No" to the warning prompt regarding the recording in progress.

Crash occurs on both the 4.4 series and 16.1 series firmware.

Comments (3)

  1. prl

    The cause of the crash is that Plugins.SystemPlugins.SoftwareManager.BackupRestore.RestoreScreen and ...RestoreMenu don't handle the case of Screens.Standby.TryQuitMainloop closing without rebooting.

    There are other manifestations of the bug.

    E.g. follow MrQuade's instructions above, and then when the GUI has restarted after the crash, do:

    Make sure no recordings are running.
    MENU>Setup>Software management>Restore backup
    Select "Yes" to the prompt to restore and reboot
    Crash.
    

    And another one (reboot before trying this if the above crash is happening):

    Start a recording.
    PLUGIN>Software Management>Advanced options>Advanced restore
    Select backup file, OK.
    Select "Yes" to the prompt to restore and reboot
    Select "No" to the warning prompt regarding the recording in progress.
    Exits back to Advanced options screen as expected.
    EXIT, EXIT, EXIT back to live TV
    Make sure no recordings are running.
    

    Then either:

    PLUGIN>Software Management>Advanced options>Advanced restore
    Select backup file, OK.
    Crash.
    

    or

    MENU>Setup>Software management>Restore backup
    Select "Yes" to the prompt to restore and reboot
    Crash.
    

    When in the state where the crashes that happen immediately on starting a backup, even when there is no recording running, the crashes will continue will continue until either /tmp is cleared by a reboot, or soft link /tmp/enigma2settingsbackup.tar.gz is removed manually.

    I think I know how to fix it, but I haven't tried it yet.

  2. Peter Urbanec

    Fix bug #552: Crash when cancelling "Restore backup" during recording

    This fix also addresses the related issues mentioned in the issue tracker comments for the bug.

    [RestoreMenu, RestoreScreen]

    Use Session.openWithCallback() to open the TryQuitMainloop window so that the soft link to the backup file in "/tmp/enigma2settingsbackup.tar.gz" is cleaned up if TryQuitMainloop closes instead of rebooting.

    Add new method cancelled() to both classes to handle the cleanup.

    Ensure that any old soft link to the backup file in "/tmp/enigma2settingsbackup.tar.gz" is removed before the new link is created.

    Put code handling symlinks into functions. Clean up path construction in getBackupPath().

    [RestoreScreen]

    Call RestoreScreen.startRestore() from self.onFirstExecBegin instead of from self.onShown, so that startRestore() is only called once when RestoreScreen is opened.

    → <<cset caf67f169922>>

  3. Log in to comment