TV-OUT button causes crash if video mode is set to multi

Issue #608 resolved
Peter Urbanec created an issue
# grep config.av /etc/enigma2/settings
config.av.videomode.HDMI=2160p
config.av.videorate.2160p=multi

Pressing TV-OUT results in crash:

{1469}<  2969.774> KEY: 227 make KEY_SWITCHVIDEOMODE ('TV-OUT',)
{1469}<  2969.775> [ActionMap] GlobalActions videomode_down
{1469}<  2969.943> KEY: 227 break KEY_SWITCHVIDEOMODE ('TV-OUT',)
{1469}<  2969.944> [ActionMap] GlobalActions videomode_up
{1469}<  2969.950> Traceback (most recent call last):
{1469}<  2969.950>   File "/usr/lib/enigma2/python/Components/ActionMap.py", line 51, in action
{1469}<  2969.950>   File "/usr/lib/enigma2/python/Screens/VideoResolution.py", line 31, in vresSelection
{1469}<  2969.950>   File "/usr/lib/enigma2/python/mytest.py", line 337, in open
{1469}<  2969.950>     dlg = self.current_dialog = self.instantiateDialog(screen, *arguments, **kwargs)
{1469}<  2969.950>   File "/usr/lib/enigma2/python/mytest.py", line 274, in instantiateDialog
{1469}<  2969.950>     return self.doInstantiateDialog(screen, arguments, kwargs, self.desktop)
{1469}<  2969.950>   File "/usr/lib/enigma2/python/mytest.py", line 297, in doInstantiateDialog
{1469}<  2969.950>     dlg = screen(self, *arguments, **kwargs)
{1469}<  2969.950>   File "/usr/lib/enigma2/python/Screens/VideoResolution.py", line 86, in __init__
{1469}<  2969.950>   File "/usr/lib/enigma2/python/Screens/VideoResolution.py", line 68, in sortKey
{1469}<  2969.951> ValueError: invalid literal for int() with base 10: 'mul'
{1469}<  2969.951> [ePyObject] (CallObject(<bound method ActionMap.action of <Components.ActionMap.ActionMap instance at 0xb30bf6e8>>,('GlobalActions', 'videomode_up')) failed)

This is probably caused by VideoResolution.sortKey() assuming that the value for the refresh rate will be an integer.

Comments (5)

  1. Peter Urbanec reporter

    @prl

    My proposed fix is to change

            def sortKey(port, mode, rate):
                return (port, int(mode[0:-1]), mode[-1], int(rate[0:-2]))
    

    to

            def sortKey(port, mode, rate):
                return (port, int(mode[0:-1]), mode[-1], rate)
    

    Any objections, or should I leave this to you?

  2. prl

    The proposed fix was

    return (port, int(mode[0:-1]), mode[-1], rate)

    but the actual fix applied was

    return (port, int(mode[0:-1]), mode[-1], rate[0:-2])

    I think the proposed fix is better than the applied fix.

  3. Log in to comment