DevToys-app / DevToys

A Swiss Army knife for developers.
https://devtoys.app/
MIT License
26.94k stars 1.45k forks source link

Blank on top window, hides everything else #1385

Closed theremon closed 1 month ago

theremon commented 1 month ago

Current behavior

Running the application, first displays a blank window and then the app window. The window that is displayed first, remains on top of all others, cannot be moved or closed and only goes away when the application is closed. However, it renders the application (and rest of the computer) unusable. At times, it works as if it's click-through (even though the mouse if over it, it can affect UI elements that are behind it). This also appeared for me when I first installed preview 4 (the first v2 I installed), but stopped after a restart. Now, after several restarts, it doesn't go away. Also, it appears even on multiple desktops. I may open DevToys on desktop 1, switch to desktop 2 and the blank window will re-appear

How to reproduce it (as minimally and precisely as possible)

In my case, it is enough to start the app.

Expected behavior

Even if this window must open before everything else, it should be hidden/go away.

Screenshots

image

Workaround

None...

Affected platforms

Windows

Affected DevToys kind

DevToys (app with GUI)

DevToys Version

Version 2.0-preview.5

Relevant Assets/Logs

2024-08-18T21:38:09.9511471+02:00 Information [DevToys.Core.FileHelper] [0] Cleared temp files in 0.2746ms 2024-08-18T21:38:09.9601615+02:00 Information [DevToys.Core.Mef.MefComposer] [LogDiscoveringPlugin] Discovering plugin in 'C:\Users\there\AppData\Local\Programs\DevToys Preview\Plugins\DevToys.Tools'... 2024-08-18T21:38:10.0650859+02:00 Information [DevToys.Core.Mef.MefComposer] [LogMefComposition] MEF composed 114 parts from 6 assemblies in 107.3382ms 2024-08-18T21:38:10.0826349+02:00 Information [DevToys.Windows.MainWindow] [2] MEF, services and logging initialized in 190.7751 ms 2024-08-18T21:38:10.0827085+02:00 Information [DevToys.Windows.MainWindow] [1] App is starting... 2024-08-18T21:38:10.8626166+02:00 Information [DevToys.Windows.MainWindow] [4] Running Windows with WebView 127.0.2651.105 2024-08-18T21:38:10.8872613+02:00 Information [DevToys.Windows.MainWindow] [3] App main window's UI loaded in 804.2242 ms 2024-08-18T21:38:10.9254514+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'Base64ImageEncoderDecoder' tool instance manager. 2024-08-18T21:38:10.9268356+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'Base64TextEncoderDecoder' tool instance manager. 2024-08-18T21:38:10.9278538+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'CertificateDecoder' tool instance manager. 2024-08-18T21:38:10.9287863+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'ColorBlindnessSimulator' tool instance manager. 2024-08-18T21:38:10.9297010+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'CronParser' tool instance manager. 2024-08-18T21:38:10.9305977+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'DateConverter' tool instance manager. 2024-08-18T21:38:10.9314671+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'EscapeUnescape' tool instance manager. 2024-08-18T21:38:10.9323364+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'GZipEncoderDecoder' tool instance manager. 2024-08-18T21:38:10.9332096+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'HashAndChecksumGenerator' tool instance manager. 2024-08-18T21:38:10.9340840+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'HtmlEncoderDecoder' tool instance manager. 2024-08-18T21:38:10.9351007+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'ImageConverter' tool instance manager. 2024-08-18T21:38:10.9359755+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'JsonFormatter' tool instance manager. 2024-08-18T21:38:10.9368498+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'JSONPathTester' tool instance manager. 2024-08-18T21:38:10.9377312+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'JsonTableConverter' tool instance manager. 2024-08-18T21:38:10.9386534+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'JsonWebTokenEncoderDecoder' tool instance manager. 2024-08-18T21:38:10.9396346+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'JsonYamlConverter' tool instance manager. 2024-08-18T21:38:10.9404875+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'ListCompare' tool instance manager. 2024-08-18T21:38:10.9413381+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'LoremIpsumGenerator' tool instance manager. 2024-08-18T21:38:10.9422219+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'MarkdownPreview' tool instance manager. 2024-08-18T21:38:10.9430943+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'NumberBaseConverter' tool instance manager. 2024-08-18T21:38:10.9439496+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'PasswordGenerator' tool instance manager. 2024-08-18T21:38:10.9447856+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'QRCodeEncoderDecoder' tool instance manager. 2024-08-18T21:38:10.9456238+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'RegExTester' tool instance manager. 2024-08-18T21:38:10.9464658+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'SqlFormatter' tool instance manager. 2024-08-18T21:38:10.9473022+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'TextAnalyzerAndUtilities' tool instance manager. 2024-08-18T21:38:10.9481627+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'TextCompare' tool instance manager. 2024-08-18T21:38:10.9490527+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'UrlEncoderDecoder' tool instance manager. 2024-08-18T21:38:10.9499290+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'UUIDGenerator' tool instance manager. 2024-08-18T21:38:10.9508424+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'XmlFormatter' tool instance manager. 2024-08-18T21:38:10.9517674+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'XMLTester' tool instance manager. 2024-08-18T21:38:10.9537155+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'Extensions Manager' tool instance manager. 2024-08-18T21:38:10.9543269+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'Settings' tool instance manager. 2024-08-18T21:38:10.9550508+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInitialized] Initialized 'NoSearchResults' tool instance manager. 2024-08-18T21:38:10.9582272+02:00 Information [DevToys.Core.Tools.GuiToolProvider] [LogToolInstancesCreated] Instantiated 32 tools in 38.1213ms 2024-08-18T21:38:12.2389846+02:00 Information [DevToys.Blazor.Core.Services.FontService] [LogImportThirdPartyFontsAsync] Loaded 2 font(s) in 32.2464 ms and injected them in 485.4802 ms 2024-08-18T21:38:12.4395053+02:00 Information [DevToys.Blazor.BuiltInTools.ExtensionsManager.ExtensionInstallationManager] [0] Extension DevToys.Tools is up to date 2024-08-18T21:38:18.9919159+02:00 Information [DevToys.Core.Tools.GuiToolProvider] [LogSetMostRecentUsedTool] Set 'Settings' as the most recently used tool. 2024-08-18T21:38:18.9936640+02:00 Information [DevToys.Core.Tools.GuiToolInstance] [LogInstanceCreated] Instance of 'Settings' tool created. 2024-08-18T21:38:42.6608387+02:00 Information [DevToys.Core.Settings.SettingsProvider] [LogSetSetting] Setting 'DevToys.Core.MainWindowBounds' changed to '51,222,1653,1018' 2024-08-18T21:38:42.6623959+02:00 Information [DevToys.Core.Settings.SettingsProvider] [LogSetSetting] Setting 'DevToys.Core.MainWindowMaximized' changed to 'False' 2024-08-18T21:38:42.6631975+02:00 Information [DevToys.Core.FileHelper] [0] Cleared temp files in 0.0888ms 2024-08-18T21:38:42.6639622+02:00 Information [DevToys.Core.Settings.SettingsProvider] [LogSetSetting] Setting 'DevToys.Blazor.UserPreferredNavBarState' changed to 'Expanded'

