zynthian / zynthian-issue-tracking

Centralized Issue Tracking for Zynthian Project
https://github.com/orgs/zynthian/projects/1
11 stars 3 forks source link

Zynseq thows error when scrolling through keymaps #646

Closed riban-bw closed 1 year ago

riban-bw commented 2 years ago

Describe the bug Selecting a keymap for a pattern in step sequencer can give an error in the log.

To Reproduce Steps to reproduce the behavior:

  1. Open pattern editor
  2. From menu select "Scale"
  3. Rotate SELECT encoder quickly

Expected behaviour Each keymap is shown.

Actual behaviour Fast scrolling triggers error:

Apr 27 03:35:59 zynthian startx[4410]: ERROR:zynthian_gui.refresh_status: list index out of range
Apr 27 03:35:59 zynthian startx[4410]: Traceback (most recent call last):
Apr 27 03:35:59 zynthian startx[4410]:   File "./zynthian_gui.py", line 1880, in refresh_status
Apr 27 03:35:59 zynthian startx[4410]:     self.screens[self.current_screen].refresh_status(self.status_info)
Apr 27 03:35:59 zynthian startx[4410]:   File "/home/pi/zynthian-ui/zyngui/zynthian_gui_stepsequencer.py", line 583, in refresh_status
Apr 27 03:35:59 zynthian startx[4410]:     self.child.refresh_status()
Apr 27 03:35:59 zynthian startx[4410]:   File "/home/pi/zynthian-ui/zyngui/zynthian_gui_patterneditor.py", line 968, in refresh_status
Apr 27 03:35:59 zynthian startx[4410]:     self.draw_grid()
Apr 27 03:35:59 zynthian startx[4410]:   File "/home/pi/zynthian-ui/zyngui/zynthian_gui_patterneditor.py", line 685, in draw_grid
Apr 27 03:35:59 zynthian startx[4410]:     self.draw_row(index)
Apr 27 03:35:59 zynthian startx[4410]:   File "/home/pi/zynthian-ui/zyngui/zynthian_gui_patterneditor.py", line 593, in draw_row
Apr 27 03:35:59 zynthian startx[4410]:     self.draw_cell(step, row)
Apr 27 03:35:59 zynthian startx[4410]:   File "/home/pi/zynthian-ui/zyngui/zynthian_gui_patterneditor.py", line 617, in draw_cell
Apr 27 03:35:59 zynthian startx[4410]:     note = self.keymap[row + self.keymap_offset]["note"]
Apr 27 03:35:59 zynthian startx[4410]: IndexError: list index out of range

Setup:

Additional context Almost certainly poor handling of encoder acceleration. This has changed recently so probably needs an extra check.

jofemodo commented 1 year ago

Is this fixed?

riban-bw commented 1 year ago

Fixed by recent fixes and optimisations of menu.