https://bugs.winehq.org/show_bug.cgi?id=38184
Bug ID: 38184 Summary: Application crash when calling WScript.Shell's "exec" method Product: Wine Version: 1.7.34 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: oleaut32 Assignee: wine-bugs@winehq.org Reporter: ptubbytaylor@gmail.com Distribution: ---
Created attachment 50957 --> https://bugs.winehq.org/attachment.cgi?id=50957 backtrace.txt
When calling WScript.Shell's exec method using AutoHotkey v1.1.19.03, WINE crashes and displays a wind "The program AutoHotkey.exe has experienced a serious problem and needs to close"
https://bugs.winehq.org/show_bug.cgi?id=38184
--- Comment #1 from ptubbytaylor@gmail.com --- Created attachment 50958 --> https://bugs.winehq.org/attachment.cgi?id=50958 script.ahk
https://bugs.winehq.org/show_bug.cgi?id=38184
--- Comment #2 from ptubbytaylor@gmail.com --- Created attachment 50959 --> https://bugs.winehq.org/attachment.cgi?id=50959 log using +wshom,+tid
https://bugs.winehq.org/show_bug.cgi?id=38184
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |http://www.autohotkey.com/
https://bugs.winehq.org/show_bug.cgi?id=38184
ptubbytaylor@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://www.autohotkey.com/ |http://www.ahkscript.org/
https://bugs.winehq.org/show_bug.cgi?id=38184
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |focht@gmx.net Component|oleaut32 |-unknown Summary|Application crash when |AutoHotkey script crashes |calling WScript.Shell's |when calling |"exec" method |WScript.Shell's "exec" | |method (IWshShell3 vtable | |only supports up to | |IWshShell2) Ever confirmed|0 |1
--- Comment #3 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming.
The null pointer access is the result from to out-of-bounds vtable access - it misses IWshShell3 members.
IWshShell3 vtable only supports up to IWshShell2 as of now.
Source: http://source.winehq.org/git/wine.git/blob/bf0e3a58517147d8711a1a757fe4dcd2d...
--- snip --- 184 static const IWshShell3Vtbl WshShell3Vtbl = { 185 WshShell3_QueryInterface, 186 WshShell3_AddRef, 187 WshShell3_Release, 188 WshShell3_GetTypeInfoCount, 189 WshShell3_GetTypeInfo, 190 WshShell3_GetIDsOfNames, 191 WshShell3_Invoke, 192 WshShell3_get_SpecialFolders, 193 WshShell3_get_Environment, 194 WshShell3_Run, 195 WshShell3_Popup, 196 WshShell3_CreateShortcut, 197 WshShell3_ExpandEnvironmentStrings, 198 WshShell3_RegRead, 199 WshShell3_RegWrite, 200 WshShell3_RegDelete, 201 WshShell3_LogEvent, 202 WshShell3_AppActivate, 203 WshShell3_SendKeys 204 }; --- snip ---
Source: http://source.winehq.org/git/wine.git/blob/bf0e3a58517147d8711a1a757fe4dcd2d...
--- snip --- ... 256 interface IWshShell3 : IWshShell2 { 257 [id(0x0bc4)] 258 HRESULT Exec( 259 [in] BSTR Command, 260 [out, retval] IWshExec** out_Exec); 261 262 [id(0x0bc5), propget] 263 HRESULT CurrentDirectory([out, retval] BSTR* out_Directory); 264 265 [id(0x0bc5), propput] 266 HRESULT CurrentDirectory([in] BSTR out_Directory); 267 }; --- snip ---
$ sha1sum AutoHotkey111903_Install.exe 3a033b898ac9314fa2587a32e1d61e2ea9dbc6c5 AutoHotkey111903_Install.exe
$ du -sh AutoHotkey111903_Install.exe 2.7M AutoHotkey111903_Install.exe
$ wine --version wine-1.7.38
Regards
https://bugs.winehq.org/show_bug.cgi?id=38184
--- Comment #4 from Nikolay Sivov bunglehead@gmail.com --- Nice, I'm on it.
https://bugs.winehq.org/show_bug.cgi?id=38184
--- Comment #5 from Nikolay Sivov bunglehead@gmail.com --- Created attachment 50971 --> https://bugs.winehq.org/attachment.cgi?id=50971 patch
This patch implements all aspects of Exec() expect properties to access standard handles. Attaching it here if someone is interested in testing.
https://bugs.winehq.org/show_bug.cgi?id=38184
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |d9db9d8b83a29b8a75842e94993 | |7e56614384940 Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #6 from Nikolay Sivov bunglehead@gmail.com --- Exec() is implemented now with d9db9d8b83a29b8a75842e949937e56614384940.
https://bugs.winehq.org/show_bug.cgi?id=38184
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |wshom.ocx
https://bugs.winehq.org/show_bug.cgi?id=38184
--- Comment #7 from ptubbytaylor@gmail.com --- It appears that the Terminate method, in windows, sends WM_CLOSE to some/all of the programs windows (I've had hit and miss results for which windows get a WM_CLOSE, but that could be a problem on my script's end), then waits for up to two seconds for the process to end. If the process closes during this time, it immediately returns to the caller. If, after the full two seconds, the process has not yet closed, it kills the process and returns to caller.
https://bugs.winehq.org/show_bug.cgi?id=38184
ptubbytaylor@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |38209
https://bugs.winehq.org/show_bug.cgi?id=38184
ptubbytaylor@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |38210
https://bugs.winehq.org/show_bug.cgi?id=38184
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.39.