veler commented 1 month ago

Hi, This is the first time I see such an issue. I'd love your help to understand it better as I currently do not reproduce the issue. A few questions:

  1. What GPU do you have?
  2. Do you have any sort of accessibility feature turned on in Windows?
  3. Are you able to click through that gray rectangle in the middle of the screen? Does clicking through allows to, for example, navigate to a tool?
  4. Are able to click on components outside of that rectangle?
  5. Is there any menu showing up when doing a right click on this rectangle?
  6. Are you able to move the window through the title bar at the top of the window? Or do you need to click and drag that rectangle in order to move the window?
  7. You said it happened the first time you ran 2.0.4.0, then it did not reprpduce for some time, and now it happens constantly, is that correct?
  8. Did you install DevToys through the Microsoft Store, installer or a Zip? Does the issue reproduce if you install with one of these options different than the one you used already?
  9. Does the issue reproduce if you switch Windows or DevToys to Dark theme?

Thanks 😃

theremon commented 1 month ago

Hey there! Thanks for the immediate response! Replies inline:

  1. What GPU do you have? That's actually what I'm concentrating on myself. I'm on an ASUS Zenbook with a (totally inadequate) built-in Intel IrisXE GPU. The display is a high density OLED though, which pushes the GPU. The rest of the machine specs are: 16Gb RAM/1TB SSD/Win11 fully patched. GPU details: image I'm also using the latest drivers from Intel.
  2. Do you have any sort of accessibility feature turned on in Windows? No, nothing that I knowingly enabled.
  3. Are you able to click through that gray rectangle in the middle of the screen? Does clicking through allows to, for example, navigate to a tool? Yes, when the DevToys window is active, I can click through the rectangle (which btw is not always in the center of the screen - it changes position everytime I start DevToys - it behaves as a simple window with its default settings, ie. no startup position settings in the code). Mouseover events work as well. However, if I change focus to another window (eg. Explorer), the rectangle blocks any interaction.
  4. Are able to click on components outside of that rectangle? Yes, I can click normally
  5. Is there any menu showing up when doing a right click on this rectangle? No, nothing
  6. Are you able to move the window through the title bar at the top of the window? Or do you need to click and drag that rectangle in order to move the window? The rectangle cannot be moved. If I click on the DevToys titlebar, I can move the window, but still the rectangle takes so much space, that I cannot do anything meaningful.
  7. You said it happened the first time you ran 2.0.4.0, then it did not reprpduce for some time, and now it happens constantly, is that correct? Yes and... no. After your reply I ran some more tests. I was actually able to get it working sometimes. It is happening MOST of the time. I randomly got the normal behaviour (just a few times tho). And it did show SOME consistency running ok when I set the compatibility down to Windows 7, in which case it was 90% times ok, 10% not.
  8. Did you install DevToys through the Microsoft Store, installer or a Zip? Does the issue reproduce if you install with one of these options different than the one you used already? Unfortunately I don't remember how I installed 2.0.4.0, even though I think it was through GitHub-downloaded installer. Then I upgraded to 2.0.5.0 However, after your message, I uninstalled it, tried the portable 64bit version, the 64bit installer, the portable 32bit version - all behaved the same.
  9. Does the issue reproduce if you switch Windows or DevToys to Dark theme? Yes, it happens with both themes. However, there is one interesting thing here... If I change the theme to dark, it immediately goes to black bg, white text etc as it should. If I close the application and restart it, I get the rectangle and then white bg with white text and the app is even more unusable :) image

