Scrolling afterimages and NtUserScrollWindowEx

Questions about Wine on macOS.
Locked
contextnerror
Level 2
Level 2
Posts: 13
Joined: Fri Mar 11, 2022 2:16 pm

Scrolling afterimages and NtUserScrollWindowEx

Post by contextnerror »

Running wine-devel 7.12, macports version. App is Ice Cream Calculator version 2.04 (and 2.03, and 2.02...)

My ice cream app seems to have developed some strange behavior. When scrolling through the ingredients list, the new entries will not load, and the same entry displays over and over again until the scrollbar stops moving. While this is happening, there is a constant stream of

Code: Select all

0100:fixme:win:NtUserScrollWindowEx some flags (8006) are unhandled
in the terminal. The issue also happens when using the arrow keys to scroll. Disabling scroll inertia in settings and setting UsePreciseScrolling to "n" help a little, but do not solve the problem. Assuming I did it right there should be a link to a screencapture depicting the issue.
https://imgur.com/a/KUqxJM6
Gcenx
Level 6
Level 6
Posts: 709
Joined: Mon Dec 25, 2017 12:11 pm

Re: Scrolling afterimages and NtUserScrollWindowEx

Post by Gcenx »

contextnerror wrote: Wed Jul 06, 2022 4:23 am Running wine-devel 7.12, macports version.
To be clear you can’t be using wine provided by macports-ports as there wine-devel port is still only 4.9 and isn’t supported by Winehq.

Your using macports-wine overlay that’s what’s providing modern versions of wine.
contextnerror wrote: Wed Jul 06, 2022 4:23 am App is Ice Cream Calculator version 2.04 (and 2.03, and 2.02...)

My ice cream app seems to have developed some strange behavior. When scrolling through the ingredients list, the new entries will not load, and the same entry displays over and over again until the scrollbar stops moving. While this is happening, there is a constant stream of

Code: Select all

0100:fixme:win:NtUserScrollWindowEx some flags (8006) are unhandled
in the terminal. The issue also happens when using the arrow keys to scroll. Disabling scroll inertia in settings and setting UsePreciseScrolling to "n" help a little, but do not solve the problem. Assuming I did it right there should be a link to a screencapture depicting the issue.
https://imgur.com/a/KUqxJM6
If this didn’t occur in wine-7.11 this would be a new regression that should be reported on Bugzilla.
contextnerror
Level 2
Level 2
Posts: 13
Joined: Fri Mar 11, 2022 2:16 pm

Re: Scrolling afterimages and NtUserScrollWindowEx

Post by contextnerror »

Correct, I am using the overlay.

I was able to confirm correct behavior using wine-stable, so it does seem to be a regression somewhere. I think I remember the issue happening in 7.11 as well (the problem has happened for a while), so it might some time to install various versions and see when it breaks. I will follow up/file a bug report when I have new info.
contextnerror
Level 2
Level 2
Posts: 13
Joined: Fri Mar 11, 2022 2:16 pm

Re: Scrolling afterimages and NtUserScrollWindowEx

Post by contextnerror »

7.11 does seem to work, mostly. It gets the same error messages in the terminal as 7.12, but the visual impact is only noticeable when scrolling quite fast, and it doesn't have any of the slowdown. Screencapture: https://imgur.com/a/BqHO67E

Where do I go from here? I don't understand any of the bisection instructions in the regression testing wiki. I've also never used Bugzilla.
Gcenx
Level 6
Level 6
Posts: 709
Joined: Mon Dec 25, 2017 12:11 pm

Re: Scrolling afterimages and NtUserScrollWindowEx

Post by Gcenx »

Hum if wine-7.11 was also requesting that same function (it’s a stub that’s inside win32u) then this seems like a regression to me.

I’d open an issue set to wine-7.12 and provide as much information as possible including a link to the app so someone can else can test it.

Regression testing is a rather annoying long process sometimes, if your able to wrap you ld head around it and can provide a regression commit it does help so get things fixed quicker.

If your running a modern version of macOS the setting you’d need to pass to configure are

configure --enable-win64 LDFLAGS=“ -Wl,-rpath,/opt/local/lib”; make -j$(sysctl -n hw.activecpu)

(tells configure to build wine64 and to find dylibs in /opt/local/lib, then build with as many threads as possible)

