Windows program crashes Wine with socket connection

Questions about Wine on Linux
Locked
mnemo
Level 1
Level 1
Posts: 6
Joined: Mon Jul 22, 2019 7:25 am

Windows program crashes Wine with socket connection

Post by mnemo »

Hello and greetings, I'm going "public" with this problem in hope that someone can help me or point me to some tips...

For several years we were using Wine 1.7.18 on Lubuntu 13 with a proprietary Windows application programmed in Delphi that was running fine for the last few years. Lubuntu is installed on a small embedded PC with an AMD Geode LX processor at 500 MHz and 1 GB RAM and there are about a 100 machines. Switching the PCs is not easily done because the use requires an LVDM interface to connect to special LED screens. The used board is the WAFER-LX from IEI. The application is a simple program that displays several datapoints in a small window on the desktop (see attached screenshot).

Not at least due to security requirements all of this needs to be updated, but using current (and older) Wine versions, the Windows application crashes when communicating using HTTP via TCP/IP. The developer and source of the program are available and when he exchanged the used HTTP software components with newer Delphi components, the application first seemed to work, but now crashes when quitting the program instead of crashing on the first connection attempt.

The basic error that is printed in Wine is this:
0009:err:seh:setup_exception_record nested exception on signal stack in thread 0009 eip 7bc83b0f esp 7ffdbaf0 stack 0x232000-0x330000

Creating various types of Wine logs with +relay +winsock and other options always lead back to this series of events which revolve around a call to ws2_32.shutdown() and then ntdll.wine_server_handle_to_fd().

Winedbg does not work. When attaching to the Windows process, the application crashes and Winedbg says "Can't attach to process ... Error 5". Running the application in Winedbg directly generates the above error message plus "Process of pid=xxxx has terminated". There is no backtrace or anything.

I have tried various Linux distributions using 4.x kernels (Bodhi Linux 5, Linux Mint Debian Edition 3, Debian 9.9, Debian 10, Ubuntu 16.04) and also tried Wine 2.0.2, which is the oldest available binary package, and everytime the above error occurs. Building a custom Linux kernel for the machine also didn't change anything. Building Wine 1.7.18 on Debian 10 resulted in several compile time errors that I cannot fix.

When using the SAME hard drive via USB on a newer Dell PC, the error does NOT occur, but of course it uses completely different hardware and drivers (cpu, networking, graphics, southbridge).

We're at a complete loss at how to continue now. Exchanging the hardware is not really an option. Recoding the application for Linux is also not possible. Kernel options "noapic" and "acpi=off" didn't help. "winetricks wininet" did not help and using a native "wsock32.dll" is not possible according to the Wine documentation.

As a sidenote, "Winecfg" also crashes on the machine with the same error message when the "Drives" tab is selected. Using strace I determined that creating the empty file ".wine/dosdevices/mountpointmanager" prevents the crash, with a dialog box saying "You don't have a drive C. This is not so great. Remember to click 'Add' in the Drives tab to create one!". One can then use Autodetect and use the dialog, but it won't overwrite the "mountpointmanager" file.

Any ideas?

+seh +relay Log #1

Code: Select all

68536.332:0038:0039:Call KERNEL32.WideCharToMultiByte(000004e4,00000000,006acde4 L"shutdown",00000008,00e36c2c,00000008,00000000,00000000) ret=004107e4
68536.332:0038:0039:Ret  KERNEL32.WideCharToMultiByte() retval=00000008 ret=004107e4
68536.332:0038:0039:Call KERNEL32.GetProcAddress(7df70000,00e36c2c "shutdown") ret=00416640
68536.332:0038:0039:Ret  KERNEL32.GetProcAddress() retval=7df7f73c ret=00416640
68536.332:0038:0039:Call ws2_32.shutdown(0000009c,00000001) ret=006acda5
68536.332:0038:0039:Call ntdll.wine_server_handle_to_fd(0000009c,00000000,0032f9e8,0032f9e4) ret=7df8cc76
68536.332:0038:0039:Ret  ntdll.wine_server_handle_to_fd() retval=00000000 ret=7df8cc76
68536.333:0038:0039:err:seh:setup_exception_record nested exception on signal stack in thread 0039 eip 7bc83b0f esp 7ffdbaf0 stack 0x232000-0x330000
+seh +relay Log #2

Code: Select all

