https://bugs.winehq.org/show_bug.cgi?id=45116
Bug ID: 45116 Summary: TomTom MyDrive Connect needs implementation of iphlpapi.dll.NotifyAddrChange Product: Wine Version: 3.7 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: iphlpapi Assignee: wine-bugs@winehq.org Reporter: h.mth@web.de Distribution: ---
Follow up bugreport of bug 41034. Patches and backtraces(vanilla and staging) will be attached. Application crashes shortly after device is attached.
To activate device (i.e.: TomTom Via 135), linux needs: CONFIG_USB_NET_CDCETHER=y
Wine Staging 3.7 allows to login into TomTom account.
https://bugs.winehq.org/show_bug.cgi?id=45116
--- Comment #1 from Hanno Meyer-Thurow h.mth@web.de --- Created attachment 61298 --> https://bugs.winehq.org/attachment.cgi?id=61298 Implementation of NotifyAddrChange part 1 from Erich E. Hoover
https://bugs.winehq.org/show_bug.cgi?id=45116
--- Comment #2 from Hanno Meyer-Thurow h.mth@web.de --- Created attachment 61299 --> https://bugs.winehq.org/attachment.cgi?id=61299 Implementation of NotifyAddrChange part 2 from Erich E. Hoover
https://bugs.winehq.org/show_bug.cgi?id=45116
--- Comment #3 from Hanno Meyer-Thurow h.mth@web.de --- Created attachment 61300 --> https://bugs.winehq.org/attachment.cgi?id=61300 Implementation of NotifyAddrChange part 3 from Erich E. Hoover
https://bugs.winehq.org/show_bug.cgi?id=45116
--- Comment #4 from Hanno Meyer-Thurow h.mth@web.de --- Created attachment 61301 --> https://bugs.winehq.org/attachment.cgi?id=61301 Implementation of NotifyAddrChange: build fixes for 3.7
https://bugs.winehq.org/show_bug.cgi?id=45116
--- Comment #5 from Hanno Meyer-Thurow h.mth@web.de --- Created attachment 61302 --> https://bugs.winehq.org/attachment.cgi?id=61302 backtrace vanilla
https://bugs.winehq.org/show_bug.cgi?id=45116
--- Comment #6 from Hanno Meyer-Thurow h.mth@web.de --- Created attachment 61303 --> https://bugs.winehq.org/attachment.cgi?id=61303 backtrace staging
https://bugs.winehq.org/show_bug.cgi?id=45116
--- Comment #7 from Hanno Meyer-Thurow h.mth@web.de --- In patch "Implementation of NotifyAddrChange part 1 from Erich E. Hoover" the ws2 test should be replaced. (test_sioAddressListChange2 -> test_sioAddressListChange)
https://bugs.winehq.org/show_bug.cgi?id=45116
--- Comment #8 from Hanno Meyer-Thurow h.mth@web.de --- A ha, crash is because of the apc function. That one and the 'SERVER_START_REQ( register_async )' part needs to be adjusted for current state. Seems to be trivial, if you know that part of Wine. I do not. :-(
Anyone interested in doing a patch I may try? Or explain what to change. Whatever is easier.
https://bugs.winehq.org/show_bug.cgi?id=45116
tokktokk fdsfgs@krutt.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fdsfgs@krutt.org
https://bugs.winehq.org/show_bug.cgi?id=45116
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
https://bugs.winehq.org/show_bug.cgi?id=45116
Hanno Meyer-Thurow h.mth@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #61301|0 |1 is obsolete| |
--- Comment #9 from Hanno Meyer-Thurow h.mth@web.de --- Created attachment 61313 --> https://bugs.winehq.org/attachment.cgi?id=61313 Implementation of NotifyAddrChange: build fixes for 3.7
Added 'struct ip_async_io' to handle callback with user data. Taken from fileio code.
With this variant I get a null pointer exception. And I see this repeating:
0035:err:iphlpapi:NotifyAddrChange Could not create interface monitoring socket.
Any ideas or pointers are welcome.
https://bugs.winehq.org/show_bug.cgi?id=45116
Hanno Meyer-Thurow h.mth@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #61313|0 |1 is obsolete| |
--- Comment #10 from Hanno Meyer-Thurow h.mth@web.de --- Created attachment 61331 --> https://bugs.winehq.org/attachment.cgi?id=61331 Implementation of NotifyAddrChange: build fixes for 3.7 (v3)
Added 'struct ip_async_io' to handle callback with user data. Taken from fileio code. Minor fixes like releasing non-acquired fd in IPHLPAPI_initmonitorhandle and properly releasing ip_async_io instance in IPHLPAPI_apc_NotifyAddrChange.
With this variant I see call to blocking NotifyAddrChange(PHANDLE handle=nil, LPOVERLAPPED overlapped=nil) misbehaving after IPHLPAPI_apc_NotifyAddrChange processed once successfully (with releasing of ip_async_io instance). IPHLPAPI_monitorifchange returns success always for whatever reason. In return user application is "hammering" NotifyAddrChange.
Once out-of-fds it crashes between fd=255 fd=256 with null pointer exception.
https://bugs.winehq.org/show_bug.cgi?id=45116
Hanno Meyer-Thurow h.mth@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #61331|0 |1 is obsolete| |
--- Comment #11 from Hanno Meyer-Thurow h.mth@web.de --- Created attachment 61332 --> https://bugs.winehq.org/attachment.cgi?id=61332 Implementation of NotifyAddrChange: build fixes for 3.7 (v4)
Added 'struct ip_async_io' to handle callback with user data. Taken from fileio code. Minor fixes like releasing non-acquired fd in IPHLPAPI_initmonitorhandle and properly releasing ip_async_io instance in IPHLPAPI_apc_NotifyAddrChange.
With this variant application will not crash anymore, device still not detected. Though, there is still a null pointer exception. I will attach a log minus d3d/dxgi messages.
https://bugs.winehq.org/show_bug.cgi?id=45116
--- Comment #12 from Hanno Meyer-Thurow h.mth@web.de --- Created attachment 61333 --> https://bugs.winehq.org/attachment.cgi?id=61333 TomTom MyDrive Connect log (minus d3d/dxgi messages)
Interesting snipped of log (debugger does not start whysoever):
wine: Unhandled page fault on read access to 0x00000000 at address 0x7f9fc7a764f4 (thread 0019), starting debugger... 0009:fixme:winsock:WSALookupServiceBeginW (0x33c604 0x00000ff0 0x33c644) Stub! [8:9:0506/204700.905:ERROR:network_change_notifier_win.cc(156)] WSALookupServiceBegin failed with: 8 0009:fixme:winsock:WSALookupServiceBeginW (0x33c738 0x00000ff0 0x33c778) Stub! [8:9:0506/204701.906:ERROR:network_change_notifier_win.cc(156)] WSALookupServiceBegin failed with: 8
https://bugs.winehq.org/show_bug.cgi?id=45116
--- Comment #13 from Hanno Meyer-Thurow h.mth@web.de --- Hokay, that unhandled page fault on read access to 0x00000000 happens in winedevice.exe. If I try to attach winedbg to that process it just hangs.
$ env WINEPREFIX="/home/die/.wine-staging" /usr/lib/wine-staging-3.7/bin/winedbg Wine-dbg>info process pid threads executable (all id:s are in hex) 00000010 4 'explorer.exe' 0000000e 5 'services.exe' 00000022 4 _ 'winedevice.exe' 0000001d 3 _ 'plugplay.exe' 00000013 4 _ 'winedevice.exe' 00000008 9 'TomTom MyDrive Connect.exe' Wine-dbg>attach 19 *** hangs here trying to attach to pid 00000013 ***
And the TomTom application hangs, too. How would I properly attach to a winedevice.exe process?
https://bugs.winehq.org/show_bug.cgi?id=45116
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net
--- Comment #14 from Anastasius Focht focht@gmx.net --- Hello Hanno,
--- quote --- And the TomTom application hangs, too. How would I properly attach to a winedevice.exe process? --- quote ---
The hang is usually an indication you're using 32-bit winedbg and try to attach to a 64-bit process. Use 'wine64 winedbg' to run 64-bit winedbg. I admit it's non-obvious and Wine definitely should provide an out-of-the-box solution that works.
NOTE: If there is already a crash reporter attached due to 'AeDebug' setting you won't be able to attach another time. There is also bug 35928 for not showing crash dialog when auto-attaching.
Regards
https://bugs.winehq.org/show_bug.cgi?id=45116
Hanno Meyer-Thurow h.mth@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #61302|0 |1 is obsolete| | Attachment #61303|0 |1 is obsolete| | Attachment #61332|0 |1 is obsolete| |
--- Comment #15 from Hanno Meyer-Thurow h.mth@web.de --- Created attachment 61351 --> https://bugs.winehq.org/attachment.cgi?id=61351 Implementation of NotifyAddrChange: build fixes for 3.7 (v5)
Added 'struct ip_async_io' to handle callback with user data. Taken from fileio code. Minor fixes like releasing non-acquired fd in IPHLPAPI_initmonitorhandle and properly releasing ip_async_io instance in IPHLPAPI_apc_NotifyAddrChange.
v4: Refactored reading of netlink messages; fixes application hang. (forgot before) v5: pass overlapped.hEvent as async_data_t.event. Do not set event in internal apc callback. Seems more sound this way.
With this variant application will not crash anymore, device still not detected.
Null pointer exception happens in mountmgr.sys:query_mount_points. My bet, implementing KERNEL32.dll.SetVolumeMountPointW and not implementing KERNEL32.dll.DeleteVolumeMountPointW brings inconsistency in internal mount list. O well, seems not that hard to do. :-)
https://bugs.winehq.org/show_bug.cgi?id=45116
Andreas Gnau Rondom@Rondom.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |Rondom@Rondom.de
https://bugs.winehq.org/show_bug.cgi?id=45116
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Summary|TomTom MyDrive Connect |TomTom MyDrive Connect 4.x |needs implementation of |needs implementation of |iphlpapi.dll.NotifyAddrChan |iphlpapi.dll.NotifyAddrChan |ge |ge Keywords| |download URL| |https://web.archive.org/web | |/20180624025612/http://cdn. | |sa.services.tomtom.com/stat | |ic/sa/Windows/InstallTomTom | |MyDriveConnect.exe
--- Comment #16 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming and adding stable download from Internet archive for the installer (4.2.x)
https://web.archive.org/web/20180624025612/http://cdn.sa.services.tomtom.com...
Obviously still present.
https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/iphlpapi/iphlpapi_mai...
$ sha1sum InstallTomTomMyDriveConnect.exe 5e3ee07c72d66e54b5860a66793fbe5cae36027e InstallTomTomMyDriveConnect.exe
$ du -sh InstallTomTomMyDriveConnect.exe 66M InstallTomTomMyDriveConnect.exe
$ wine --version wine-4.4
Regards
https://bugs.winehq.org/show_bug.cgi?id=45116
wine@acolombier.dev changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wine@acolombier.dev
--- Comment #17 from wine@acolombier.dev --- Hi,
This issue also seems to impact Native Instrument Daemon (NTKDaemon.exe).
I can see that `NotifyAddrChange` was implemented but doesn't seem to have make its way to the source (https://gitlab.winehq.org/wine/wine/-/blob/wine-8.0-rc3/dlls/iphlpapi/iphlpa...). Is there anything blocking that I can maybe help with? (testing, basic debugging, etc..)
Thanks