WineHQ
Bug Tracking Database – Bug 28154

 Bugzilla

 

Last modified: 2014-12-31 13:40:07 UTC  

AutoIt v3.x 'Inputbox' function fails to display dialog with edit field (MonitorFromRect called with rect {Left=0,Top=0,Right=-1,Bottom=-1})

Bug 28154 - AutoIt v3.x 'Inputbox' function fails to display dialog with edit field (MonitorFromRect called with rect {Left=0,Top=0,Right=-1,Bottom=-1})
AutoIt v3.x 'Inputbox' function fails to display dialog with edit field (Moni...
Status: CLOSED FIXED
AppDB: Show Apps affected by this bug
Product: Wine
Classification: Unclassified
Component: user32
1.3.15
x86 Linux
: P2 normal
: ---
Assigned To: Mr. Bugs
http://www.autoitscript.com/site/auto...
: download
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2011-08-21 20:57 UTC by Robert Maehl
Modified: 2014-12-31 13:40 UTC (History)
2 users (show)

See Also:
Regression SHA1:
Fixed by SHA1: 2fef984ed5e85cd04ddcaf7b5a6ddefdbf50a627
Distribution: ---
Staged patchset:


Attachments
Debugging log (304 bytes, text/plain)
2013-12-29 11:57 UTC, Robert Maehl
Details
test program (python source) (376 bytes, text/plain)
2014-01-08 16:00 UTC, Esme Povirk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Maehl 2011-08-21 20:57:07 UTC
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
Comment 1 Austin English 2013-11-13 16:52:42 UTC
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).
Comment 2 Robert Maehl 2013-12-29 11:57:52 UTC
Created attachment 47039 [details]
Debugging log
Comment 3 Robert Maehl 2013-12-29 11:59:42 UTC
Tested on wine 1.6 on a 64-bit machine. It's running 1.7.1-actually1.6-0ubuntu1? Anyway, still doesn't work.
Comment 4 Anastasius Focht 2013-12-29 14:48:14 UTC
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
Comment 5 Esme Povirk 2014-01-08 14:59:06 UTC
I did a quick test on Windows, and that rectangle gives me the same (non-NULL) result as 0,0,1,1.
Comment 6 Esme Povirk 2014-01-08 15:33:43 UTC
A bit more testing suggests that Windows treats empty rectangles as (left, top, left+1, top+1).
Comment 7 Esme Povirk 2014-01-08 15:41:12 UTC
(-1,0,2,-1) returns NULL but (-1,0,2,1) returns non-NULL, so I think it's clear what native is doing.
Comment 8 Esme Povirk 2014-01-08 16:00:17 UTC
Created attachment 47151 [details]
test program (python source)
Comment 9 Esme Povirk 2014-01-28 15:28:08 UTC
This should be fixed by 2fef984ed5e85cd04ddcaf7b5a6ddefdbf50a627.
Comment 10 Anastasius Focht 2014-01-28 15:35:06 UTC
Hello folks,

this is fixed by http://source.winehq.org/git/wine.git/commitdiff/2fef984ed5e85cd04ddcaf7b5a6ddefdbf50a627

The input window is now shown.

Thanks Vincent

Regards
Comment 11 Alexandre Julliard 2014-02-07 13:06:50 UTC
Closing bugs fixed in 1.7.12.


Privacy Policy
If you have a privacy inquiry regarding this site, please write to [email protected]

Hosted By CodeWeavers