70588.787:0044:0045:Call KERNEL32.GetProcAddress(7d590000,01ad6f2c "shutdown") ret=00416648
70588.787:0044:0045:Ret  KERNEL32.GetProcAddress() retval=7d59c73c ret=00416648
70588.787:0044:0045:Call ws2_32.shutdown(000000c8,00000001) ret=006af711
70588.787:0044:0045:Call ntdll.wine_server_handle_to_fd(000000c8,00000000,0032f9e8,0032f9e4) ret=7d5a9c76
70588.787:0044:0045:Ret  ntdll.wine_server_handle_to_fd() retval=00000000 ret=7d5a9c76
70588.789:0044:0045:err:seh:setup_exception_record nested exception on signal stack in thread 0045 eip 7bc83b0f esp 7ffdbaf0 stack 0x232000-0x330000
+winsock,+wininet Log

Code: Select all

71128.760:005b:0061:trace:wininet:DllMain 0x79650000,3,(nil)
71128.761:005b:0061:trace:winsock:DllMain 0x7d560000 0x3 (nil)
71128.764:005b:005c:trace:winsock:WS_shutdown socket 00c0, how 0x1, options 0x0
71128.764:005b:005c:trace:winsock:WS2_register_async_shutdown socket 00c0 type 2
71128.764:005b:005c:err:seh:setup_exception_record nested exception on signal stack in thread 005c eip 7bc83b0f esp 7ffdbaf0 stack 0x232000-0x330000
+seh +relay Log

Code: Select all

0009:Ret  ws2_32.ioctlsocket() retval=00000000 ret=00662f6e
0009:Call user32.PostMessageW(000100c2,00000403,00000000,00000000) ret=006b4f0c
0009:Ret  user32.PostMessageW() retval=00000001 ret=006b4f0c
0009:Call KERNEL32.GetProcAddress(7d560000,00662d78 "shutdown") ret=00662015
0009:Ret  KERNEL32.GetProcAddress() retval=7d52d73c ret=00662015
0009:Call ws2_32.shutdown(00000094,00000001) ret=00662d66
0009:Call ntdll.wine_server_handle_to_fd(00000094,00000000,0032f488,0032f484) ret=7d53ac76
0009:Ret  ntdll.wine_server_handle_to_fd() retval=00000000 ret=7d53ac76
0009:err:seh:setup_exception_record nested exception on signal stack in thread 0009 eip 7bc83b0f esp 7ffdbaf0 stack 0x232000-0x330000
In strace it looks like this:

Code: Select all

getsockopt(24, SOL_SOCKET, SO_ACCEPTCONN, [0], [4]) = 0
ioctl(24, FIONREAD, [0])                = 0
close(24)                               = 0
rt_sigprocmask(SIG_BLOCK, [HUP INT USR1 USR2 ALRM CHLD IO], [], 8) = 0
write(3, "\212\0\0\0\0\0\0\0\0\0\0\0\t\0\0\0\6\0\0\0\0\0\0\0\272\0\1\0\3\4\0\0"..., 64) = 64
read(5, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 64) = 64
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
dup(19)                                 = 24
rt_sigprocmask(SIG_BLOCK, [HUP INT USR1 USR2 ALRM CHLD IO], [], 8) = 0
write(3, "\226\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\224\0\0\0\0\0\0\0\214c\30\0\0\0\0\0"..., 64) = 64
read(5, "\3\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 64) = 64
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGUSR1 {si_signo=SIGUSR1, si_code=SI_TKILL, si_pid=1225, si_uid=1000} ---
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_ACCERR, si_addr=0x7ffdc000} ---
rt_sigprocmask(SIG_BLOCK, [HUP INT USR1 USR2 ALRM CHLD IO], [HUP INT USR1 SEGV USR2 ALRM CHLD IO], 8) = 0
rt_sigprocmask(SIG_SETMASK, [HUP INT USR1 SEGV USR2 ALRM CHLD IO], NULL, 8) = 0
write(2, "0009:err:seh:setup_exception_rec"..., 1340009:err:seh:setup_exception_record nested exception on signal stack in thread 0009 eip 7bc83b0f esp 7ffdbaf0 stack 0x232000-0x330000
) = 134
rt_sigprocmask(SIG_BLOCK, [HUP INT USR1 USR2 ALRM CHLD IO], NULL, 8) = 0
close(7)                                = 0
close(8)                                = 0
close(5)                                = 0
close(3)                                = 0
+relay +seh +winsock +wininet Log

