[Bug 55771] New: uxtheme:system - test_ShouldSystemUseDarkMode() fails on Windows 7 to 10 1909
https://bugs.winehq.org/show_bug.cgi?id=55771 Bug ID: 55771 Summary: uxtheme:system - test_ShouldSystemUseDarkMode() fails on Windows 7 to 10 1909 Product: Wine Version: unspecified Hardware: x86-64 OS: Windows Status: NEW Severity: normal Priority: P2 Component: uxtheme Assignee: wine-bugs(a)winehq.org Reporter: fgouget(a)codeweavers.com uxtheme:system - test_ShouldSystemUseDarkMode() fails on Windows 7 to 10 1909. Mostly ShouldSystemUseDarkMode() returns various error codes. Windows 7: system.c:2628: Test failed: ShouldSystemUseDarkMode set last error: 5. Windows 8: system.c:2629: Test failed: Expected value 0, got -2147024890. Windows 10 1507: system.c:2623: this is the last test seen before the exception 03f8:system: unhandled exception c0000005 at 74A58B41 Windows 10 1607: system.c:2628: Test failed: ShouldSystemUseDarkMode set last error: 0. system.c:2629: Test failed: Expected value 0, got -2147467259. Windows 10 1709: system.c:2629: Test failed: Expected value 0, got -2147467261. Windows 10 1809: system.c:2629: Test failed: Expected value 0, got 1. See: https://test.winehq.org/data/patterns.html#uxtheme:system Where: 5 == ERROR_ACCESS_DENIED -2147467261 == 0x80004003 == E_POINTER -2147467259 == 0x80004005 == E_FAIL -2147024890 == 0x80070006 == ERROR_INVALID_HANDLE Are we sure that the entry point 138 really points to ShouldSystemUseDarkMode() on early Windows versions? Because it looks more like it points to random APIs that may expect more parameters and end up failing in varying ways. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=55771 François Gouget <fgouget(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |91e54e5f6d33ff17ce6ab904fbd | |cdeb6497de8cb Keywords| |regression, source, | |testcase CC| |helix.graziani(a)hotmail.com --- Comment #1 from François Gouget <fgouget(a)codeweavers.com> --- This started on the day test_ShouldSystemUseDarkMode() was introduced so the commit below is the source of the failures: commit 91e54e5f6d33ff17ce6ab904fbdcdeb6497de8cb Author: Helix Graziani <helix.graziani(a)hotmail.com> Date: Tue Sep 26 20:03:44 2023 -0400 uxtheme: Add ShouldSystemUseDarkMode. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=55771 --- Comment #2 from Helix Graziani <helix.graziani(a)hotmail.com> --- According to online sources(https://learn.microsoft.com/en-us/answers/questions/715081/how-to-detect-win...), this function was introduced in Windows 10 1903. However, in the test results it shows that the function must've gone through a change in between 1903 and 22H2. So: Before 1903, we have no idea what this function is or what it does, so skip. On 1909, it returns 1 instead of 0 (dark mode instead of light, maybe the default is dark mode in 1909?) The testbot doesn't have a configuration for windows 1903, so we can assume the test results are the same as 1909.
From 2004-22H2 everything is ok.
-- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=55771 --- Comment #3 from François Gouget <fgouget(a)codeweavers.com> --- The screenshots for 1909 don't look different from the 1809 and 2009+ ones so I don't think 1909 uses dark mode. See for instance the 64-bit WineTest runs: https://testbot.winehq.org/JobDetails.pl?Key=138654&s106=1&s107=1&s108=1&s11... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=55771 --- Comment #4 from Nikolay Sivov <bunglehead(a)gmail.com> --- This function is probably some recent enough addition, which makes it questionable if we need to have it at all. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=55771 --- Comment #5 from François Gouget <fgouget(a)codeweavers.com> --- MR!3959 says it is used by some .Net apps for theming purposes (I wonder how those deal with old Windows versions). Also 1903 is 4.5 years old already so if we don't add ShouldSystemUseDarkMode() now we will probably need to in a few years. The test needs to skip it on old Windows versions though. Maybe one way is to skip if the registry key does not exist: Version Light? w10 1507 not set w10 1607 not set w10 1709 not set w10 1809 not set w10 1909 not set w10 2004 no w10 2009 no w10 21h1 no w10 21h2 no w10 22h2 no w11 21h2 yes All we would miss is 1909 which should have a working implementation. But that does not seem like a big issue, Also the reason 1909, 1909 and 2009 all look alike (see comment 3) is that they all use dark mode. Since I definitely did not the light/dark mode (is that a Windows install question? If so I would have picked the default... if any) the default is probably dark... unless it's all inherited from 1507 because of the upgrades: I upgraded w1064 from 1507 to 1607 to 1709, etc. Windows may have preserved this setting through the all upgrades. However w10pro64 is a 2004 install and is dark too so I think all Windows 10 versions default to dark mode. Windows 11 however is light by default. Alternatively one could check the Windows version but that should be a last resort. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=55771 --- Comment #6 from Helix Graziani <helix.graziani(a)hotmail.com> --- I think that checking if the registry value exists is a good approach. When testing the original commit, I deleted the registry values and looked at the theme of the taskbar. What I didn't realize was that the registry value being deleted is not a normal state, as shown in comment 3, where you can see that SystemUsesLightTheme is set (indicated by the test working when the theme is dark). So the patch is to skip if the registry value doesn't exist. (We could also add a version check to see if it's version 1909 and set the default value accordingly, but since it works on all the other tests and would just skip, we can leave it.) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=55771 Zhiyi Zhang <zzhang(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |zzhang(a)codeweavers.com --- Comment #7 from Zhiyi Zhang <zzhang(a)codeweavers.com> --- I wonder why the TestBots didn't catch this in MR3959. Is the Gitlab TestBot bridge broken? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=55771 --- Comment #8 from François Gouget <fgouget(a)codeweavers.com> ---
Is the Gitlab TestBot bridge broken?
It is: https://www.winehq.org/mailman3/hyperkitty/list/wine-devel(a)winehq.org/thre... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=55771 --- Comment #9 from Helix Graziani <helix.graziani(a)hotmail.com> --- Merge request that should fix this bug: https://gitlab.winehq.org/wine/wine/-/merge_requests/4101 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=55771 --- Comment #10 from Zhiyi Zhang <zzhang(a)codeweavers.com> --- (In reply to François Gouget from comment #8)
Is the Gitlab TestBot bridge broken?
It is: https://www.winehq.org/mailman3/hyperkitty/list/wine-devel(a)winehq.org/thre... VEEXYBWVQOYDU6JYH347QK3Z5BAIVFQS/
Right. It looks like the failures were not sent to the wine-gitlab mailing list by the way. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=55771 François Gouget <fgouget(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Fixed by SHA1| |e5536fa0de6b9e5dc151bfe3593 | |ac6a72ddfc6f9 Status|NEW |RESOLVED --- Comment #11 from François Gouget <fgouget(a)codeweavers.com> --- This is fixed: commit e5536fa0de6b9e5dc151bfe3593ac6a72ddfc6f9 Author: Helix Graziani <helix.graziani(a)hotmail.com> AuthorDate: Sat Oct 14 17:48:22 2023 -0400 uxtheme/tests: Skip the test if the SystemUsesLightTheme value isn't found. Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=55771 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=55771 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #12 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 8.19. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla