http://bugs.winehq.org/show_bug.cgi?id=20129
Summary: FaleWEB doesn't run on Wine (crashes on startup) Product: Wine Version: 1.1.29 Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: gabspeck@gmail.com
Created an attachment (id=23709) --> (http://bugs.winehq.org/attachment.cgi?id=23709) Wine output and back trace
Hello,
We use a VoIP/SIP application called FaleWEB in our company, and unfortunately it's Windows-only and the corporate SIP server rejects any other SIP client based on the User-Agent.
However, when we try to run it on Wine, it crashes with the output/back trace attached.
I can supply you with the installer, if needed.
http://bugs.winehq.org/show_bug.cgi?id=20129
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |http://www.portaldigitro.co | |m.br/faleweb/download.php
--- Comment #1 from Juan Lang juan_lang@yahoo.com 2009-09-22 11:24:44 --- I think I got the correct download URL, please correct it if it's wrong.
http://bugs.winehq.org/show_bug.cgi?id=20129
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #2 from Juan Lang juan_lang@yahoo.com 2009-09-22 12:53:28 --- Confirming.
http://bugs.winehq.org/show_bug.cgi?id=20129
--- Comment #3 from Gabriel Speckhahn gabspeck@gmail.com 2009-09-22 13:55:25 --- Any ideas or workarounds for this ?
http://bugs.winehq.org/show_bug.cgi?id=20129
--- Comment #4 from Juan Lang juan_lang@yahoo.com 2009-09-22 14:32:47 --- (In reply to comment #3)
Any ideas or workarounds for this ?
Sorry, no. I took a quick look at a +relay,+seh log, and the app wasn't doing anything suspicious immediately before its crash, just a strlen followed by a memcpy, both of which succeeded. Without knowing the source of the NULL pointer it's dereferencing, I don't know what to suggest.
http://bugs.winehq.org/show_bug.cgi?id=20129
Louis Lenders xerox_xerox2000@yahoo.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |xerox_xerox2000@yahoo.co.uk
--- Comment #5 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2010-10-03 16:29:08 CDT --- (In reply to comment #3)
Any ideas or workarounds for this ?
Looks like the problem is here:
001c:Call user32.FindWindowA(0045b074 "Shell_TrayWnd",0045b5dc "") ret=00438c6d 001c:Ret user32.FindWindowA() retval=00000000 ret=00438c6d
Below is a stupid hack that allows me to start the application. I guess the application expects to find the Shell_TrayWnd , but it doesn;t find it. Anyone an idea why?
diff --git a/dlls/user32/win.c b/dlls/user32/win.c index ee44278..2d8c9a6 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -1775,7 +1775,10 @@ HWND WINAPI FindWindowExW( HWND parent, HWND child, LPCWS */ HWND WINAPI FindWindowA( LPCSTR className, LPCSTR title ) { + CHAR sh[] = "Shell_TrayWnd"; + HWND ret = FindWindowExA( 0, 0, className, title ); + if(!strcmp(sh, className)) return 0xcaca; if (!ret) SetLastError (ERROR_CANNOT_FIND_WND_CLASS); return ret; }
http://bugs.winehq.org/show_bug.cgi?id=20129
--- Comment #6 from Dmitry Timoshkov dmitry@codeweavers.com 2010-10-04 03:55:25 CDT --- (In reply to comment #5)
Looks like the problem is here:
001c:Call user32.FindWindowA(0045b074 "Shell_TrayWnd",0045b5dc "") ret=00438c6d 001c:Ret user32.FindWindowA() retval=00000000 ret=00438c6d
Wine does provide a tray implementation, probably FindWindow() should ignore title when it's NULL or empty (!title[0]). Needs a test case.
http://bugs.winehq.org/show_bug.cgi?id=20129
--- Comment #7 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2010-10-04 09:59:16 CDT --- (In reply to comment #6)
(In reply to comment #5)
Looks like the problem is here:
001c:Call user32.FindWindowA(0045b074 "Shell_TrayWnd",0045b5dc "") ret=00438c6d 001c:Ret user32.FindWindowA() retval=00000000 ret=00438c6d
Wine does provide a tray implementation, probably FindWindow() should ignore title when it's NULL or empty (!title[0]). Needs a test case.
I'll write a test, see if the problem is there
http://bugs.winehq.org/show_bug.cgi?id=20129
--- Comment #8 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2010-10-04 10:16:49 CDT --- Below is the test, this passes in XP, but fails in wine, so indeed FindWindow cause the bug. I'll fix a patch
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index f1f590c..367bfff 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -5477,6 +5477,9 @@ static void test_GetWindowModuleFileName(void)
hwnd = FindWindow("Shell_TrayWnd", NULL); ok(IsWindow(hwnd) || broken(!hwnd), "got invalid tray window %p\n", hwnd); + hwnd = FindWindow("Shell_TrayWnd", buf2); + trace("Executing Findow test qq\n"); + ok(hwnd != 0, "got invalid tray window %p\n", hwnd); SetLastError(0xdeadbeef); ret1 = pGetWindowModuleFileNameA(hwnd, buf1, sizeof(buf1)); ok(!ret1 || broken(ret1), /* win98 */ "expected 0, got %u\n", ret1);
http://bugs.winehq.org/show_bug.cgi?id=20129
--- Comment #9 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2010-10-04 13:24:26 CDT --- Created an attachment (id=31115) --> (http://bugs.winehq.org/attachment.cgi?id=31115) patch + test
Here 's a patch +test. Apparently the problem is with this piece of code:
if (title) { while (list[i]) { if (GetWindowTextW( list[i], buffer, len + 1 ) && !strcmpiW( buffer, title )) break; i++; } } retvalue = list[i];
With a NULL pointer for title, the while loop is skipped, but when title is an empty character, we enter the loop and GetWindowTextW fails (MSDN states that as well: GetWindoWTextW returns FALSE for empty char) , so i++ is incorrectly raised to 1, and we end up with a non existing retval = list[1].
I guess there are several ways to fix this, but the easiest is to treat an empty charcacter as a NULL pointer
http://bugs.winehq.org/show_bug.cgi?id=20129
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch Component|-unknown |user32
--- Comment #10 from Juan Lang juan_lang@yahoo.com 2010-10-04 17:10:38 CDT --- Setting component and patch keyword based on Louis's work.
http://bugs.winehq.org/show_bug.cgi?id=20129
--- Comment #11 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2010-10-12 12:29:59 CDT --- tests for FindWindow with empty character are now in git. dmitry, do you have any plans to fix this (resend)? I'm willing to work on this bug, but i didn't really get the thing about creating a second standalone traywnd, any hints on this?
http://bugs.winehq.org/show_bug.cgi?id=20129
--- Comment #12 from Dmitry Timoshkov dmitry@codeweavers.com 2010-10-13 00:30:05 CDT --- (In reply to comment #11)
tests for FindWindow with empty character are now in git. dmitry, do you have any plans to fix this (resend)? I'm willing to work on this bug, but i didn't really get the thing about creating a second standalone traywnd, any hints on this?
I don't understand that Alexandre's suggestion either, especially since that's a separate (and really cosmetic) thing to the actual bug my patch fixes.
http://bugs.winehq.org/show_bug.cgi?id=20129
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|FaleWEB doesn't run on Wine |FaleWEB crashes on startup |(crashes on startup) |
http://bugs.winehq.org/show_bug.cgi?id=20129
--- Comment #13 from Austin English austinenglish@gmail.com 2010-10-19 14:13:47 CDT --- Fixed by http://source.winehq.org/git/wine.git/?a=commitdiff;h=2f0b9dd3bfa3820abd8984... ?
http://bugs.winehq.org/show_bug.cgi?id=20129
--- Comment #14 from Dmitry Timoshkov dmitry@codeweavers.com 2010-10-20 01:24:14 CDT --- (In reply to comment #13)
Fixed by http://source.winehq.org/git/wine.git/?a=commitdiff;h=2f0b9dd3bfa3820abd8984... ?
An important part is still not committed: http://www.winehq.org/pipermail/wine-patches/2010-October/094143.html
http://bugs.winehq.org/show_bug.cgi?id=20129
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #15 from Dmitry Timoshkov dmitry@codeweavers.com 2010-11-03 01:41:23 CDT --- Finally should be fixed by
http://source.winehq.org/git/wine.git/?a=commit;h=8c963852f8dc201ca9a5cef724...
http://bugs.winehq.org/show_bug.cgi?id=20129
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #16 from Alexandre Julliard julliard@winehq.org 2010-11-12 13:34:27 CST --- Closing bugs fixed in 1.3.7.