-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Task View causes Explorer restart when SystemTrayMenu is open #299
Comments
@chip33 I can't reproduce it on windows 10 right now. it obviously has to do with the form in the taskbar, as a workaround you can switch it off here: With windows 11 you have a revised version of windows explorer or even a newly created one, I don't know exactly What would be very interesting if it also happens when the STM taskbar form is not active. E.g. another program in the foreground and activated. With this taskbar form, we only listen to the events that the form was activated and then do the same as if the hotkey was pressed, so basically we then show the menu. Therefore, you could check whether something like this also occurs if you e.g. presses the hotkey and task view repeatedly very quickly. Showing the menu has no special implementation except that we use SetForegroundWindow from user32.dll. It's probably not the thumbnail, which we only read once when at start. We intentionally do not show the preview because if you turn off the taskbar form, then you want to select nothing with alt+tab and so that we could do that we had to switch off the preview. But we could take a closer look to see if showing preview is possible in an other way. But that shouldn't be the root cause here. Definitely very interesting. If others can reproduce it please post it here, even if you can't reproduce it to classify how critical that is. The most important info is that the task view works again when the STM is restarted at the point. |
Hi, thanks for looking at this. The only major modification I have made to Win 11 is Explorer Patcher to bring back the Windows 10 taskbar functionality. Even when Task View is broken Alt+Tab works fine.
If I run STM without the taskbar form and rapidly tap the STM icon in the system tray I cannot reproduce the error at all.
Yes, it does happen when the STM taskbar form is not active.
If i run "taskkill /F /IM explorer.exe" Ctrl+LWin opens STM and Task View is fine after an explorer restart but I couldn't find another way to test this. It would be nice if at some point if STM is in the taskbar Task View could show a preview of STM or even better just nothing at all as it does when in the system tray. I have happily gone back to having STM only in the system tray and it all works great. |
tried with win 11 but can only reproduce that windows explorer crashes but it is restarting itself (you know the behavior when taskbar short time invisble), without any restart of STM. But maybe probably a rare side effect of using the taskbarform, because when disable it i could not reproduce any windows explorer crash. So let's set 'Show in Taskbar' as default false in #304 But we're leaving the option there because there are users who don't have this problem and we marking this as an FAQ, then it should be fine |
Hi, after explorer restarts itself I find that the Task View button still does not work until STM is restarted. |
we made now this option -h as default in #305 but if you use the taskbar view, let's say it's normal, so click once, then everything works, right? |
When STM is in the taskbar form and has not been clicked on much , clicking on Task View in taskbar will sometimes make Task View work but often it just stops working and restarts explorer. Even if Task View is broken , clicking STM in the taskbar always works great, Windows seems fine, only Task View is broken. |
I tried it again several times on a windows 11, I can't reproduce it. Windows explorer didn't crash again. On that very weak test hardware everything runs correctly. If you want to you can debug deeper in the code and see if the situation doesn't occur when you change certain things, Maybe you have the possibility to try the whole thing on a fresh installation of win 11 and see if it also occurs there |
Hi, yes I will try it on a clean win 11. |
Yes, could you reproduce it in some way? I will try it on a new windows 11 as soon as I can. |
No, unfortunately I couldn't reproduce it at all, just that the windows explorer crashed once and restarted, but regardless of the STM, it only happened once when I switched very quickly and very often between task view and windows explorer. currently i don't know what we could change, we need more data or a reproducible case, for example in a virtual machine which we can copy or similar. Thank you for sticking with this for so long, it helps us a lot to improve the STM |
Yes, It may be due to me using ExplorerPatcher as that is quite a big patch on windows 11 , maybe even when I uninstalled EP there was something left. |
Here is the windbg output from an explorer crash when clicking STM in taskbar about 5 times and then clicking Task View. This is with ExplorerPatcher uninstalled but not on a clean Windows 11. |
Here is a video. Thanks |
I can also reproduce this on a clean install on ssd of windows 11. |
I made a bit code beauty to reduce the related code, it can only be related to the selected code in the screenshot @chip33 In the video I see ShowInTaskbar is true, in the user.config it is set to false. If we are sure that it is only related to the taskbar form, then it would be good to distinguish where exactly it comes from in the lines. We need to check some szenarios: (I also noticed that it doesn't work like it did in windows 10, so the show taskbar form doesn't respond anymore if it's already activated.) (on the one windows 11 system we have we can't reproduce it, otherwise we would try it there a bit) Would be cool if you like to continue trying to fix it on that lines |
It works fine until ShowInTaskbar is true, user.config shows false because I have to disable it in everyday usage to make Task View work. Using your latest commit ,commenting out any of the lines you referenced in App.cs did not stop the crash.
If you have any ideas for other lines to change please let me know. |
Good morning :) The only line that needs commenting out is line 17 in TaskbarForm.cs App.cs is unchanged from commit. This also has the very good effect of making the STM window in Task View a reasonable size instead of the huge one shown before. |
@chip33 I agree with you, we should then remove the line with opacity and the side effect is also great. Do you like to commit it yourself since it is also your merit, you will be displayed on the main page as a contributor. If it behaved the same when we replace this: |
It is working with Creates a BugSplat when run. Shall I commit it with only |
@chip33 ok very good, then you found the reason why we use the native function there. That's brilliant that you found that out |
Now that the over large STM window in Task View is gone Show in Taskbar is a good default rather than the shortcut method. |
@chip33 |
@chip33 now we see your account in contributors i think we can finally close this issue. I hope you find more! |
Thanks, I appreciate your help in tracking down the issue. |
Noticed this fix in Windows 11 Insider Preview Build 22598 which may be related to why this error was occurring. Search for "Fixed an explorer.exe crash when invoking Task View." |
Description, Steps to reproduce, Expected behavior, Screenshots
Hi, maybe you can reproduce this.
Just have SystemTrayMenu open and in use for a while on the taskbar and just maximise it and minimize now and then like you would , When you click Task View often but not always there is a freeze and explorer restarts, once it starts happening trying to open Task View will just keep restarting Explorer.
It seems to be caused by SystemTrayMenu as closing STM immediately fixes the issue and Task View works again.
It may have something to do with the way the STM taskbar thumbnail is drawn as when it is working Task View looks like this., rather than showing a preview of SystemTayMenu.
I could also make a Feature Request for SystemTaskMenu to display a thumbnail preview correctly in Task View as this may be the cause of this issue.
The text was updated successfully, but these errors were encountered: