2012-12-17, 12:51
Hello!
I found a bug in <control type="panel">.
For example, we have panel control element with 4x2 grid and 10 items in it (1st and 2nd lines contains 4 items each, and last line contains 2 items, see image below).
Also, we have simple xbmcgui.WindowXML based class with onClick like this:
Now, if we click on the empty space to the right of item "9" in last line - XBMC will instantly crash on "getSelectedItem()" without any log entries.
Bug repeats only if you need to scroll to the last line.
Tested on XBMC v11 and v12, on Mac and Android.
Is this known issue?
Minimal working source code to reproduce bug: https://github.com/akari/xbmc-panel-bug
PS, workaround:
I found a bug in <control type="panel">.
For example, we have panel control element with 4x2 grid and 10 items in it (1st and 2nd lines contains 4 items each, and last line contains 2 items, see image below).
Also, we have simple xbmcgui.WindowXML based class with onClick like this:
Code:
class BuggyWindow(xbmcgui.WindowXML):
...
...
def onClick(self, controlId):
if controlId == 200:
print self.getControl(controlId).getSelectedItem()
Bug repeats only if you need to scroll to the last line.
Tested on XBMC v11 and v12, on Mac and Android.
Is this known issue?
Minimal working source code to reproduce bug: https://github.com/akari/xbmc-panel-bug
PS, workaround:
Code:
currentControl = self.getControl(200)
if currentControl.size() > currentControl.getSelectedPosition():
# do work
pass