Switch eventually starts never ending
Thanks for all the work.
I use 1.20 on Windows 11 24H2.
It works perfectly until at some point, the Switch command starts not responding, it stays indefinitely on Switching to virtual desktop number 0 (for instance). Verbose doesn't print anything more. When that happens, it also happens with the PowerShell version.
Logging out and in again is the simplest fix I found. Do you know how I could investigate more?
Hello @GTonehour,
sorry for the late answer, I#m busy with family matters these days.
Please can you tell me more about what happens? How often does this issue occur? Does it sometimes happens even the first time you use VirtualDesktop.exe after starting you computer (or logging on)? When VirtualDesktop hangs, is there another program or the GUI trying to switch or rename or reorder desktops? What happens when you kill the process VirtualDesktop.exe with Task Manager. Does the next attempt to use switch with VirtualDesktop.exe hang too? Can you switch with the VirtualDesktop tool in the Taskbar? If yes, does VirtualDesktop.exe still hangs on the next attempt? When VirtualDesktop.exe hangs, does opening another shell and executing an additonal instance of VirtualDesktop.exe hangs too?
Greetings
Markus
Thanks for your help,
https://github.com/user-attachments/assets/e1fd66e9-095e-4750-ad16-d255660a589a
-
It happens maybe once every 50 times, so pretty rare.
-
When VirtualDesktop hangs, I don't think anything else interferes with my desktops.
-
Does the next attempt to use it hang to ?
Yes, as I show in the video.
-
I can still switch desktop using Windows native tools like the task view (I'm not sure if that's what you meant by the "tool in the taskbar").
-
Does opening another shell and executing an additonal instance of VirtualDesktop.exe hangs too?
Yes.
It may happen only when another Windows user is logged in. That other user not having any additional desktop, nor doing anything special with their desktops.
Hello @GTonehour,
Micosoft seems to change the behaviour of the Explorer Desktop slightly with 24H2. I reworked the code to activate the correct icon after switching.
I uploaded a new version of VirtualDesktop11-24H2.cs for this. Can you check if it helps?
Greetings
Markus
Hello @GTonehour,
I found out the reason for this: simultaneous calls of the animated switch function causes Windows Explorer to crash!
I fixed this in the new release V1.21 I uploaded today.
Greetings
Markus
Amazing, thanks a lot and congratulations on the fix!