Skip to content

fix(tui): avoid NoMatches exception when SelectionList is missing on key events. - #4780

Open
hrshtmk wants to merge 1 commit into
archlinux:masterfrom
hrshtmk:fix/select-list-crash
Open

hrshtmk wants to merge 1 commit into
archlinux:masterfrom
hrshtmk:fix/select-list-crash

Conversation

@hrshtmk

@hrshtmk hrshtmk commented Sep 20, 2026

Copy link
Copy Markdown

Summary

Fixes an unhandled NoMatches crash when key events (such as Backspace) occur on a SelectListScreen while SelectionList is not mounted or active.

Problem

In archinstall/tui/components.py, SelectListScreen.on_key() previously called self.query_one(SelectionList) directly. If a keystroke arrives during rapid navigation or screen dismissal, an unhandled NoMatches exception is thrown, causing archinstall to crash:

NoMatches: No nodes match 'SelectionList' on SelectListScreen()
Stack Trace
  • Note : This crash happened when I was installing arch on my own physical hardware. Triggering the timing window inside a QEMU VM was difficult to replicate on demand due to input latencies, but the trace proves the unhandled exception path.

Fix

Updated SelectListScreen.on_key() to query SelectionList using .query().first():

selection_list = self.query(SelectionList).first()
if not selection_list or not selection_list.has_focus or event.key != 'enter':
    return

@hrshtmk
hrshtmk requested a review from Torxed as a code owner September 20, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant