Winit: Winit creating invisible Windows on Windows

Created on 8 Nov 2019  路  8Comments  路  Source: rust-windowing/winit

It seems like there's an issue where winit is spawning invisible windows on Windows after some period of time. They seem to come from the Winit Thread Event Target. It seems like in the worst case this can actually lead to the process getting killed as a result of it.

A crash seems to cause the following error, however since this is likely a result, not the cause, I'd treat it with some caution.

panicked at 'PostMessage failed; is the messages queue full?', C:\Users\travis.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.19.1\src\platform\windows\events_loop.rs:302:13

This has been reported to Alacritty in https://github.com/jwilm/alacritty/issues/2656, however it has not been confirmed with the winit rework.

@leandrosansilva if you could try the latest Alacritty master and report back here if that also is broken, that would be very helpful.

Windows needs investigation bug

All 8 comments

This is by design. On Windows, a window is the base unit for dispatching and receiving messages in the event loop, and Winit creates a window to manage that upon initialization of the event loop. Having the message window show up in the taskbar sounds like a Windows bug, but I'm not 100% sure on that. That being said, I remember fiddling with the message window logic when rewriting the event loop for EL2.0, so it's heartening to know that that may have fixed the bug somehow.

Are you saying both the window showing up at all and the crash should be fixed with the latest winit master?

@chrisduerr I don't know. From what you said, it sounded like that may be the case, but there needs to be some testing done to verify that.

I've asked the author of the original issue to verify, I'll report back on the status of that.

I haven鈥檛 been able to reproduce this issue in Alacritty within a few minutes. I suspect the new winit event loop may have incidentally fixed it, or possibly a Windows bug fix.

@chrisduerr out of curiosity, when is Alacritty with Winit 0.20 going to get published as an official release? Alacritty is our biggest (or at least, most bug-reporting) source of users, and it would be nice to bring the majority of them up-to-date with our latest code.

We've released a new version on monday, building against the (then) latest winit master with a vendored glutin.

Alas, I just reproduced the issue again. 馃檨

Was this page helpful?
0 / 5 - 0 ratings