🐞 Crash when editing the search field in the keybind action picker
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
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 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
- Settings → Keybinds → Add
- Click the action button ("No action") to open the picker
- Type a few letters in the search field, then delete them until the field is empty
- 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
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mrkai77/Loop
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
Bug
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
Bug
Difficulty 4/5 3-5 days Newbie friendliness 55/100
mrkai77/Loop#1191 · 1 reaction ·
Maintainers usually reply within 1 day
-
✨ Prioritize Custom Trackpad Gestures Over Default Radial Menu GesturesPossibly taken @mrkai77 claimed this 16 days ago. OpenFeature
Difficulty 4/5 3-5 days Newbie friendliness 25/100
mrkai77/Loop#1177 · 1 reaction ·
Maintainers usually reply within 1 day
-
Feature
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
swiftlang/swift-markdown#299 ·
-
area: agents follow-up
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
manaflow-ai/cmux#37234 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
bug product / functions
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 61/100
JWhite212/SignalLadder#215 ·
Maintainers usually reply within 1 day