As long as the build deps are still installed it will detect almost everything on its own, to quickly instal build deps you could simply run

sudo port configure wine-staging; sudo port clean wine-staging

That will ensure you have all needed build dependencies installed along with autoconf as that might end up being needed.
contextnerror
Level 2
Level 2
Posts: 13
Joined: Fri Mar 11, 2022 2:16 pm

Re: Scrolling afterimages and NtUserScrollWindowEx

Post by contextnerror »

How exactly do I pass arguments to configure? Do I need to edit the portfile?
Gcenx
Level 6
Level 6
Posts: 709
Joined: Mon Dec 25, 2017 12:11 pm

Re: Scrolling afterimages and NtUserScrollWindowEx

Post by Gcenx »

contextnerror wrote: Mon Jul 11, 2022 6:29 pm How exactly do I pass arguments to configure? Do I need to edit the portfile?
It’s not possible to run a regression test using the Portfile, it needs to be done using a git clone of wines sources and run builds consecutively until the first bad commit is found.

If this app is freely available or there’s some trial version just open an issue and provide the url for said app so someone else can potentially run the regression test.

If it’s some custom app only for internal business usage you’ll need to wrap your head around regression testing.
contextnerror
Level 2
Level 2
Posts: 13
Joined: Fri Mar 11, 2022 2:16 pm

Re: Scrolling afterimages and NtUserScrollWindowEx

Post by contextnerror »

I've already made an issue, number 53337.

