Skip to content
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

Crashes on Windows 10 1809 10.0.17763.1 #1458

Closed
chrisduerr opened this issue Feb 13, 2020 · 1 comment · Fixed by #1459
Closed

Crashes on Windows 10 1809 10.0.17763.1 #1458

chrisduerr opened this issue Feb 13, 2020 · 1 comment · Fixed by #1459
Labels
B - bug Dang, that shouldn't have happened DS - windows F - duplicate This issue or pull request already exists

Comments

@chrisduerr
Copy link
Contributor

This was reported upstream in alacritty/alacritty#3177.

It seems like on some Windows 10 systems, like Windows 10 Enterprise LTSC 1809, the new dark mode options are causing an assertion panic.

This assert is failing:

assert_eq!(
1,
set_window_composition_attribute(hwnd, &mut data as *mut _)
);

chrisduerr added a commit to chrisduerr/winit that referenced this issue Feb 13, 2020
In general, winit should never assert on anything unless it means that
it is impossible to continue the execution of the program. There are
several assertions in the Windows dark mode code where this is not the
case.

Based on surface level inspection, all existing assertions could be
easily replaced with just simple conditional checks, allowing the
execution of the program to proceed with sane default values.

Fixes rust-windowing#1458.
@daxpedda
Copy link
Member

Cc #1405.

@goddessfreya goddessfreya added DS - windows F - duplicate This issue or pull request already exists B - bug Dang, that shouldn't have happened labels Feb 13, 2020
chrisduerr added a commit to chrisduerr/winit that referenced this issue Feb 17, 2020
In general, winit should never assert on anything unless it means that
it is impossible to continue the execution of the program. There are
several assertions in the Windows dark mode code where this is not the
case.

Based on surface level inspection, all existing assertions could be
easily replaced with just simple conditional checks, allowing the
execution of the program to proceed with sane default values.

Fixes rust-windowing#1458.
chrisduerr added a commit to chrisduerr/winit that referenced this issue Mar 7, 2020
In general, winit should never assert on anything unless it means that
it is impossible to continue the execution of the program. There are
several assertions in the Windows dark mode code where this is not the
case.

Based on surface level inspection, all existing assertions could be
easily replaced with just simple conditional checks, allowing the
execution of the program to proceed with sane default values.

Fixes rust-windowing#1458.
Osspial pushed a commit that referenced this issue Mar 7, 2020
* Remove assertions from Windows dark mode code

In general, winit should never assert on anything unless it means that
it is impossible to continue the execution of the program. There are
several assertions in the Windows dark mode code where this is not the
case.

Based on surface level inspection, all existing assertions could be
easily replaced with just simple conditional checks, allowing the
execution of the program to proceed with sane default values.

Fixes #1458.

* Add changelog entry

* Format code

* Pass dark mode by mutable reference

* Format code

* Return bool instead of mutable reference

* Fix dark mode success reply

Co-Authored-By: daxpedda <daxpedda@gmail.com>

* Fix dark mode success reply

* Replace magic integers with constants

Co-authored-by: daxpedda <daxpedda@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B - bug Dang, that shouldn't have happened DS - windows F - duplicate This issue or pull request already exists
Development

Successfully merging a pull request may close this issue.

3 participants