https://bugs.winehq.org/show_bug.cgi?id=39017
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, Installer, win64 Status|UNCONFIRMED |NEW URL| |http://www.siliconguide.com | |/drivers/device/1896/ CC| |focht@gmx.net Component|-unknown |winmm&mci Summary|lexmark x2670 printer |64-bit Lexmark X2670 |driver crash |All-in-One printer driver | |installation fails (missing | |pragma pack directive in | |'digitalv.h' causes | |structure layout mismatch | |between | |'MCI_DGV_OPEN_PARMSW' and | |'MCI_OPEN_PARMSW') Ever confirmed|0 |1
--- Comment #2 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming.
The crashing (un)installer helper app can be run directly in 64-bit WINEPREFIX after extraction from main package:
--- snip --- $ pwd /home/focht/Downloads/drivers/printer/2600/install/x64
$ WINEDEBUG=+tid,+seh,+relay,+mciavi wine ./uninst.exe /M /R:Uninst SkipConfirm=true >>log.txt 2>&1 ... 0029:Call user32.CreateWindowExA(00010000,00697488 "wxWindowClass",1404758b8 "",50000000,00000039,0000007c,000000d7,10000000c,000100b8,ffffffffffffff29,140000000,00000000) ret=14006e447 ... 0029:Ret user32.CreateWindowExA() retval=000100bc ret=14006e447 ... 0029:Call msvfw32.MCIWndCreateA(000100bc,00000000,5000c00a,0069e850 "Z:\home\focht\Downloads\drivers\printer\2600\install\config\image\trdrp.avi") ret=140229bd2 ... 0029:Call user32.CreateWindowExW(00000000,7ff413503720 L"MCIWndClass",00000000,5680c00a,00000000,00000000,ffffffff0000012c,00000000,000100bc,00000000,140000000,0009bc40) ret=7ff4134f5457 ... 0029:Call winmm.mciSendCommandW(00000000,00000803,00000602,002232a0) ret=7ff4134f722b 0029:Call advapi32.RegOpenKeyExW(ffffffff80000002,7ff4139b79c0 L"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions",00000000,00000001,00222e38) ret=7ff41398c36b 0029:Ret advapi32.RegOpenKeyExW() retval=00000000 ret=7ff41398c36b ... 0029:Call KERNEL32.GetPrivateProfileStringW(7ff4139b666c L"MCI",0009c9c0 L"AVIVIDEO",00222c02 L"",00222c80,00000080,7ff4139b5d70 L"SYSTEM.INI") ret=7ff413984d87 0029:Ret KERNEL32.GetPrivateProfileStringW() retval=0000000c ret=7ff413984d87 ... 0029:Call KERNEL32.LoadLibraryW(00222c80 L"mciavi32.dll") ret=7ff413984ef3 ... 0029:Ret KERNEL32.LoadLibraryW() retval=7ff411e40000 ret=7ff413984ef3 0029:Call KERNEL32.GetProcAddress(7ff411e40000,7ff4139b5a24 "DriverProc") ret=7ff413984f2e 0029:Ret KERNEL32.GetProcAddress() retval=7ff411e4ffc4 ret=7ff413984f2e 0029:Call mciavi32.DriverProc(00000000,0009ca50,00000001,00000000,00000000) ret=7ff413984486 0029:trace:mciavi:MCIAVI_DriverProc (00000000, 0x9ca50, 00000001, 00000000, 00000000) 0029:Ret mciavi32.DriverProc() retval=00000001 ret=7ff413984486 0029:Call mciavi32.DriverProc(00000000,0009ca50,00000002,00000000,00000000) ret=7ff413984486 0029:trace:mciavi:MCIAVI_DriverProc (00000000, 0x9ca50, 00000002, 00000000, 00000000) 0029:Ret mciavi32.DriverProc() retval=00000001 ret=7ff413984486 0029:Call mciavi32.DriverProc(00000000,0009ca50,00000003,00000000,00000000) ret=7ff413984486 0029:trace:mciavi:MCIAVI_DriverProc (00000000, 0x9ca50, 00000003, 00000000, 00000000) 0029:trace:mciavi:MCIAVI_drvOpen (null), (nil) 0029:Ret mciavi32.DriverProc() retval=ffffffff ret=7ff413984486 0029:Call ntdll.RtlAllocateHeap(00010000,00000000,00000030) ret=7ff413984ec2 0029:Ret ntdll.RtlAllocateHeap() retval=0009ca90 ret=7ff413984ec2 0029:Call KERNEL32.LoadLibraryW(00222c80 L"mciavi32.dll") ret=7ff413984ef3 0029:Ret KERNEL32.LoadLibraryW() retval=7ff411e40000 ret=7ff413984ef3 0029:Call KERNEL32.GetProcAddress(7ff411e40000,7ff4139b5a24 "DriverProc") ret=7ff413984f2e 0029:Ret KERNEL32.GetProcAddress() retval=7ff411e4ffc4 ret=7ff413984f2e 0029:Call mciavi32.DriverProc(00000000,0009ca90,00000003,00000000,00222dc0) ret=7ff413984486 0029:trace:mciavi:MCIAVI_DriverProc (00000000, 0x9ca90, 00000003, 00000000, 00222DC0) 0029:trace:mciavi:MCIAVI_drvOpen (null), 0x222dc0 ... 0029:Call winmm.mciLoadCommandResource(7ff411e40000,7ff411e5e4f0 L"MCIAVI",00000000) ret=7ff411e53352 ... 0029:Ret winmm.mciLoadCommandResource() retval=00000001 ret=7ff411e53352 0029:Call winmm.mciSetDriverData(00000001,0009d0a0) ret=7ff411e5339c 0029:Ret winmm.mciSetDriverData() retval=00000001 ret=7ff411e5339c 0029:Ret mciavi32.DriverProc() retval=00000001 ret=7ff413984486 0029:Call ntdll.RtlAllocateHeap(00010000,00000000,0000000c) ret=7ff41398d6f5 0029:Ret ntdll.RtlAllocateHeap() retval=0009cc10 ret=7ff41398d6f5 0029:Call mciavi32.DriverProc(00000001,0009ca90,00000801,00000602,002232a0) ret=7ff413984486 0029:trace:mciavi:MCIAVI_DriverProc (00000001, 0x9ca90, 00000801, 00000602, 002232A0) 0029:trace:mciavi:MCIAVI_mciOpen (0001, 00000602, 0x2232a0) 0029:Call winmm.mciGetDriverData(00000001) ret=7ff411e53b3f 0029:Ret winmm.mciGetDriverData() retval=0009d0a0 ret=7ff411e53b3f 0029:trace:seh:raise_exception code=c0000005 flags=0 addr=0x7ff411e53c40 ip=7ff411e53c40 tid=0029 0029:trace:seh:raise_exception rax=002232d000000000 rbx=000000000069e850 rcx=000000000009d228 rdx=0000000000000000 0029:trace:seh:raise_exception rsi=00007ff41d736a2c rdi=00007ff41d7369f0 rbp=0000000000222a40 rsp=0000000000222990 0029:trace:seh:raise_exception r8=00007ff411e53b3f r9=0000000000000000 r10=00007ff41d777deb r11=0000003cb618dad0 0029:trace:seh:raise_exception r12=0000000000000000 r13=000000000041c6a0 r14=00000000002257b0 r15=0000000000696dd0 0029:trace:seh:dwarf_virtual_unwind function 7ff411e53c40 base 0x7ff411e53a79 cie 0x7ff411e5f818 len 14 id 0 version 1 aug 'zR' code_align 1 data_align -8 retaddr %rip ... Backtrace:
=>0 0x00007ff411e53c40 MCIAVI_mciOpen+0x1c7(wDevID=0x1, dwFlags=0x602, lpOpenParms=0x2232a0) [/home/focht/projects/wine/wine.repo/src/dlls/mciavi32/mciavi.c:252] in mciavi32 (0x0000000000222a40)
1 0x00007ff411e563ac MCIAVI_DriverProc+0x202(dwDevID=0x1, hDriv=0x9ca90, wMsg=0x801, dwParam1=0x602, dwParam2=0x2232a0) [/home/focht/projects/wine/wine.repo/src/dlls/mciavi32/mciavi.c:967] in mciavi32 (0x0000000000222b80)
2 0x00007ff41d48f763 relay_call+0x7e() in ntdll (0x0000000000222bd0)
3 0x00007ff411e4fff2 frame_dummy+0x61() in mciavi32 (0x0000000000222c90)
4 0x00007ff413984486 DRIVER_SendMessage+0xd4(lpDrv=0x9ca90, msg=0x801, lParam1=0x602, lParam2=0x2232a0) [/home/focht/projects/wine/wine.repo/src/dlls/winmm/driver.c:136] in winmm (0x0000000000222c90)
5 0x00007ff413984654 SendDriverMessage+0x124(hDriver=0x9ca90, msg=0x801, lParam1=0x602, lParam2=0x2232a0) [/home/focht/projects/wine/wine.repo/src/dlls/winmm/driver.c:156] in winmm (0x0000000000222da0)
6 0x00007ff41398d5e0 MCI_SendCommandFrom32+0x64(wDevID=0x1, wMsg=0x801, dwParam1=0x602, dwParam2=0x2232a0) [/home/focht/projects/wine/wine.repo/src/dlls/winmm/mci.c:894] in winmm (0x0000000000222e00)
7 0x00007ff41398d75c MCI_FinishOpen+0x173(wmd=0x9c9f0, lpParms=0x2232a0, dwParam=0x602) [/home/focht/projects/wine/wine.repo/src/dlls/winmm/mci.c:936] in winmm (0x0000000000222e60)
8 0x00007ff413991318 MCI_Open+0x699(dwParam=0x602, lpParms=0x2232a0) [/home/focht/projects/wine/wine.repo/src/dlls/winmm/mci.c:1826] in winmm (0x0000000000223070)
9 0x00007ff41399279c MCI_SendCommand+0x66(wDevID=0, wMsg=0x803, dwParam1=0x602, dwParam2=0x2232a0) [/home/focht/projects/wine/wine.repo/src/dlls/winmm/mci.c:2096] in winmm (0x00000000002230c0)
10 0x00007ff413993364 mciSendCommandW+0x102(wDevID=0, wMsg=0x803, dwParam1=0x602, dwParam2=0x2232a0) [/home/focht/projects/wine/wine.repo/src/dlls/winmm/mci.c:2295] in winmm (0x00000000002231b0)
11 0x00007ff41d48f763 relay_call+0x7e() in ntdll (0x0000000000223200)
12 0x00007ff413982562 in winmm (+0x2561) (0x0000000000223c40) ... 34 0x00007ff4134f5457 MCIWndCreateW+0x199(hwndParent=0x100bc, hInstance=0x140000000, dwStyle=0x5080c00a, szFile="Z:\home\focht\Downloads\drivers\printer\2600\install\config\image\trdrp.avi") [/home/focht/projects/wine/wine.repo/src/dlls/msvfw32/mciwnd.c:117] in msvfw32 (0x0000000000225560) 35 0x00007ff4134f54fd MCIWndCreateA+0x63(hwndParent=0x100bc, hInstance=(nil), dwStyle=0x5000c00a, szFile="Z:\home\focht\Downloads\drivers\printer\2600\install\config\image\trdrp.avi") [/home/focht/projects/wine/wine.repo/src/dlls/msvfw32/mciwnd.c:138] in msvfw32 (0x00000000002255b0) 36 0x00007ff41d48f763 relay_call+0x7e() in ntdll (0x0000000000225600) 37 0x00007ff4134f270a in msvfw32 (+0x2709) (0x000000000069e980) 38 0x0000000140229bd2 in uninst (+0x229bd1) (0x000000000069e980) 39 0x0000000140229ffe in uninst (+0x229ffd) (0x000000000069e980) ... 0x00007ff411e53c40 MCIAVI_mciOpen+0x1c7 [/home/focht/projects/wine/wine.repo/src/dlls/mciavi32/mciavi.c:252] in mciavi32: movzwl (%rax),%eax 252 } else if (lpOpenParms->lpstrElementName && lpOpenParms->lpstrElementName[0]) { Modules: Module Address Debug info Name (111 modules) ELF 7b800000- 7bcde000 Dwarf kernel32<elf> -PE 7b860000- 7bcde000 \ kernel32 ELF 7be00000- 7c103000 Dwarf <wine-loader> PE 140000000- 140709000 Export uninst PE 180000000- 180392000 Deferred engine ELF 30e1800000- 30e1a83000 Deferred libcups.so.2 ... Threads: process tid prio (all id:s are in hex) ... 00000028 (D) Z:\home\focht\Downloads\drivers\printer\2600\install\x64\uninst.exe 0000002b 0 00000029 0 <== --- snip ---
Relevant part of debugger session:
--- snip --- Wine-dbg>n 936 return MCI_SendCommandFrom32(wmd->wDeviceID, MCI_OPEN_DRIVER, dwParam,
Wine-dbg>p *lpParms {dwCallback=0x233a30, wDeviceID=0x1, lpstrDeviceType=*** invalid address 0x7f43 ***, lpstrElementName="Z:\home\focht\Downloads\drivers\printer\2600\install\config\image\trdrp.avi", lpstrAlias="262235"}
...
Wine-dbg>n 967 case MCI_OPEN_DRIVER: return MCIAVI_mciOpen (dwDevID, dwParam1, (LPMCI_DGV_OPEN_PARMSW) dwParam2);
...
Wine-dbg>p *lpOpenParms
{dwCallback=0x233a30, wDeviceID=0x1, lpstrDeviceType=*** invalid address 0x6ef8000000000 ***, lpstrElementName=*** invalid address 0x23349000000000 ***, lpstrAlias=0x0(nil), dwStyle=0x2334f0, hWndParent=0x32003200360032}
Wine-dbg>x/30x lpOpenParms 0x0000000000233460: 00233a30 00000000 00000001 00007f43 0x0000000000233470: 00000000 0006ef80 00000000 00233490 0x0000000000233480: 00000000 00000000 002334f0 00000000 0x0000000000233490: 00360032 00320032 00350033 00000000 0x00000000002334a0: 00233610 00000000 f8ff1e5f 00007f43 0x00000000002334b0: 00233b48 00000000 00233dd0 00000000 0x00000000002334c0: 00000000 00000000 002335e4 00000047 0x00000000002334d0: 000400be 00000000
Wine-dbg>bt
Backtrace:
=>0 0x00007f43ed9b4a9f MCIAVI_mciOpen+0x26(wDevID=0x1, dwFlags=0x602, lpOpenParms=0x233460) [/home/focht/projects/wine/wine.repo/src/dlls/mciavi32/mciavi.c:219] in mciavi32 (0x0000000000232d00)
1 0x00007f43ed9b73ac MCIAVI_DriverProc+0x202(dwDevID=0x1, hDriv=0x6fc80, wMsg=0x801, dwParam1=0x602, dwParam2=0x233460) [/home/focht/projects/wine/wine.repo/src/dlls/mciavi32/mciavi.c:967] in mciavi32 (0x0000000000232e40)
2 0x00007f43ef4e5486 DRIVER_SendMessage+0xd4(lpDrv=0x6fc80, msg=0x801, lParam1=0x602, lParam2=0x233460) [/home/focht/projects/wine/wine.repo/src/dlls/winmm/driver.c:136] in winmm (0x0000000000232ed0)
3 0x00007f43ef4e5654 SendDriverMessage+0x124(hDriver=0x6fc80, msg=0x801, lParam1=0x602, lParam2=0x233460) [/home/focht/projects/wine/wine.repo/src/dlls/winmm/driver.c:156] in winmm (0x0000000000232fe0)
4 0x00007f43ef4ee5e0 MCI_SendCommandFrom32+0x64(wDevID=0x1, wMsg=0x801, dwParam1=0x602, dwParam2=0x233460) [/home/focht/projects/wine/wine.repo/src/dlls/winmm/mci.c:894] in winmm (0x0000000000233040)
5 0x00007f43ef4ee75c MCI_FinishOpen+0x173(wmd=0x6fbe0, lpParms=0x233460, dwParam=0x602) [/home/focht/projects/wine/wine.repo/src/dlls/winmm/mci.c:936] in winmm (0x00000000002330a0)
6 0x00007f43ef4f2318 MCI_Open+0x699(dwParam=0x602, lpParms=0x233460) [/home/focht/projects/wine/wine.repo/src/dlls/winmm/mci.c:1826] in winmm (0x00000000002332b0)
7 0x00007f43ef4f379c MCI_SendCommand+0x66(wDevID=0, wMsg=0x803, dwParam1=0x602, dwParam2=0x233460) [/home/focht/projects/wine/wine.repo/src/dlls/winmm/mci.c:2096] in winmm (0x0000000000233300) ... --- snip ---
'MCI_OPEN_PARMSW' structure layout:
Source: https://source.winehq.org/git/wine.git/blob/ab22ea74a41b36787e544cda076efa70...
--- snip --- .... 53 #include <pshpack1.h> ... 72 #ifndef _MCIDEVICEID_ 73 #define _MCIDEVICEID_ 74 typedef UINT MCIDEVICEID; 75 #endif ... 1975 typedef struct tagMCI_OPEN_PARMSW { 1976 DWORD_PTR dwCallback; 1977 MCIDEVICEID wDeviceID; 1978 LPCWSTR lpstrDeviceType; 1979 LPCWSTR lpstrElementName; 1980 LPCWSTR lpstrAlias; 1981 } MCI_OPEN_PARMSW, *LPMCI_OPEN_PARMSW; ... 2517 #include <poppack.h> .... --- snip ---
'MCI_DGV_OPEN_PARMSW' structure layout:
Source: https://source.winehq.org/git/wine.git/blob/f9f9750586a38879187d60f9352cb756...
--- snip --- ... 601 typedef struct { 602 DWORD_PTR dwCallback; 603 UINT wDeviceID; 604 LPWSTR lpstrDeviceType; 605 LPWSTR lpstrElementName; 606 LPWSTR lpstrAlias; 607 DWORD dwStyle; 608 HWND hWndParent; 609 } MCI_DGV_OPEN_PARMSW, *LPMCI_DGV_OPEN_PARMSW; ... --- snip ---
If you (partially) clone structures across header files you have to ensure that all headers enforce the _same_ alignment on structure members or you will get nasty surprises like in this case ('digitalv.h' is missing structure packing directive).
I didn't look further for similar problems in other files. That exercise is left to you folks ;-)
---
As Austin already said, installing Windows printer (kernel) drivers is not going to be useful here. You have to have native Linux support for your hardware.
Anyway, the installer was somewhat useful to reveal and fix a bug in Wine.
$ sha1sum cj2600en64.exe 28bad61c65b30f9badeef5f0bd0c4507e7ca0707 cj2600en64.exe
$ du -sh cj2600en64.exe 133M cj2600en64.exe
$ wine --version wine-1.7.48-74-gb3fe96a
Regards