srwi / EverythingToolbar

Everything integration for the Windows taskbar.
Other
8.96k stars 404 forks source link

Selected program run twice #440

Closed KaiHuaDou closed 8 months ago

KaiHuaDou commented 9 months ago

Preflight Checklist

EverythingToolbar Version

1.2.0

Everything Version

1.4.1.1024 (x64)

Windows Version

Windows 10 Enterprise 22H2 (19045.3516)

Steps to reproduce

  1. Search any program
  2. Press Enter quickly
  3. The program launch twice.
  4. Search any program
  5. Press down Enter wihout lifting
  6. The program launch once.

Expected Behavior

Selected program launch once.

Actual Behavior

Selected program launch twice.

Screenshots

No response

Log output

It seems that there are only network errors in the log (I did not plug in the Internet cable)

2023-10-14 10:53:57.6440|INFO|Launcher|EverythingToolbar Launcher 1.2.0.0 started. OS: Microsoft Windows NT 10.0.19045.0|
2023-10-14 10:54:19.3269|INFO|EverythingToolbar.EverythingSearch|Everything version: 1.4.1|
2023-10-14 10:54:23.5010|ERROR|EverythingToolbar.Behaviors.ThemeAwareness|Failed to get latest release version.|System.Net.Http.HttpRequestException: 发送请求时出错。 ---> System.Net.WebException: 无法连接到远程服务器 ---> System.Net.Sockets.SocketException: 由于目标计算机积极拒绝,无法连接。 127.0.0.1:443
   在 System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult)
   在 System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
   在 System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
   --- 内部异常堆栈跟踪的结尾 ---
   在 System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   在 System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
   --- 内部异常堆栈跟踪的结尾 ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   在 EverythingToolbar.Controls.UpdateBanner.<GetLatestStableReleaseVersion>d__5.MoveNext() 位置 C:\Users\Stephan\Entwicklung\EverythingToolbar\EverythingToolbar\Controls\UpdateBanner.xaml.cs:行号 40

Additional Information

I think EverythingToolbar launches the selected program both on ButtonDown and ButtonUp.

This bug often occurs on programs that are slower to start. Like *.py, *.csproj.

srwi commented 8 months ago

Hi @KaiHuaDou, sorry for the late response. There were some changes to how keypresses are handled in the latest 1.3.1 release. Would it be possible for you to test it again on that version? I did not implement any specific fix, but I want to make sure that the issue still exists in the latest version.

KaiHuaDou commented 8 months ago

Sorry, the problem persists.

I selected a ".py" file and pressed the enter key quickly, and it started two instances instead of just one instance.

I selected a ".py" file and long pressed the enter key without releasing it, and it started almost 60 instances instead of just one instance.

srwi commented 8 months ago

I selected a ".py" file and long pressed the enter key without releasing it, and it started almost 60 instances instead of just one instance.

Holding the key down allowed me to reproduce it! Thank you for the hint. Maybe you have set Windows to use a very short keyboard repetition delay?

Anyways, I implemented a fix for it. It will be available in the next release.