Code: Select all

82680.795:0008:002f:Call ntdll.wine_server_release_fd(000000c4,0000001d) ret=7d67b77b
82680.796:0008:002f:Ret  ntdll.wine_server_release_fd() retval=00000000 ret=7d67b77b
82680.796:0008:002f:Ret  ws2_32.select() retval=00000000 ret=006bbebc
82680.796:0008:002f:Call KERNEL32.SetEvent(00000078) ret=00479fd3
82680.796:0008:0009:Ret  KERNEL32.Sleep() retval=0032faa4 ret=0074f7ca
82680.796:0008:0009:Call KERNEL32.WideCharToMultiByte(000004e4,00000000,006af750 L"shutdown",00000008,00000000,00000000,00000000,00000000) ret=004107e4
82680.796:0008:0009:Ret  KERNEL32.WideCharToMultiByte() retval=00000008 ret=004107e4
82680.796:0008:0009:Call KERNEL32.WideCharToMultiByte(000004e4,00000000,006af750 L"shutdown",00000008,01ad6eec,00000008,00000000,00000000) ret=004107e4
82680.796:0008:0009:Ret  KERNEL32.WideCharToMultiByte() retval=00000008 ret=004107e4
82680.796:0008:0009:Call KERNEL32.GetProcAddress(7d670000,01ad6eec "shutdown") ret=00416648
82680.797:0008:0009:Ret  KERNEL32.GetProcAddress() retval=7d67173c ret=00416648
82680.797:0008:0009:Call ws2_32.shutdown(000000c4,00000001) ret=006af711
82680.797:0008:0009:Call ntdll.wine_server_handle_to_fd(000000c4,00000000,0032f9e8,0032f9e4) ret=7d67ec76
82680.797:0008:0009:Ret  ntdll.wine_server_handle_to_fd() retval=00000000 ret=7d67ec76
82680.797:0008:0009:trace:winsock:WS_shutdown socket 00c4, how 0x1, options 0x0
82680.797:0008:0009:trace:winsock:WS2_register_async_shutdown socket 00c4 type 2
82680.797:0008:002f:Ret  KERNEL32.SetEvent() retval=00000001 ret=00479fd3
82680.797:0008:002f:Call KERNEL32.ExitThread(00000000) ret=0040a7ba
82680.797:0008:002f:Call PE DLL (proc=0x7bd5b070,module=0x7bd20000 L"wininet.dll",reason=THREAD_DETACH,res=(nil))
82680.797:0008:002f:trace:wininet:DllMain 0x7bd20000,3,(nil)
82680.797:0008:002f:Ret  PE DLL (proc=0x7bd5b070,module=0x7bd20000 L"wininet.dll",reason=THREAD_DETACH,res=(nil)) retval=1
82680.797:0008:002f:Call PE DLL (proc=0x7c47d350,module=0x7c460000 L"msctf.dll",reason=THREAD_DETACH,res=(nil))
82680.797:0008:002f:Ret  PE DLL (proc=0x7c47d350,module=0x7c460000 L"msctf.dll",reason=THREAD_DETACH,res=(nil)) retval=1
82680.798:0008:002f:Call PE DLL (proc=0x7d626d80,module=0x7d5c0000 L"msvcrt.dll",reason=THREAD_DETACH,res=(nil))
82680.798:0008:002f:Ret  PE DLL (proc=0x7d626d80,module=0x7d5c0000 L"msvcrt.dll",reason=THREAD_DETACH,res=(nil)) retval=1
82680.798:0008:002f:Call PE DLL (proc=0x7d687b40,module=0x7d670000 L"ws2_32.dll",reason=THREAD_DETACH,res=(nil))
82680.798:0008:002f:trace:winsock:DllMain 0x7d670000 0x3 (nil)
82680.798:0008:002f:Ret  PE DLL (proc=0x7d687b40,module=0x7d670000 L"ws2_32.dll",reason=THREAD_DETACH,res=(nil)) retval=1
82680.798:0008:002f:Call PE DLL (proc=0x7e63ccd0,module=0x7e570000 L"ole32.dll",reason=THREAD_DETACH,res=(nil))
82680.798:0008:002f:Ret  PE DLL (proc=0x7e63ccd0,module=0x7e570000 L"ole32.dll",reason=THREAD_DETACH,res=(nil)) retval=1
82680.798:0008:002f:Call PE DLL (proc=0x7e525cf0,module=0x7e4e0000 L"rpcrt4.dll",reason=THREAD_DETACH,res=(nil))
82680.798:0008:002f:Ret  PE DLL (proc=0x7e525cf0,module=0x7e4e0000 L"rpcrt4.dll",reason=THREAD_DETACH,res=(nil)) retval=1
82680.798:0008:002f:Call PE DLL (proc=0x7e2cd210,module=0x7e2c0000 L"imm32.dll",reason=THREAD_DETACH,res=(nil))
82680.798:0008:002f:Ret  PE DLL (proc=0x7e2cd210,module=0x7e2c0000 L"imm32.dll",reason=THREAD_DETACH,res=(nil)) retval=1
82680.798:0008:002f:Call PE DLL (proc=0x7e918790,module=0x7e870000 L"user32.dll",reason=THREAD_DETACH,res=(nil))
82680.798:0008:002f:Call winex11.drv.ThreadDetach() ret=7e8ffa1e
82680.798:0008:002f:Ret  winex11.drv.ThreadDetach() retval=00000000 ret=7e8ffa1e
82680.800:0008:002d:Ret  gdi32.CreateCompatibleDC() retval=00a40117 ret=0069c1fe
82680.800:0008:002d:Call gdi32.SetViewportOrgEx(00a40117,00000000,00000000,00000000) ret=0069c1bc
82680.800:0008:002d:Ret  gdi32.SetViewportOrgEx() retval=00000001 ret=0069c1bc
82680.800:0008:002d:Call gdi32.SetMapMode(00a40117,00000008) ret=0069c1c4
82680.800:0008:002d:Call user32.GetDpiForSystem() ret=7e753516
82680.800:0008:002d:Ret  user32.GetDpiForSystem() retval=00000060 ret=7e753516
82680.801:0008:002d:Call user32.GetSystemMetrics(00000000) ret=7e791ae5
82680.801:0008:002d:Call winex11.drv.EnumDisplayMonitors(00000000,00000000,7e8f3020,01f8f8f8) ret=7e8f4412
82680.801:0008:002d:Call winex11.drv.GetMonitorInfo(00000001,01f8f764) ret=7e8f3eb7
82680.801:0008:002d:Ret  winex11.drv.GetMonitorInfo() retval=00000001 ret=7e8f3eb7
82680.801:0008:002d:Ret  winex11.drv.EnumDisplayMonitors() retval=00000001 ret=7e8f4412
82680.801:0008:002d:Ret  user32.GetSystemMetrics() retval=00000320 ret=7e791ae5
82680.801:0008:002d:Call user32.GetDpiForSystem() ret=7e753516
82680.801:0008:002d:Ret  user32.GetDpiForSystem() retval=00000060 ret=7e753516
82680.801:0008:002d:Call user32.GetSystemMetrics(00000001) ret=7e791ac5
82680.801:0008:002d:Call winex11.drv.EnumDisplayMonitors(00000000,00000000,7e8f3020,01f8f8f8) ret=7e8f4412
82680.801:0008:002d:Call winex11.drv.GetMonitorInfo(00000001,01f8f764) ret=7e8f3eb7
82680.801:0008:002d:Ret  winex11.drv.GetMonitorInfo() retval=00000001 ret=7e8f3eb7
82680.801:0008:002d:Ret  winex11.drv.EnumDisplayMonitors() retval=00000001 ret=7e8f4412
82680.801:0008:002d:Ret  user32.GetSystemMetrics() retval=00000258 ret=7e791ac5
82680.801:0008:002d:Call user32.GetSystemMetrics(00000000) ret=7e791ae5
82680.801:0008:002d:Call winex11.drv.EnumDisplayMonitors(00000000,00000000,7e8f3020,01f8f978) ret=7e8f4412
82680.802:0008:002d:Call winex11.drv.GetMonitorInfo(00000001,01f8f7e4) ret=7e8f3eb7
82680.802:0008:002d:Ret  winex11.drv.GetMonitorInfo() retval=00000001 ret=7e8f3eb7
82680.802:0008:002d:Ret  winex11.drv.EnumDisplayMonitors() retval=00000001 ret=7e8f4412
82680.802:0008:002d:Ret  user32.GetSystemMetrics() retval=00000320 ret=7e791ae5
82680.802:0008:002d:Call user32.GetSystemMetrics(00000001) ret=7e791ac5
82680.802:0008:002d:Call winex11.drv.EnumDisplayMonitors(00000000,00000000,7e8f3020,01f8f978) ret=7e8f4412
82680.802:0008:002d:Call winex11.drv.GetMonitorInfo(00000001,01f8f7e4) ret=7e8f3eb7
82680.802:0008:002d:Ret  winex11.drv.GetMonitorInfo() retval=00000001 ret=7e8f3eb7
82680.802:0008:002d:Ret  winex11.drv.EnumDisplayMonitors() retval=00000001 ret=7e8f4412
82680.802:0008:002d:Ret  user32.GetSystemMetrics() retval=00000258 ret=7e791ac5
82680.802:0008:002d:Ret  gdi32.SetMapMode() retval=00000001 ret=0069c1c4
82680.802:0008:002d:Call gdi32.SetWindowExtEx(00a40117,00000064,00000064,00000000) ret=0069c1d0
82680.802:0008:002d:Ret  gdi32.SetWindowExtEx() retval=00000001 ret=0069c1d0
82680.802:0008:002d:Call gdi32.SetViewportExtEx(00a40117,00000064,00000064,00000000) ret=0069c1e1
82680.803:0008:002d:Ret  gdi32.SetViewportExtEx() retval=00000001 ret=0069c1e1
82680.803:0008:002d:Call gdi32.LPtoDP(00a40117,01f8fe24,00000002) ret=0069c22c
82680.803:0008:002d:Ret  gdi32.LPtoDP() retval=00000001 ret=0069c22c
82680.803:0008:002d:Call gdi32.DeleteDC(00a40117) ret=0069c242
82680.803:0008:002d:Call user32.GetDpiForSystem() ret=7e7bdf05
82680.803:0008:002d:Ret  user32.GetDpiForSystem() retval=00000060 ret=7e7bdf05
82680.803:0008:002d:Ret  gdi32.DeleteDC() retval=00000001 ret=0069c242
82680.803:0008:002d:Call user32.InvalidateRect(000100ca,01f8fe24,00000000) ret=0069a8ac
82680.803:0008:0009:err:seh:setup_exception_record nested exception on signal stack in thread 0009 eip 7bc83b0f esp 7ffdbaf0 stack 0x232000-0x330000
82680.804:0025:0026:Ret  winex11.drv.MsgWaitForMultipleObjectsEx() retval=00000000 ret=7e87eece
82680.805:0025:0026:Ret  user32.GetMessageW() retval=00000001 ret=7eaf65c8
82680.805:0025:0026:Call user32.DispatchMessageW(0033f304) ret=7eaf65b9
82680.805:0025:0026:Call window proc 0x7e83f720 (hwnd=0x10026,msg=WM_PARENTNOTIFY,wp=00000002,lp=00010076)
82680.805:0025:0026:Ret  window proc 0x7e83f720 (hwnd=0x10026,msg=WM_PARENTNOTIFY,wp=00000002,lp=00010076) retval=00000000
Here is the +relay log from the above section on the Dell PC when the application continues to work. Notice the garbled <0x01> byte in the log.