I used SysInternal's Process Explorer which has a good tool to select processes by targeting windows, but it didn't actually help. Both the normal DevToys window and the problematic rectangle actually showed the same thing: image [EDIT]: Actually I retried this and the PE target points to any process that is behind the rectangle - so it is essentially transparent to PE...

Also, disabled HDR and took the refresh rate down to 60% so that the GPU is not stressed by those two things. Didn't help.

One last thing - don't think it will help that much, but you never know. I accessed my laptop remotely (meaning I got degraded colors etc) and got this:

image

I know it's not much, but there IS a pattern in there (which I can't see when I'm on the laptop). Maybe that pattern is familiar?

As I said in the beginning, it feels much more a problem of my GPU rather than the app. On my second Win11 machine and Mac it works fine :) Still, I thought it'd be good to report it...

Let me know if this helped or if you need anything more...

theremon commented 1 month ago

Hey, after getting to the laptop and checking this post, I realised that the last image did not make sense. I tweaked it enough to make the design pattern stand out... Colours are messed up. Just note the design in case it rings a bell - not the colours.

image
veler commented 1 month ago

Hi, Thank you for all these details! It's very helpful.

It really sounds like a GPU-related issue, indeed. It seems like the background / Mica effect of the window is bleeding through the web view that displays DevToys UI.

Here is a potential workaround: Can you try disabling transparency effect in Windows? You can find it in Windows Settings app > Personalization > Colors > Transparency effects.

I'm also curious whether you encounter these "odd" colors in different part of Windows 11, such as Start Menu, Widgets, Settings app, Calculator app, Emoji (Win+;), Clipboard History (Win+V), Sounds setting flyout (Ctrl+Win+V).

Thank you :)

theremon commented 1 month ago

Hi again

ok, we got a winner! As expected, it is GPU-related. it was actually not the Windows transparency effects, but your mention of the Mica effect, jolted my memory. Few months ago, for the heck of it I installed an app called Mica or Everyone (https://github.com/MicaForEveryone/MicaForEveryone) THIS one is what was causing the issue. I don't actually know why, but closing the app or just disabling customizations for the DevToys process, is enough to fix the issue. I even tried upgrading MfE to the latest version, but it didn't help. Any customization I try to apply using it, causes DevToys to show that blank window. So I just set it to ignore DevToys and it's all good!

Thanks so much for your time! Keep up the good work... Hopefully I'll be able to contribute with a couple of plugins in the near future...

theremon commented 1 month ago

Closing this issue

veler commented 1 month ago

Glad you got it fixed 🙂

veler commented 1 month ago

Just if you're curious, I've been chatting with the author of Mica For Everyone on the matter:

image

theremon commented 1 month ago

Wow, thanks for investigating this even further! You're the best!