Jump to content


Member Since 20 Sep 2012
Online Last Active Today, 15:56

Topics I've Started

Menu: createMenuList assertation fails

17 March 2018 - 13:15


When I am building enigma2 on Ubuntu (trusty) and trying to display menu (using spacebar) it crashes because of an assertion error.
crashdate=Sat Mar 17 12:14:39 2018
compiledate=Mar 17 2018

kernelcmdline=BOOT_IMAGE=/boot/vmlinuz-4.4.0-112-generic root=UUID=c21559dd-2ca1-4b52-af0d-eb13c8f3ca60 ro vga=792
imageissue=Ubuntu 14.04.5 LTS

Traceback (most recent call last):
  File "/usr/local/lib/enigma2/python/Components/ActionMap.py", line 46, in action
    res = self.actions[action]()
  File "/usr/local/lib/enigma2/python/Screens/InfoBarGenerics.py", line 876, in mainMenu
    self.session.openWithCallback(self.mainMenuClosed, MainMenu, menu)
  File "/usr/local/lib/enigma2/python/mytest.py", line 287, in openWithCallback
    dlg = self.open(screen, *arguments, **kwargs)
  File "/usr/local/lib/enigma2/python/mytest.py", line 297, in open
    dlg = self.current_dialog = self.instantiateDialog(screen, *arguments, **kwargs)
  File "/usr/local/lib/enigma2/python/mytest.py", line 240, in instantiateDialog
    return self.doInstantiateDialog(screen, arguments, kwargs, self.desktop)
  File "/usr/local/lib/enigma2/python/mytest.py", line 257, in doInstantiateDialog
    dlg = screen(self, *arguments, **kwargs)
  File "/usr/local/lib/enigma2/python/Screens/Menu.py", line 451, in __init__
    Menu.__init__(self, *x)
  File "/usr/local/lib/enigma2/python/Screens/Menu.py", line 168, in __init__
  File "/usr/local/lib/enigma2/python/Screens/Menu.py", line 283, in createMenuList
  File "/usr/local/lib/enigma2/python/Components/Sources/List.py", line 102, in updateList
    assert len(list) == len(self.__list)
So on Screens/Menu.py init we are starting with an empty list and then call createMenuList.
                self["menu"] = List([])
                self["menu"].enableWrapAround = True

But on Sources/List.py we accept lists with the same lenghts!
        def updateList(self, list):
                """Changes the list without changing the selection or emitting changed Events"""
                assert len(list) == len(self.__list)
Of course when assert is comment out, menu is displayed without issues.

But, why we are not getting this problem on our boxes?

Since menu starts with [] and createMenuList adds the real menu elements, assert should always fail the first time!

Obviously it works on enigma2 receivers, but how? What adds values to __list between List([]) and self.createMenuList()?