Trying to run ./configure is already having problems. Pasting in "configure --enable-win64 LDFLAGS=“ -Wl,-rpath,/opt/local/lib”; make -j$(sysctl -n hw.activecpu)" says that `-Wl,-rpath,/opt/local/lib”' is an unrecognized option. Removing the space between the quotation mark gives a different error, saying my C compiler doesn't work. I've attached the log file.
Attachments
config.log.zip
Log file. Apparently .log and .txt aren't valid extensions for upload.
(3.5 KiB) Downloaded 423 times
contextnerror
Level 2
Level 2
Posts: 13
Joined: Fri Mar 11, 2022 2:16 pm

Re: Scrolling afterimages and NtUserScrollWindowEx

Post by contextnerror »

Stuck again, but this time in a different spot. The only way I was able to make progress from the last time was to eliminate LDFLAGS from the configure statement entirely. Even trying to use LDFLAGS=“-Wl,-rpath,/opt/X11/lib” from the wiki for building from source on mac still failed. I now have a version of wine built from source, but trying to install an .exe or run winecfg gives the error "Wine cannot find the FreeType font library. To enable Wine to use TrueType fonts please install a version of FreeType greater than or equal to 2.0.5." and then gets stuck. I do have the freetype @2.12.1_0+universal port installed at the moment.

It's a shame, I really thought I was starting to get somewhere.
Gcenx
Level 6
Level 6
Posts: 709
Joined: Mon Dec 25, 2017 12:11 pm

Re: Scrolling afterimages and NtUserScrollWindowEx

Post by Gcenx »

contextnerror wrote: Mon Aug 22, 2022 12:46 am Stuck again, but this time in a different spot. The only way I was able to make progress from the last time was to eliminate LDFLAGS from the configure statement entirely. Even trying to use LDFLAGS=“-Wl,-rpath,/opt/X11/lib” from the wiki for building from source on mac still failed. I now have a version of wine built from source, but trying to install an .exe or run winecfg gives the error "Wine cannot find the FreeType font library. To enable Wine to use TrueType fonts please install a version of FreeType greater than or equal to 2.0.5." and then gets stuck. I do have the freetype @2.12.1_0+universal port installed at the moment.

It's a shame, I really thought I was starting to get somewhere.
The reason is you’d set LDFLAGS=“-Wl,-rpath,/opt/X11/lib” instead of LDFLAGS=“-Wl,-rpath,/opt/local/lib” as I’d explained.

wine doesn’t know about /opt/local/lib so it’s trying to load the needed dylibs from /opt/X11/lib then standard library locations.
Gcenx
Level 6
Level 6
Posts: 709
Joined: Mon Dec 25, 2017 12:11 pm

Re: Scrolling afterimages and NtUserScrollWindowEx

Post by Gcenx »

Instead of passing that to configure you could instead do

Code: Select all

export LDFLAGS=“-Wl,-rpath,/opt/local/lib”
configure will pickup some env options and use then during the build.
contextnerror
Level 2
Level 2
Posts: 13
Joined: Fri Mar 11, 2022 2:16 pm

Re: Scrolling afterimages and NtUserScrollWindowEx

Post by contextnerror »

Sorry, I meant to clarify that I only tried using /opt/X11/lib after trying /opt/local/lib first, and failing repeatedly. You can see in the log file I uploaded that /opt/local/lib was used.

Using export instead does not work either. Like previous attempts, it always seems to fail at this specific point:

Code: Select all

configure:5078: checking whether the C compiler works
configure:5100: gcc   “-Wl,-rpath,/opt/local/lib” conftest.c  >&5
clang: error: no such file or directory: '“-Wl,-rpath,/opt/local/lib”'
configure:5104: $? = 1
configure:5144: result: no
It's almost the exact same as the last one I included, but I've attached the full log file.
Attachments
config.log.zip
(3.5 KiB) Downloaded 392 times
Gcenx
Level 6
Level 6
Posts: 709
Joined: Mon Dec 25, 2017 12:11 pm

Re: Scrolling afterimages and NtUserScrollWindowEx

Post by Gcenx »

I just used the below and no issues

Code: Select all

export LDFLAGS="-Wl,-rpath,/opt/local/lib"
configure --enable-win64
make -j$(sysctl -n hw.activecpu)
I've attached config.log so you can see.
Attachments
config.log.zip
(44.64 KiB) Downloaded 384 times
contextnerror
Level 2
Level 2
Posts: 13
Joined: Fri Mar 11, 2022 2:16 pm

Re: Scrolling afterimages and NtUserScrollWindowEx

Post by contextnerror »

It seems like something about my compiler version was causing the quotation marks to be mistakenly interpreted as part of the path. Using the clang-13 port instead seems to work, but also fails to find any sound system, which is new. Make had a few errors throughout, the output has been attached.
make_error.rtf.zip
(228.38 KiB) Downloaded 391 times
Trying to install the application for testing or use winecfg is where problems show up. The windows for wine and Wine Mono Installer are invisible, and sit around until the whole thing eventually times out.
Image

Output from the event:

Code: Select all

christinel18:wine-git christinel18$ /Users/christinel18/wine-git/wine64 WINEARCH=win64 winecfg
wine: created the configuration directory '/Users/christinel18/.wine'
002c:fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.Windows.Common-Controls" (6.0.0.0)
0048:fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.Windows.Common-Controls" (6.0.0.0)
0050:fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.Windows.Common-Controls" (6.0.0.0)
0048:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hr 0x80004002
0048:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, hr 0x80004002
0048:err:ole:apartment_get_local_server_stream Failed: 0x80004002
0048:err:ole:start_rpcss Failed to open RpcSs service
0050:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hr 0x80004002
0050:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, hr 0x80004002
0050:err:ole:apartment_get_local_server_stream Failed: 0x80004002
0050:fixme:imm:ImeSetActiveContext (0000000000010026, 0): stub
0050:fixme:imm:ImmReleaseContext (0000000000010020, 0000000000010026): stub
002c:fixme:imm:ImeSetActiveContext (000000000001004A, 1): stub
002c:fixme:imm:ImmReleaseContext (0000000000010048, 000000000001004A): stub
0094:fixme:imm:ImeSetActiveContext (0000000000010086, 1): stub
0094:fixme:imm:ImmReleaseContext (000000000001008E, 0000000000010086): stub
0024:err:environ:run_wineboot boot event wait timed out
Application could not be started, or no application associated with the specified file.
ShellExecuteEx failed: Environment variable not found.

christinel18:wine-git christinel18$ 0094:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0094:fixme:file:NtLockFile I/O completion on lock not implemented yet
0094:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
0094:err:mscoree:LoadLibraryShim error reading registry key for installroot
0094:err:mscoree:LoadLibraryShim error reading registry key for installroot
0094:err:mscoree:LoadLibraryShim error reading registry key for installroot
0094:err:mscoree:LoadLibraryShim error reading registry key for installroot
00ac:fixme:file:NtLockFile I/O completion on lock not implemented yet
00ac:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
00ac:err:mscoree:LoadLibraryShim error reading registry key for installroot
00ac:err:mscoree:LoadLibraryShim error reading registry key for installroot
00ac:err:mscoree:LoadLibraryShim error reading registry key for installroot
00ac:err:mscoree:LoadLibraryShim error reading registry key for installroot
00ac:err:msi:execute_command unable to execute command 1359
00ac:err:msi:execute_command unable to execute command 1359
00ac:fixme:msi:internal_ui_handler internal UI not implemented for message 0x0b000000 (UI level = 5)
00ac:fixme:msi:internal_ui_handler internal UI not implemented for message 0x0b000000 (UI level = 5)
0094:fixme:msi:internal_ui_handler internal UI not implemented for message 0x0b000000 (UI level = 1)
0094:fixme:msi:internal_ui_handler internal UI not implemented for message 0x0b000000 (UI level = 1)
00cc:fixme:imm:ImeSetActiveContext (00000000000100B2, 1): stub
00cc:fixme:imm:ImmReleaseContext (00000000000300A6, 00000000000100B2): stub
0138:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0148:fixme:wineusb:add_usb_device Interface 1 has 6 alternate settings; using the first one.
0148:err:wineusb:add_usb_device Failed to get configuration descriptor: Entity not found
wine: configuration in L"/Users/christinel18/.wine" has been updated.
0138:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0138:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0138:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0138:fixme:wineusb:query_id Unhandled ID query type 0x5.
0138:fixme:wineusb:query_id Unhandled ID query type 0x5.
0138:fixme:wineusb:query_id Unhandled ID query type 0x5.
0138:fixme:wineusb:query_id Unhandled ID query type 0x5.
0138:fixme:wineusb:query_id Unhandled ID query type 0x5.
0138:fixme:wineusb:query_id Unhandled ID query type 0x5.
0138:fixme:wineusb:query_id Unhandled ID query type 0x5.

Gcenx
Level 6
Level 6
Posts: 709
Joined: Mon Dec 25, 2017 12:11 pm

Re: Scrolling afterimages and NtUserScrollWindowEx

Post by Gcenx »

From the screenshot I’m guessing your not running macOS Mojave or later meaning you’ve ran into https://bugs.winehq.org/show_bug.cgi?id=52354

If that’s indeed the case you’ll need to apply the following patches you can grab from https://github.com/Gcenx/macports-wine/ ... evel/files

1001-Revert-winemac.drv-Remove-now-unused-WineContentView.diff
1002-Revert-winemac.drv-Set-the-surface-contents-directly.diff
1003-Revert-winemac.drv-Move-GL-context-update-code-to-vi.diff
1004-Revert-winemac.drv-Use-a-mask-layer-to-support-windo.diff
1005-Revert-winemac.drv-Enable-layer-backed-views.diff

Make sure your inside the source directory first then go by the following example for each patch.

Code: Select all

patch -p1 < /path/to/1001-Revert-winemac.drv-Remove-now-unused-WineContentView.diff
After that rebuild as you did prior and it should now be working normally (if your below 10.10 it gets more complicated)
contextnerror
Level 2
Level 2
Posts: 13
Joined: Fri Mar 11, 2022 2:16 pm

Re: Scrolling afterimages and NtUserScrollWindowEx

Post by contextnerror »

The patches worked, and I think I found the commit! It's 4cb229a97c1cf6d430a99f3b976064aa10ff3d96, assuming I did it right. I don't know if I need to modify the bug report since I used a patched version of Wine, but I've added the commit hash.
Gcenx
Level 6
Level 6
Posts: 709
Joined: Mon Dec 25, 2017 12:11 pm

Re: Scrolling afterimages and NtUserScrollWindowEx

Post by Gcenx »

contextnerror wrote: Mon Aug 29, 2022 2:31 am The patches worked, and I think I found the commit! It's 4cb229a97c1cf6d430a99f3b976064aa10ff3d96, assuming I did it right. I don't know if I need to modify the bug report since I used a patched version of Wine, but I've added the commit hash.
If you open a bug just say you’d used reverts to workaround 52354, the recently released CX22 also used did this to make it work on macOS Hig Sierra.
Locked