Code: Select all

0009:Ret  user32.PostMessageW() retval=00000001 ret=006b4f0c
0009:Call KERNEL32.GetProcAddress(7d580000,00662d78 "shutdown") ret=00662015
0009:Ret  KERNEL32.GetProcAddress() retval=7d55673c ret=00662015
0009:Call ws2_32.shutdown(00000094,00000001) ret=00662d66
0009:Call ntdll.wine_server_handle_to_fd(00000094,00000000,0032f488,0032f484) ret=7d563c76
0009:Ret  ntdll.wine_server_handle_to_fd() retval=00000000 ret=7d563c76
0009:Call ntdll.wine_server_release_fd(00000094,00000018) ret=7d563e51
0009:Call ntdll.wine_server_release_fd(00000094,00000018<0x01>Call ntdll.wine_server_handle_to_fd(00000094,00000000,7ffdaf08,00000000) ret=7d55a7c3
0009:Ret  ntdll.wine_server_handle_to_fd() retval=00000000 ret=7d55a7c3
0009:Call ntdll.wine_server_release_fd(00000094,00000019) ret=7d55a816
0009:Ret  ntdll.wine_server_release_fd() retval=00000000 ret=7d55a816
0009:Ret  ntdll.wine_server_release_fd() retval=00000000 ret=7d563e51
0009:Ret  ws2_32.shutdown() retval=00000000 ret=00662d66
0009:Call ws2_32.WSAAsyncSelect(00000094,000100bc,00000000,00000000) ret=00662b81
0009:Ret  ws2_32.WSAAsyncSelect() retval=00000000 ret=00662b81
0009:Call KERNEL32.GetProcAddress(7d580000,006631a8 "closesocket") ret=00662015
0009:Ret  KERNEL32.GetProcAddress() retval=7d556574 ret=00662015
0009:Call ws2_32.closesocket(00000094) ret=0066319a
0009:Call ntdll.wine_server_handle_to_fd(00000094,00000001,0032f4f8,00000000) ret=7d55e648
0009:Ret  ntdll.wine_server_handle_to_fd() retval=00000000 ret=7d55e648
0009:Call ntdll.wine_server_release_fd(00000094,00000018) ret=7d55e668
0009:Ret  ntdll.wine_server_release_fd() retval=00000000 ret=7d55e668
0009:Call KERNEL32.CloseHandle(00000094) ret=7d55e670
0009:Ret  KERNEL32.CloseHandle() retval=00000001 ret=7d55e670
0009:Ret  ws2_32.closesocket() retval=00000000 ret=0066319a
0009:Ret  window proc 0x65f1f0 (hwnd=0x100bc,msg=WM_USER+6,wp=00000094,lp=00000020) retval=00000000
Attachments
andonv.png
andonv.png (2.69 KiB) Viewed 3738 times
mnemo
Level 1
Level 1
Posts: 6
Joined: Mon Jul 22, 2019 7:25 am

Re: Windows program crashes Wine with socket connection

Post by mnemo »

Sorry, I forgot the Wine version: Happens with 4.0.1-stable (WineHQ Debian repo) and also 4.12.1-devel (WineHQ Debian repo).
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Windows program crashes Wine with socket connection

Post by Bob Wya »

mnemo wrote:...
I have tried various Linux distributions using 4.x kernels (Bodhi Linux 5, Linux Mint Debian Edition 3, Debian 9.9, Debian 10, Ubuntu 16.04) and also tried Wine 2.0.2, which is the oldest available binary package, and everytime the above error occurs. Building a custom Linux kernel for the machine also didn't change anything. Building Wine 1.7.18 on Debian 10 resulted in several compile time errors that I cannot fix.
...
Any ideas?
...
This is a very specialised problem - that isn't probably going to get an easy resolution. Certainly not without also filing a WineHQ Bug report.
These forums are very low traffic and aren't typically read by any core Wine Developers.

If it's any help I've a mulitilib Wine build script for Debian and Ubuntu - that should enable you to build back to Wine 1.8 (at least!)

See: Github: bobwya / build-multilib-wine

Things start to get quite flaky - if you want to go back further. There are quite a lot of commits between Wine 1.7.18 - 1.7.55 (6 months of development work).
The script supports building a specified Wine Git commit - so would also allow Git bisections to be performed.
This (of course) assumes that your application works with Wine 1.8 - or the oldest Wine version you can get the script to build.


Bob
User avatar
DarkShadow44
Level 8
Level 8
Posts: 1207
Joined: Tue Nov 22, 2016 5:39 pm

Re: Windows program crashes Wine with socket connection

Post by DarkShadow44 »

Since the crash seems to occur in wine code, you could try to add more debug statements to narrow the problem down to the line that eventually crashes. At least that's what I'd do.
mnemo
Level 1
Level 1
Posts: 6
Joined: Mon Jul 22, 2019 7:25 am

Re: Windows program crashes Wine with socket connection

Post by mnemo »

Bob Wya wrote:
mnemo wrote:...
This is a very specialised problem - that isn't probably going to get an easy resolution. Certainly not without also filing a WineHQ Bug report.
These forums are very low traffic and aren't typically read by any core Wine Developers.

If it's any help I've a mulitilib Wine build script for Debian and Ubuntu - that should enable you to build back to Wine 1.8 (at least!)

Bob
Thank you, I'll create a bug then. Building Wine seems like a huge task, I'm not even sure I would get your script to work. :)

