[VirtualKeyBoard] Crash on language change

Issue #539 resolved
prl created an issue

If the selection box in VirtualKeyBoard is set on one of the right-hand "keys" in the bottom row and YELLOW Change language is pressed to change to a different keyboard language, the GUI can crash.

The problem is that VirtualKeyBoard.markSelectedKey() doesn't ensure that self.previousSelectedKey is in the legal range for the language's keyboard before using it for indexing. Changing the language can change the legal range of the keyboard index.

Replication steps

Open an instance of VirtualKeyBoard, e.g. MENU>Setup>Network>Mount manager>Change hostname. Stay in the default language (en_EN).

Use the arrow keys to move the selection square (white highlight square) to one of CLR, OK or EXIT on the right-hand end of the bottom row.

Press YELLOW Change language.

Crash.

Comments (2)

  1. Peter Urbanec

    Fix bug #539: [VirtualKeyBoard] Crash on language change

    In VirtualKeyBoard.markSelectedKey(), ensure that self.selectedKey is in the correct index range before using it for indexing.

    → <<cset 70dae159049c>>

  2. Log in to comment