http://bugs.winehq.org/show_bug.cgi?id=36642
Bug ID: 36642 Summary: IWinHttpRequest::Send returns immediately even when in synchronous mode Product: Wine Version: 1.7.18 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: minor Priority: P2 Component: winhttp Assignee: wine-bugs@winehq.org Reporter: ptubbytaylor@gmail.com
Created attachment 48680 --> http://bugs.winehq.org/attachment.cgi?id=48680 Script for AutoHotkey v1.1+ to reproduce issue
Synchronous mode, as set and described in IWinHttpRequest::Open is enabled, but it still returns immediately instead of after a response is received.
This issue affects wine versions as early as 1.4, and extends to version 1.7.18
In windows, my attached code and executable display a dialog showing the source of the google home page. In Ubuntu under wine, it returns immediately, causing my script to throw an error for trying to access IWinHttpRequest::ResponseText before Send has completed.
Terminal output from wine is as follows (two lines):
fixme:heap:HeapSetInformation (nil) 1 (nil) 0 fixme:winhttp:request_set_option 0 (null) (null)
As a workaround, one can call IWinHttpRequest::WaitForResponse immediately after Send, which will wait in the same manner Send is supposed to.
http://bugs.winehq.org/show_bug.cgi?id=36642
--- Comment #1 from ptubbytaylor@gmail.com --- Created attachment 48681 --> http://bugs.winehq.org/attachment.cgi?id=48681 Executable that displays the issue
http://bugs.winehq.org/show_bug.cgi?id=36642
ptubbytaylor@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ptubbytaylor@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=36642
Vincent Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source, testcase
http://bugs.winehq.org/show_bug.cgi?id=36642
--- Comment #2 from Nikolay Sivov bunglehead@gmail.com --- Attach +winhttp,+tid log please (as a text file).
http://bugs.winehq.org/show_bug.cgi?id=36642
--- Comment #3 from Hans Leidekker hans@meelstraat.net --- Created attachment 48683 --> http://bugs.winehq.org/attachment.cgi?id=48683 patch
Please try this patch.
http://bugs.winehq.org/show_bug.cgi?id=36642
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de
--- Comment #4 from Sebastian Lackner sebastian@fds-team.de --- Here are some packages for Ubuntu 12.04 with the latest wine upstream version and Hans Leidekkers patch applied on top of it.
https://dl.dropboxusercontent.com/u/21447213/36642/wine-compholio-i386_1.7.1... https://dl.dropboxusercontent.com/u/21447213/36642/wine-compholio_1.7.19_i38...
ae3a15df088f12d4aaeddd7d0a85518c5bac365e6ab990f8371556a766868f92 wine-compholio_1.7.19_i386.deb 286f0431ff6ecfc23d2930c32f3fcf3bb454132edca196f7fcf4fcd639421090 wine-compholio-i386_1.7.19_i386.deb
Installation with: sudo dpkg -i wine-compholio-i386_1.7.19_i386.deb wine-compholio_1.7.19_i386.deb
Please note that although it is called 'wine-compholio' it really only contains this single patch, not the rest of our patchset where we're working on.
This version will be installed to /opt/wine-compholio/bin/wine, so you can test it in parallel to your regular wine version.
Regards, Sebastian
http://bugs.winehq.org/show_bug.cgi?id=36642
--- Comment #5 from ptubbytaylor@gmail.com --- The patch, while fixing the issue that synchronous mode returns immediately, causes the issue that in asynchronous mode it does not return immediately
http://bugs.winehq.org/show_bug.cgi?id=36642
--- Comment #6 from ptubbytaylor@gmail.com --- Created attachment 48687 --> http://bugs.winehq.org/attachment.cgi?id=48687 +winhttp,+tid log for unpatched wine 1.7.18
http://bugs.winehq.org/show_bug.cgi?id=36642
ptubbytaylor@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #48687|0 |1 is obsolete| |
--- Comment #7 from ptubbytaylor@gmail.com --- Created attachment 48688 --> http://bugs.winehq.org/attachment.cgi?id=48688 +winhttp,+tid log
http://bugs.winehq.org/show_bug.cgi?id=36642
--- Comment #8 from Bruno Jesus 00cpxxx@gmail.com --- Maybe it fails when async is NULL instead of zero or non-zero.
http://bugs.winehq.org/show_bug.cgi?id=36642
--- Comment #9 from ptubbytaylor@gmail.com --- You seem to be correct. If I explicitly specify 0/false for the flag, it works as expected. Same with true for asynchronous. Omitting it causes the discrepancy
https://bugs.winehq.org/show_bug.cgi?id=36642
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
http://bugs.winehq.org/show_bug.cgi?id=36642
Hans Leidekker hans@meelstraat.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #48683|0 |1 is obsolete| |
--- Comment #10 from Hans Leidekker hans@meelstraat.net --- Created attachment 48691 --> http://bugs.winehq.org/attachment.cgi?id=48691 patch
How about this one?
http://bugs.winehq.org/show_bug.cgi?id=36642
--- Comment #11 from Sebastian Lackner sebastian@fds-team.de --- Builds for Ubuntu 12.04 using the new patch:
https://dl.dropboxusercontent.com/u/21447213/36642-2/wine-compholio-i386_1.7... https://dl.dropboxusercontent.com/u/21447213/36642-2/wine-compholio_1.7.19_i...
96331f5fd3e3a2a0aa13c07e92cdda43e8639baa37392afe9a8b1766cf5ea3aa wine-compholio-i386_1.7.19_i386.deb baebbd7b1e836cf859729d2c5cd0d85bbfb8c7c4d34a9a2a08e63119785badbc wine-compholio_1.7.19_i386.deb
http://bugs.winehq.org/show_bug.cgi?id=36642
--- Comment #12 from ptubbytaylor@gmail.com --- The latest patch doesn't seem to have changed the behavior any from the patch before it. I don't know C very well, but I'd imagine what needs to be done is an initial check at the start if the Async flag is bool or null, and if it null set it to boolean false.
https://bugs.winehq.org/show_bug.cgi?id=36642
--- Comment #13 from Hans Leidekker hans@meelstraat.net --- Commit 0b366dca3c05121204ab751ac597ccb45af262a0 fixes this for me. Can you try again with the tip?
https://bugs.winehq.org/show_bug.cgi?id=36642
ptubbytaylor@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #48680|0 |1 is obsolete| | Attachment #48681|0 |1 is obsolete| |
--- Comment #14 from ptubbytaylor@gmail.com --- Created attachment 49584 --> https://bugs.winehq.org/attachment.cgi?id=49584 New test script for problem reproduction
To set up AutoHotkey: ``` wget http://ahkscript.org/download/ahk-u32.zip unzip ahk-u32.zip ```
Then you can just run it like this ``` wine AutoHotkey.exe attachmentfile ```
This is supposed to work the first two times, and error the third time
https://bugs.winehq.org/show_bug.cgi?id=36642
--- Comment #15 from ptubbytaylor@gmail.com --- I've cloned and compiled the latest dev changes, including your change. It's acting synchronous in all test cases instead of only the first two in the test script (synchronous and default/omitted).
https://bugs.winehq.org/show_bug.cgi?id=36642
Hans Leidekker hans@meelstraat.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |647abcafb6e93d4dd0030b687c5 | |d340da12a8742 Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
--- Comment #16 from Hans Leidekker hans@meelstraat.net --- Should be fixed by 647abcafb6e93d4dd0030b687c5d340da12a8742.
https://bugs.winehq.org/show_bug.cgi?id=36642
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #17 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.33.