Crash in File Commander if unrar isn't installed

Issue #693 resolved
prl created an issue

If the unrar package is not installed, trying to unpack or list the contents of an RAR archive will crash the UI.

The problem is directly caused by the OSError ("[Errno 2] No such file or directory) exception generated in the call of subprocess.Popen() in FileCommander.addons.unrar.RarMenuScreen.checkPW() not being caught.

That problem is unique to the RarMenuScreen unpacker, but there is a similar problem in FileCommander.addons.unrar.RarMenuScreen.unpackPopen().

Replication steps

Ensure that the unrar package is not installed using opkg list-installed unrar. It will output unrar - 5.5.5-r0.2 if unrar is installed, and nothing if it is not.

Uninstall it if it is installed using opkg remove unrar.

unrar is not installed by default.

Create a file on the Beyonwiz with a .rar extension. Its contents don't matter, because unrar isn't installed to unpack it.

From live TV, MENU>Sources / Files, navigate to the file, and press OK, then select any operation on the file in the popup. Crash.

Comments (2)

  1. Peter Urbanec

    Fix Bug #693: Crash in File Commander if unrar isn't installed

    Catch exceptions when subprocess.Popen() is called in RarMenuScreen.checkPW() and ArchiverMenuScreen.unpackPopen(). Open a MessageBox and print a message to the debug log on an exception.

    Also protects from crashes in ArchiverMenuScreen.unpackPopen() if other archive unpacker programs are missing.

    Add a couple of other debug prints.

    → <<cset 51858d88d050>>

  2. Log in to comment