http://bugs.winehq.org/show_bug.cgi?id=28154
Summary: AutoIt - InputBox Product: Wine Version: 1.3.15 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: rcmaehl@aol.com
In wine-1.2.2 and wine-1.3.15 on Ubuntu Inputbox() for autoit does not work.
sample script: InputBox("meh", "meh")
Expected result: Input window
Actual result: Nothing and program exits
Terminal output when compiled: fixme:win:LockWindowUpdate ((nil)), partial stub
http://bugs.winehq.org/show_bug.cgi?id=28154
Robert Maehl rcmaehl@aol.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rcmaehl@aol.com
http://bugs.winehq.org/show_bug.cgi?id=28154
--- Comment #1 from Austin English austinenglish@gmail.com 2013-11-13 16:52:42 CST --- This is your friendly reminder that there has been no bug activity for 2 years. Is this still an issue in current (1.7.6 or newer) wine? If so, please attach the terminal output in 1.7.6 (see http://wiki.winehq.org/FAQ#get_log).
http://bugs.winehq.org/show_bug.cgi?id=28154
--- Comment #2 from Robert Maehl rcmaehl@aol.com --- Created attachment 47039 --> http://bugs.winehq.org/attachment.cgi?id=47039 Debugging log
http://bugs.winehq.org/show_bug.cgi?id=28154
--- Comment #3 from Robert Maehl rcmaehl@aol.com --- Tested on wine 1.6 on a 64-bit machine. It's running 1.7.1-actually1.6-0ubuntu1? Anyway, still doesn't work.
http://bugs.winehq.org/show_bug.cgi?id=28154
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download Status|UNCONFIRMED |NEW URL| |http://www.autoitscript.com | |/site/autoit/downloads/ CC| |focht@gmx.net Summary|AutoIt - InputBox |AutoIt v3.x 'Inputbox' | |function fails to display | |dialog with edit field | |(MonitorFromRect called | |with rect | |{Left=0,Top=0,Right=-1,Bott | |om=-1}) Ever confirmed|0 |1
--- Comment #4 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming.
Reference for AutoIt 'InputBox' function: http://www.autoitscript.com/autoit3/docs/functions/InputBox.htm
Relevant part of trace log:
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files/AutoIt3
$ WINEDEBUG=+tid,+seh,+relay,+win wine ./AutoIt3.exe test.au3 >>log.txt 2>&1 ... 002a:Call KERNEL32.MultiByteToWideChar(00000000,00000001,00147938 "InputBox("meh", "meh")",00000017,00147970,00000017) ret=004073e5 002a:Ret KERNEL32.MultiByteToWideChar() retval=00000017 ret=004073e5 ... 002a:Call user32.CreateWindowExW(00000000,0049faa8 L"AutoIt v3",0049faa8 L"AutoIt v3",00cf0000,80000000,80000000,0000012c,00000064,00000000,00000000,00400000,00000000) ret=00403903 ... 002a:Ret user32.CreateWindowExW() retval=00020074 ret=00403903 002a:Call user32.CreateWindowExW(00000000,0049fabc L"edit",00000000,50b008c4,00000000,00000000,00000000,00000000,00020074,00000001,00400000,00000000) ret=00403924 002a:trace:win:WIN_CreateWindowEx (null) L"edit" ex=00000000 style=50b008c4 0,0 0x0 parent=0x20074 menu=0x1 inst=0x400000 params=(nil) 002a:trace:win:dump_window_styles style: WS_CHILD WS_VISIBLE WS_BORDER WS_VSCROLL WS_HSCROLL 000008c4 002a:trace:win:dump_window_styles exstyle: 002a:trace:win:WIN_SetWindowLong 0x1007c -12 1 W ... 002a:trace:win:WIN_CreateWindowEx created window 0x1007c 002a:Ret user32.CreateWindowExW() retval=0001007c ret=00403924 002a:Call user32.ShowWindow(00020074,00000000) ret=00403938 002a:trace:win:show_window hwnd=0x20074, cmd=0, wasVisible 0 002a:Ret user32.ShowWindow() retval=00000000 ret=00403938 002a:Call user32.ShowWindow(00020074,00000000) ret=00403941 002a:trace:win:show_window hwnd=0x20074, cmd=0, wasVisible 0 002a:Ret user32.ShowWindow() retval=00000000 ret=00403941 ... 002a:Call user32.MonitorFromRect(008ef744,00000000) ret=0044898c 002a:Call winex11.drv.EnumDisplayMonitors(00000000,00000000,7eb36a40,008ef6a4) ret=7eb370d1 002a:Call winex11.drv.GetMonitorInfo(00000001,008ef524) ret=7eb37001 002a:Ret winex11.drv.GetMonitorInfo() retval=00000001 ret=7eb37001 002a:trace:win:GetMonitorInfoW flags 0001, monitor (0,0)-(800,600), work (0,0)-(800,600) 002a:Ret winex11.drv.EnumDisplayMonitors() retval=00000001 ret=7eb370d1 002a:trace:win:MonitorFromRect (0,0)-(-1,-1) flags 0 returning (nil) 002a:Ret user32.MonitorFromRect() retval=00000000 ret=0044898c ... 002a:Call user32.LockWindowUpdate(00000000) ret=0040fd9f 002a:fixme:win:LockWindowUpdate ((nil)), partial stub! 002a:Ret user32.LockWindowUpdate() retval=00000001 ret=0040fd9f 002a:Call user32.DestroyWindow(00020074) ret=0040fdab 002a:trace:win:DestroyWindow (0x20074) 002a:Call window proc 0x4033b3 (hwnd=0x20074,msg=WM_DESTROY,wp=00000000,lp=00000000) ... 002a:Call winmm.mciSendStringW(004b0ea4 L"close all",00000000,00000000,00000000) ret=004051fc ... 002a:Call KERNEL32.ExitProcess(00000000) ret=00422dca --- snip ---
The application code calls 'MonitorFromRect( &rect, MONITOR_DEFAULTTONULL)'
Input 'rect' is hard-coded to { Left=0, Top=0, Right=-1, Bottom=-1 }
I used virtual desktop mode with 800x600 resolution hence Wine has monitor rect (0,0)-(800,600).
The app terminates itself because MonitorFromRect() -> winex11_drv -> X11DRV_EnumDisplayMonitors() treats this as no intersection, returning NULL HMONITOR.
$ sha1sum autoit-v3-setup.exe ba7499fe9fb55438348ac013109febfc12c73437 autoit-v3-setup.exe
$ du -sh autoit-v3-setup.exe 11M autoit-v3-setup.exe
$ wine --version wine-1.7.9-209-gb231b4b
Regards
http://bugs.winehq.org/show_bug.cgi?id=28154
--- Comment #5 from Vincent Povirk madewokherd@gmail.com --- I did a quick test on Windows, and that rectangle gives me the same (non-NULL) result as 0,0,1,1.
http://bugs.winehq.org/show_bug.cgi?id=28154
--- Comment #6 from Vincent Povirk madewokherd@gmail.com --- A bit more testing suggests that Windows treats empty rectangles as (left, top, left+1, top+1).
http://bugs.winehq.org/show_bug.cgi?id=28154
--- Comment #7 from Vincent Povirk madewokherd@gmail.com --- (-1,0,2,-1) returns NULL but (-1,0,2,1) returns non-NULL, so I think it's clear what native is doing.
http://bugs.winehq.org/show_bug.cgi?id=28154
--- Comment #8 from Vincent Povirk madewokherd@gmail.com --- Created attachment 47151 --> http://bugs.winehq.org/attachment.cgi?id=47151 test program (python source)
http://bugs.winehq.org/show_bug.cgi?id=28154
--- Comment #9 from Vincent Povirk madewokherd@gmail.com --- This should be fixed by 2fef984ed5e85cd04ddcaf7b5a6ddefdbf50a627.
http://bugs.winehq.org/show_bug.cgi?id=28154
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |2fef984ed5e85cd04ddcaf7b5a6 | |ddefdbf50a627 Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #10 from Anastasius Focht focht@gmx.net --- Hello folks,
this is fixed by http://source.winehq.org/git/wine.git/commitdiff/2fef984ed5e85cd04ddcaf7b5a6...
The input window is now shown.
Thanks Vincent
Regards
https://bugs.winehq.org/show_bug.cgi?id=28154
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #11 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.12.
https://bugs.winehq.org/show_bug.cgi?id=28154
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |user32