Thomas
mnemo
Level 1
Level 1
Posts: 6
Joined: Mon Jul 22, 2019 7:25 am

Re: Windows program crashes Wine with socket connection

Post by mnemo »

DarkShadow44 wrote:Since the crash seems to occur in wine code, you could try to add more debug statements to narrow the problem down to the line that eventually crashes. At least that's what I'd do.
You mean adding WINEDEBUG channels? I have no idea which channel could give more information on where the crash occurs.

I don't have the resources to debug Wine itself. :(

Thomas
User avatar
DarkShadow44
Level 8
Level 8
Posts: 1207
Joined: Tue Nov 22, 2016 5:39 pm

Re: Windows program crashes Wine with socket connection

Post by DarkShadow44 »

mnemo wrote:
DarkShadow44 wrote:You mean adding WINEDEBUG channels? I have no idea which channel could give more information on where the crash occurs.

I don't have the resources to debug Wine itself. :(
No, I mean by modifying the code to show where it currently is - printf debugging. I mean, I'd help, but that's not possible.
mnemo
Level 1
Level 1
Posts: 6
Joined: Mon Jul 22, 2019 7:25 am

Re: Windows program crashes Wine with socket connection

Post by mnemo »

DarkShadow44 wrote: No, I mean by modifying the code to show where it currently is - printf debugging. I mean, I'd help, but that's not possible.
Oh, right. The developer added some debugging output, but the crash occurs in packaged Delphi network components that can't be debugged on the machine itself.

Thomas
User avatar
DarkShadow44
Level 8
Level 8
Posts: 1207
Joined: Tue Nov 22, 2016 5:39 pm

Re: Windows program crashes Wine with socket connection

Post by DarkShadow44 »

mnemo wrote:Oh, right. The developer added some debugging output, but the crash occurs in packaged Delphi network components that can't be debugged on the machine itself.
How so? According to your log, the crash occurs inside wine code:

Code: Select all

82680.796:0008:0009:Ret  KERNEL32.WideCharToMultiByte() retval=00000008 ret=004107e4
82680.796:0008:0009:Call KERNEL32.WideCharToMultiByte(000004e4,00000000,006af750 L"shutdown",00000008,01ad6eec,00000008,00000000,00000000) ret=004107e4
82680.796:0008:0009:Ret  KERNEL32.WideCharToMultiByte() retval=00000008 ret=004107e4
82680.796:0008:0009:Call KERNEL32.GetProcAddress(7d670000,01ad6eec "shutdown") ret=00416648
82680.797:0008:0009:Ret  KERNEL32.GetProcAddress() retval=7d67173c ret=00416648
82680.797:0008:0009:Call ws2_32.shutdown(000000c4,00000001) ret=006af711
82680.797:0008:0009:Call ntdll.wine_server_handle_to_fd(000000c4,00000000,0032f9e8,0032f9e4) ret=7d67ec76
82680.797:0008:0009:Ret  ntdll.wine_server_handle_to_fd() retval=00000000 ret=7d67ec76
82680.797:0008:0009:trace:winsock:WS_shutdown socket 00c4, how 0x1, options 0x0
82680.797:0008:0009:trace:winsock:WS2_register_async_shutdown socket 00c4 type 2
82680.803:0008:0009:err:seh:setup_exception_record nested exception on signal stack in thread 0009 eip 7bc83b0f esp 7ffdbaf0 stack 0x232000-0x330000
Unless I'm something missing here, it calls to ws2_32.shutdown, but never returns.
mnemo
Level 1
Level 1
Posts: 6
Joined: Mon Jul 22, 2019 7:25 am

Re: Windows program crashes Wine with socket connection

Post by mnemo »

DarkShadow44 wrote: How so? According to your log, the crash occurs inside wine code:
[...]
Unless I'm something missing here, it calls to ws2_32.shutdown, but never returns.
Yes, the wording wasn't precise. The crash occurs in Wine's NTDLL, but the calls to that are in components that are used by the application and do not belong to the application's codebase.

Thomas
User avatar
DarkShadow44
Level 8
Level 8
Posts: 1207
Joined: Tue Nov 22, 2016 5:39 pm

Re: Windows program crashes Wine with socket connection

Post by DarkShadow44 »

So what? It's not supposed to crash inside wine code - so the wine code has a bug.
Locked