Flow-Launcher / Flow-Launcher/Flow.Launcher
BUG: NullReferenceException in QueryTextBox_KeyUp during rapid Dialog Jump input (2.1.3)
- Dominant language
- C#
- Stars
- 15.6k
- Forks
- 644
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 4
Description
### Description
Flow Launcher 2.1.3 threw an unhandled `NullReferenceException` in `MainWindow.QueryTextBox_KeyUp` while its query box was receiving rapid keyboard input during a Save As / Dialog Jump workflow.
This happened during a repeated keyboard-only stress test:
1. Open a native **Save As** dialog.
2. Open Flow through **Dialog Jump**.
3. Focus `QueryTextBox` through Windows UI Automation.
4. Send `Ctrl+A`, type a folder query, wait about 700 ms, then press Enter.
5. Repeat across consecutive Save As dialogs.
The exception appeared once during the 15-session run. The external helper did not write directly to Flow's internal state; it focused the query control and sent normal keyboard input. That timing may nevertheless be relevant to reproducing the race.
### Expected behavior
The query key-up handler should tolerate the result/query state changing during rapid focus and keyboard transitions.
### Actual behavior
Flow displayed an unhandled exception and the stress run stopped progressing.
### Environment
- Flow Launcher: 2.1.3
- Windows: 10.0.19045.7417
- Process: x64
- `IntPtr` length: 8
- Python: `PythonEmbeddable-v3.11.4\pythonw.exe`
- Node path: empty
- Time: 2026-07-14 00:56:34 +08:00
### Exception
```text
System.NullReferenceException: Object reference not set to an instance of an object.
at Flow.Launcher.MainWindow.QueryTextBox_KeyUp(Object sender, KeyEventArgs e) in C:\projects\flow-launcher\Flow.Launcher\MainWindow.xaml.cs:line 1422
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey)
at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled)
at System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(MSG& msg, ModifierKeys modifiers)
at System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
```
The corresponding log file is `Flow.Launcher.2026-07-14.log` (147,668 bytes).
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in Flow.Launcher/MainWindow.xaml.cs at line 1422, the QueryTextBox_KeyUp handler, and review Flow.Launcher.2026-07-14.log for the reported failure. Reproduce the Dialog Jump Save As workflow with rapid keyboard input and observe query/result state transitions. Done means the handler tolerates those transitions without an unhandled NullReferenceException and the repeated stress run continues.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100