[Bug 16876] New: .NET 3.0: WIC installer hangs due to bug in property sheet control

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Jan 11 04:29:39 CST 2009


http://bugs.winehq.org/show_bug.cgi?id=16876

           Summary: .NET 3.0: WIC installer hangs due to bug in property
                    sheet control
           Product: Wine
           Version: 1.1.12
          Platform: Other
               URL: http://www.microsoft.com/downloads/details.aspx?FamilyID
                    =10cc340b-f857-4a14-83f5-25634c3bf043
        OS/Version: other
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: comctl32
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: focht at gmx.net


Hello,

after bug 16875 is fixed, there is another bug unearthed by WIC installer.
Normally you won't notice it because the main installer claims success on this
sub-installer.

If you run WIC installer manually and press "finish" in last property page it
simply hangs.

Prerequisite: 

1. clean WINEPREFIX
2. download .NET 3.0 Framework installer from: http://download.microsoft.com
/download/4/d/a/4da3a5fa-ee6a-42b8-8bfa-ea5c4a458a7d/dotnetfx3setup.exe
(sha1sum: 
a566bcd2ffffc3842a95adc57f7df3f8cd11577f)
3. export _SFX_CAB_SHUTDOWN_REQUEST=1 (workaround, see bug 9158)
4. wine ./dotnetfx3setup.exe

It might take a while until all required packages are downloaded using BITS.

Note: If you need to redo steps, backup the directory "dotnetfx304506.30" from
"c:\\windows\\temp" to a different location, remove ~/.wine, copy
"dotnetfx304506.30" again to "c:\\windows\\temp" to prevent BITS from
downloading over and over again.

There is a (ui) thread spawned to display and handle property sheet:

--- snip ---
0084:Starting thread proc 0x1043904 (arg=(nil)) 
...
0084:Call comctl32.CreatePropertySheetPageW(7ec515b4) ret=01045ccb 
...
0084:Ret  comctl32.CreatePropertySheetPageW() retval=00149568 ret=01045ccb 
...
0084:Call comctl32.PropertySheetW(7ec516e0) ret=01045ffc
0084:Call KERNEL32.GlobalAlloc(00000040,00000084) ret=7763bc0e
0084:Ret  KERNEL32.GlobalAlloc() retval=006026a8 ret=7763bc0e
0084:trace:propsheet:PropertySheetW (0x7ec516e0)
0084:trace:propsheet:PROPSHEET_CollectSheetInfoW 
** PROPSHEETHEADER **
dwSize          52
dwFlags         01198100
hwndParent      (nil)
hInstance       (nil)
pszCaption      L"\1828\7ec5"
nPages          5
pfnCallback     0x1043cb1 
...
0084:trace:propsheet:PROPSHEET_PropertySheet startpage: 0 of 5 pages
0084:trace:propsheet:PROPSHEET_CreateDialog  
...
0084:trace:propsheet:PROPSHEET_Finish active_page 4 
...
0084:trace:propsheet:PROPSHEET_CleanUp
...
0084:trace:propsheet:PROPSHEET_Finish msg result 0 
...
0084:Ret  comctl32.PropertySheetW() retval=00000001 ret=01045ffc 
..
0084:Call user32.GetMessageA(7ec519ec,00000000,00000000,00000000) ret=01043942 
<hangs here>
--- snip ---

Relevant code:

--- snip dlls/comctl32/propsheet.c ---
static BOOL PROPSHEET_Finish(HWND hwndDlg)
{
..  
  if (psInfo->result == 0)
      psInfo->result = IDOK;
  if (psInfo->isModeless)
    psInfo->activeValid = FALSE;
  else
    psInfo->ended = TRUE;

  return TRUE;
} 
--- snip dlls/comctl32/propsheet.c ---

--- snip dlls/comctl32/propsheet.c ---
static INT_PTR PROPSHEET_PropertySheet(PropSheetInfo* psInfo, BOOL unicode)
{
...

  if(!psInfo->isModeless)
  {
      parent = psInfo->ppshheader.hwndParent;
      if (parent) EnableWindow(parent, FALSE);
  }
  bRet = PROPSHEET_CreateDialog(psInfo);
  if(!psInfo->isModeless)
  {
      bRet = do_loop(psInfo);
      if (parent) EnableWindow(parent, TRUE);
  }
  return bRet;
}
--- snip dlls/comctl32/propsheet.c ---

--- snip dlls/comctl32/propsheet.c ---
static INT do_loop(const PropSheetInfo *psInfo)
{
    MSG msg;
    INT ret = -1;
    HWND hwnd = psInfo->hwnd;

    while(IsWindow(hwnd) && !psInfo->ended && (ret = GetMessageW(&msg, NULL, 0,
0)))
    {
        if(ret == -1)
            break;

        if(!IsDialogMessageW(hwnd, &msg))
        {
            TranslateMessage(&msg);
            DispatchMessageW(&msg);
        }
    }

    if(ret == 0)
    {
        PostQuitMessage(msg.wParam);
        ret = -1;
    }

    if(ret != -1)
        ret = psInfo->result;

    DestroyWindow(hwnd);
    return ret;
} 
--- snip dlls/comctl32/propsheet.c ---

This propery sheet is modal.
When the message pumps exits, the return value is derived from "psInfo->result"
which is set to IDOK (button "finish") in PROPSHEET_Finish().

Unfortunately this tells the app the property sheet is modeless and it tries to
setup it's own message pump after PropertySheetW() return which obviously hangs
because the control is no more present at this time.

Regards


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list