https://bugs.winehq.org/show_bug.cgi?id=45693
Bug ID: 45693 Summary: VirtualLink Software-Setup fails immediately Product: Wine Version: 3.14 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: herbert.eberth@online.de Distribution: ---
Created attachment 62119 --> https://bugs.winehq.org/attachment.cgi?id=62119 Error report generated after the setup crash.
Hello,
to connect my Silex USB Connect Server to my PC, I have to install the Silex Virtual Link Software, which is part of the Device Server Software "s-40a720" (Download-Link: http://www.silexeurope.com/media/software/s-40a720.zip).
While the Device Server Software Dialog opens without problems, the Setup of the Virtual Link Software fails. After unpacking the s-40a720-zip-file, the setup-file for Virtual Link can be found in /s-40a720/Utility/Virtuallink/ and is named cosetup.exe.
https://bugs.winehq.org/show_bug.cgi?id=45693
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW URL| |http://www.silexeurope.com/ | |media/software/s-40a720.zip Keywords| |download CC| |dark.shadow4@web.de
--- Comment #1 from Fabian Maurer dark.shadow4@web.de --- Confirming. Crashes somewhere during creating the dialog.
https://bugs.winehq.org/show_bug.cgi?id=45693
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Installer Summary|VirtualLink Software-Setup |SX VirtualLink installer |fails immediately |crashes on startup (window | |activation/focus change: | |palette messages must only | |be sent if the device | |supports color palettes) Component|-unknown |user32 CC| |focht@gmx.net
--- Comment #2 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming.
--- snip --- $ pwd /home/focht/Downloads/s-40a720/Utility/Virtuallink/Files
$ winedbg ./Setup64.exe ... Unhandled exception: page fault on read access to 0x00000008 in 64-bit code (0x0000000140013218). Register dump: rip:0000000140013218 rsp:000000000023e950 rbp:000000000023e9e0 eflags:00010246 ( R- -- I Z- -P- ) rax:00000000001f0059 rbx:0000000000000000 rcx:00000000000100a8 rdx:0000000000000000 rsi:0000000000000000 rdi:000000000002005a r8:0000000000000000 r9:0000000000000000 r10:0000000000075d00 r11:0000000000001a85 r12:0000000000000000 r13:0000000140055360 r14:0000000000000000 r15:0000000000000000 Stack dump: 0x000000000023e950: 000000000002005a 0000000000000000 0x000000000023e960: 0000000000000000 0000000000000000 0x000000000023e970: 0000000000000000 0000000000000000 0x000000000023e980: 0000000000000000 00007f6dc12d8604 0x000000000023e990: 000000000002005a 0000000000000000 0x000000000023e9a0: 0000000000000000 0000000000000000 0x000000000023e9b0: 000000000000030f 0000000000000000 0x000000000023e9c0: 0000000000000000 0000030fc12d89ca 0x000000000023e9d0: 000000000002005a 0000000140012f00 0x000000000023e9e0: 000000000023ea70 00007f6dc12d89f7 0x000000000023e9f0: 0000000140012f00 000000000023eab8 0x000000000023ea00: 0000000000000000 0000000000000000 Backtrace: =>0 0x0000000140013218 in setup64 (+0x13218) (0x000000000023e9e0) 1 0x00007f6dc12d8604 WINPROC_wrapper+0x39() [/home/focht/projects/wine/mainline-src/dlls/user32/winproc.c:216] in user32 (0x000000000023e9e0) 2 0x00007f6dc12d89f7 call_dialog_proc+0x138() [/home/focht/projects/wine/mainline-src/dlls/user32/winproc.c:268] in user32 (0x000000000023ea70) 3 0x00007f6dc12dbdbe WINPROC_CallDlgProcW+0x133() [/home/focht/projects/wine/mainline-src/dlls/user32/winproc.c:1082] in user32 (0x000000000023ead0) 4 0x00007f6dc121b064 DefDlgProcW+0xff() [/home/focht/projects/wine/mainline-src/dlls/user32/defdlg.c:430] in user32 (0x000000000023ebd0) 5 0x00007f6dc12d8604 WINPROC_wrapper+0x39() [/home/focht/projects/wine/mainline-src/dlls/user32/winproc.c:216] in user32 (0x000000000023ec30) 6 0x00007f6dc12d87f1 call_window_proc+0x138() [/home/focht/projects/wine/mainline-src/dlls/user32/winproc.c:246] in user32 (0x000000000023ecb0) 7 0x00007f6dc12db359 WINPROC_call_window+0x1db() [/home/focht/projects/wine/mainline-src/dlls/user32/winproc.c:908] in user32 (0x000000000023ed20) 8 0x00007f6dc12772b7 call_window_proc+0xeb() [/home/focht/projects/wine/mainline-src/dlls/user32/message.c:2223] in user32 (0x000000000023edd0) 9 0x00007f6dc127aa8e send_message+0x182() [/home/focht/projects/wine/mainline-src/dlls/user32/message.c:3264] in user32 (0x000000000023ee30) 10 0x00007f6dc127b3d0 SendMessageW+0xd3() [/home/focht/projects/wine/mainline-src/dlls/user32/message.c:3464] in user32 (0x000000000023ef40) 11 0x00007f6dc123da56 set_active_window+0x27f() [/home/focht/projects/wine/mainline-src/dlls/user32/focus.c:116] in user32 (0x000000000023f0a0) 12 0x00007f6dc123e4fe SetFocus+0x28d() [/home/focht/projects/wine/mainline-src/dlls/user32/focus.c:299] in user32 (0x000000000023f1b0) 13 0x00007f6dc1222bda DIALOG_CreateIndirect+0x10a7() [/home/focht/projects/wine/mainline-src/dlls/user32/dialog.c:692] in user32 (0x000000000023f560) 14 0x00007f6dc1222e9a CreateDialogIndirectParamAorW+0x9d() [/home/focht/projects/wine/mainline-src/dlls/user32/dialog.c:746] in user32 (0x000000000023f630) 15 0x00007f6dc1222f8b CreateDialogIndirectParamW+0x51() [/home/focht/projects/wine/mainline-src/dlls/user32/dialog.c:764] in user32 (0x000000000023f670) 16 0x00007f6dc1222dfa CreateDialogParamW+0xa7() [/home/focht/projects/wine/mainline-src/dlls/user32/dialog.c:735] in user32 (0x000000000023f6c0) 17 0x0000000140032f59 in setup64 (+0x32f58) (0x000000000001004e) 18 0x000000014003319e in setup64 (+0x3319d) (0x000000000023f7b0) 19 0x00007f6dc12d8604 WINPROC_wrapper+0x39() [/home/focht/projects/wine/mainline-src/dlls/user32/winproc.c:216] in user32 (0x000000000023f7b0) 20 0x00007f6dc12d87f1 call_window_proc+0x138() [/home/focht/projects/wine/mainline-src/dlls/user32/winproc.c:246] in user32 (0x000000000023f830) 21 0x00007f6dc12db46f WINPROC_call_window+0x2f1() [/home/focht/projects/wine/mainline-src/dlls/user32/winproc.c:921] in user32 (0x000000000023f8a0) 22 0x00007f6dc127d9bc DispatchMessageW+0x22e() [/home/focht/projects/wine/mainline-src/dlls/user32/message.c:4030] in user32 (0x000000000023fab0) 23 0x0000000140034b61 in setup64 (+0x34b60) (0x0000000000000000) 24 0x00000001400368bb in setup64 (+0x368ba) (0x000000000023fdc0) 25 0x000000007b4d723d call_process_entry+0x20() [/home/focht/projects/wine/mainline-src/dlls/kernel32/process.c:1062] in kernel32 (0x000000000023fdc0) 26 0x000000007b4d7487 start_process+0x243() [/home/focht/projects/wine/mainline-src/dlls/kernel32/process.c:1094] in kernel32 (0x000000000023ffd0) 0x0000000140013218: movq 0x0000000000000008(%rdx),%rdx --- snip ---
--- snip --- $ WINEDEBUG=+seh,+relay,+win,+msg wine ./Setup64.exe >>log.txt 2>&1 ... 0032:Call user32.CreateDialogParamW(140000000,00000065,000100d4,140012f00,00000000) ret=140032f59 ... 0032:trace:win:WIN_CreateWindowEx L"DLG_MAIN" #8002 ex=00010001 style=82c800c4 0,0 354x197 parent=0x100d4 menu=(nil) inst=0x140000000 params=(nil) 0032:trace:win:dump_window_styles style: WS_POPUP WS_CLIPCHILDREN WS_CAPTION WS_SYSMENU 000000c4 0032:trace:win:dump_window_styles exstyle: WS_EX_DLGMODALFRAME WS_EX_CONTROLPARENT ... 0032:trace:win:WIN_CreateWindowEx hwnd 0x200e0 cs 0,0 354x197 (0,0)-(354,197) 0032:Call window proc 0x7f1b9e976964 (hwnd=0x200e0,msg=WM_NCCREATE,wp=00000000,lp=0023ef90) 0032:trace:win:WIN_SetWindowLong 0x200e0 0 0 W 0032:Call winex11.drv.SetWindowText(000200e0,0009b8f0 L"DLG_MAIN") ret=7f1b9e9775c1 0032:Ret winex11.drv.SetWindowText() retval=00000001 ret=7f1b9e9775c1 0032:Ret window proc 0x7f1b9e976964 (hwnd=0x200e0,msg=WM_NCCREATE,wp=00000000,lp=0023ef90) retval=00000001 ... 0032:Call window proc 0x7f1b9e976964 (hwnd=0x200e0,msg=WM_CREATE,wp=00000000,lp=0023ef90) 0032:trace:win:WIN_SetWindowLong 0x200e0 0 0 W 0032:Ret window proc 0x7f1b9e976964 (hwnd=0x200e0,msg=WM_CREATE,wp=00000000,lp=0023ef90) retval=00000000 0032:Call winex11.drv.CreateWindow(000200e0) ret=7f1b9ea1d576 0032:Ret winex11.drv.CreateWindow() retval=00000001 ret=7f1b9ea1d576 0032:Call window proc 0x7f1b9e976964 (hwnd=0x200e0,msg=WM_SIZE,wp=00000000,lp=00ac015c) 0032:trace:win:WIN_SetWindowLong 0x200e0 0 0 W 0032:Ret window proc 0x7f1b9e976964 (hwnd=0x200e0,msg=WM_SIZE,wp=00000000,lp=00ac015c) retval=00000000 0032:Call window proc 0x7f1b9e976964 (hwnd=0x200e0,msg=WM_MOVE,wp=00000000,lp=00160003) 0032:trace:win:WIN_SetWindowLong 0x200e0 0 0 W 0032:Ret window proc 0x7f1b9e976964 (hwnd=0x200e0,msg=WM_MOVE,wp=00000000,lp=00160003) retval=00000000 0032:trace:msg:PostMessageW hwnd 0x10020 msg 210 (WM_PARENTNOTIFY) wp 1 lp 200e0 ... 0032:Ret window proc 0x7f1b9ed7260b (hwnd=0x100ee,msg=WM_GETDLGCODE,wp=00000000,lp=00000000) retval=00002020 0032:Call window proc 0x7f1b9e976964 (hwnd=0x200e0,msg=WM_INITDIALOG,wp=000100ea,lp=00000000) 0032:trace:win:WIN_SetWindowLong 0x200e0 0 0 W 0032:Call dialog proc 0x140012f00 (hwnd=0x200e0,msg=WM_INITDIALOG,wp=000100ea,lp=00000000) 0032:Call user32.PostMessageW(000200e0,00000464,00000000,00000000) ret=140012f5e 0032:trace:msg:PostMessageW hwnd 0x200e0 msg 464 (WM_USER+100) wp 0 lp 0 0032:Ret user32.PostMessageW() retval=00000001 ret=140012f5e 0032:Ret dialog proc 0x140012f00 (hwnd=0x200e0,msg=WM_INITDIALOG,wp=000100ea,lp=00000000) retval=00000001 result=00000000 0032:Ret window proc 0x7f1b9e976964 (hwnd=0x200e0,msg=WM_INITDIALOG,wp=000100ea,lp=00000000) retval=00000001 0032:Call window proc 0x7f1b9ed7260b (hwnd=0x100ea,msg=WM_GETDLGCODE,wp=00000000,lp=00000000) ... 0032:trace:win:SetFocus 0x100ea prev (nil) 0032:Call window proc 0x140033000 (hwnd=0x100d4,msg=WM_NCACTIVATE,wp=00000000,lp=000200e0) 0032:Call user32.DefWindowProcW(000100d4,00000086,00000000,000200e0) ret=7f1b9ea33824 0032:trace:msg:PostMessageW hwnd 0x10020 msg 210 (WM_PARENTNOTIFY) wp 86 lp 100d4 0032:Ret user32.DefWindowProcW() retval=00000001 ret=7f1b9ea33824 0032:Ret window proc 0x140033000 (hwnd=0x100d4,msg=WM_NCACTIVATE,wp=00000000,lp=000200e0) retval=00000001 0032:Call window proc 0x140033000 (hwnd=0x100d4,msg=WM_ACTIVATE,wp=00010000,lp=000200e0) 0032:Call user32.DefWindowProcW(000100d4,00000006,00010000,000200e0) ret=7f1b9ea33824 0032:Ret user32.DefWindowProcW() retval=00000000 ret=7f1b9ea33824 0032:Ret window proc 0x140033000 (hwnd=0x100d4,msg=WM_ACTIVATE,wp=00010000,lp=000200e0) retval=00000000 0032:Call window proc 0x7f1b9e976964 (hwnd=0x200e0,msg=WM_QUERYNEWPALETTE,wp=00000000,lp=00000000) 0032:trace:win:WIN_SetWindowLong 0x200e0 0 0 W 0032:Call dialog proc 0x140012f00 (hwnd=0x200e0,msg=WM_QUERYNEWPALETTE,wp=00000000,lp=00000000) 0032:Call user32.GetDC(000200e0) ret=14001320e 0032:trace:win:GetDCEx hwnd 0x200e0, hrgnClip (nil), flags 00010000 ... 0032:trace:win:GetDCEx (0x200e0,(nil),0x10018): returning 0x1f0059 (updated) 0032:Ret user32.GetDC() retval=001f0059 ret=14001320e 0032:trace:seh:NtRaiseException code=c0000005 flags=0 addr=0x140013218 ip=140013218 tid=0032 0032:trace:seh:NtRaiseException info[0]=0000000000000000 0032:trace:seh:NtRaiseException info[1]=0000000000000008 0032:trace:seh:NtRaiseException rax=00000000001f0059 rbx=0000000000000000 rcx=000000007bdc2427 rdx=0000000000000000 0032:trace:seh:NtRaiseException rsi=0000000000000000 rdi=00000000000200e0 rbp=000000000023e900 rsp=000000000023e870 0032:trace:seh:NtRaiseException r8=0000000000000000 r9=000000000023dfd0 r10=0000000000000000 r11=0000000000000246 0032:trace:seh:NtRaiseException r12=0000000000000000 r13=0000000140055360 r14=0000000000000000 r15=0000000000000000 --- snip ---
After creation of child controls the control focus is set which causes palette messages to be sent.
SetFocus -> set_active_window
https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/user32/focus.c#l77
--- snip --- 77 static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus ) 78 { 79 HWND previous = GetActiveWindow(); 80 BOOL ret; 81 DWORD old_thread, new_thread; 82 CBTACTIVATESTRUCT cbt; 83 84 if (previous == hwnd) 85 { 86 if (prev) *prev = hwnd; 87 return TRUE; 88 } 89 90 /* call CBT hook chain */ 91 cbt.fMouse = mouse; 92 cbt.hWndActive = previous; 93 if (HOOK_CallHooks( WH_CBT, HCBT_ACTIVATE, (WPARAM)hwnd, (LPARAM)&cbt, TRUE )) return FALSE; 94 95 if (IsWindow(previous)) 96 { 97 SendMessageW( previous, WM_NCACTIVATE, FALSE, (LPARAM)hwnd ); 98 SendMessageW( previous, WM_ACTIVATE, 99 MAKEWPARAM( WA_INACTIVE, IsIconic(previous) ), (LPARAM)hwnd ); 100 } 101 102 SERVER_START_REQ( set_active_window ) 103 { 104 req->handle = wine_server_user_handle( hwnd ); 105 if ((ret = !wine_server_call_err( req ))) 106 previous = wine_server_ptr_handle( reply->previous ); 107 } 108 SERVER_END_REQ; 109 if (!ret) return FALSE; 110 if (prev) *prev = previous; 111 if (previous == hwnd) return TRUE; 112 113 if (hwnd) 114 { 115 /* send palette messages */ 116 if (SendMessageW( hwnd, WM_QUERYNEWPALETTE, 0, 0 )) 117 SendMessageTimeoutW( HWND_BROADCAST, WM_PALETTEISCHANGING, (WPARAM)hwnd, 0, 118 SMTO_ABORTIFHUNG, 2000, NULL ); 119 if (!IsWindow(hwnd)) return FALSE; 120 } 121 122 old_thread = previous ? GetWindowThreadProcessId( previous, NULL ) : 0; 123 new_thread = hwnd ? GetWindowThreadProcessId( hwnd, NULL ) : 0; 124 ... --- snip ---
The app's dialog message handler doesn't expect this, accessing data structures that have not been allocated yet. The data structures are allocated when the window proc handles 'WM_USER + 100'. That message is sent earlier from the message handler during 'WM_INITDIALOG' handling via 'PostMessage()'.
Although the app's message handler contains code to handle palette messages, it's not supposed to see them on a non-palletized device context.
You need to check whether the (desktop) device context supports color palettes via 'RC_PALETTE & GetDeviceCaps (hdc, RASTERCAPS)' and only in that case send palette messages.
I tested a small patch and it allows the installer to show the dialog and proceed further.
$ sha1sum s-40a720.zip 38481cbfa824101a833aa997a3584611c4090c1b s-40a720.zip
$ du -sh s-40a720.zip 24M s-40a720.zip
$ wine --version wine-3.14-161-g70fbfa2cb8
Regards