🐞 Crash when editing the search field in the keybind action picker

Open Beginner friendly
#1,187 4 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@NicoCorini is already working on this.

Since Oct 27, 2026.

  • #1193 by @NicoCorini — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
swift
Domain
desktop

Research direction

Start with DirectionPickerView.computeSearchResults() and DirectionPickerView.fuzzyScore, identified by the crash trace and the reporter’s suspected index mismatch. Reproduce by typing in the action picker search field and deleting until it is empty. Check the search result handling and run the relevant project tests; done when clearing the field restores the full action list without crashing.

Written by the indexing model from the issue text.

Description

Bug
Bug Description

Loop crashes when I type in the search field of the action picker for a new keybind and then delete the text until the field is empty.

Affected Scope

Crash / Freeze

Steps to Reproduce
  1. Settings → Keybinds → Add
  2. Click the action button ("No action") to open the picker
  3. Type a few letters in the search field, then delete them until the field is empty
  4. Loop crashes

On 1.4.2 it crashed 3/3 times. On 1.4.3 the first keybind worked, then it crashed while I was adding the second one.

Reproducibility

Always

Expected vs Actual Behavior

Expected: the search clears and the full action list shows again.
Actual: Loop crashes with SIGILL (Swift fatal error in String.subscript.getter).

Screen Recordings / Screenshots

No response

Severity

Major (workaround exists)

macOS Version

Sequoia 15.8.1 (24H32)

Loop Version

1.4.3 (1783) dev build (also on 1.4.2 (1693))

Did You Try the Development Build?

Yes

Additional Context
  • Intel MacBook Pro (MacBookPro15,2), UI language Italian, external display LG UltraGear 3440×1440 with better display (mac can't stand the 5k2k resolution)

  • Crash report (main thread, 1.4.3):

    • Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
    • Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
    • 4 libswiftCore.dylib fatalErrorMessage(:_:file:line🎏) + 46
    • 5 libswiftCore.dylib String.subscript.getter + 715
    • 6 Loop <deduplicated_symbol> + 464
    • 7 Loop DirectionPickerView.computeSearchResults() + 401
    • 8 Loop partial apply for closure #4 in DirectionPickerView.body.getter + 16
  • Possibly related: in DirectionPickerView.fuzzyScore, pIndex = text.index(after: pIndex) advances the pattern's index using text. It probably should be pattern.index(after: pIndex). I haven't verified that this is the cause.

  • AI disclosure: I used Claude to read the crash report, look at the source code and draft this issue. I reproduced the crash myself and reviewed the text.

Final Checks
  • My issue is written in English.
  • My issue title is descriptive.
  • This is a single bug (multiple bugs should be reported individually).
  • I have looked to see if this is a duplicate of another bug report.
  • I can help with further investigation.
  • I can help with developing a fix for this issue.
Dominant language
Swift
Stars
11.9k
Forks
287
Avg merge
17h 7m
Merged PRs (30d)
5

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mrkai77/Loop

All issues in mrkai77/Loop

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.