WineHQ
Bug Tracking Database – Bug 35149

 Bugzilla

 

Last modified: 2014-01-10 14:46:27 UTC  

RSA SecurID token v411 installer hangs during processing of EULA (large RTF passed twice: window text and richedit streamin callback)

Bug 35149 - RSA SecurID token v411 installer hangs during processing of EULA (large RTF passed twice: window text and richedit streamin callback)
RSA SecurID token v411 installer hangs during processing of EULA (large RTF p...
Status: CLOSED FIXED
AppDB: Show Apps affected by this bug
Product: Wine
Classification: Unclassified
Component: msi
1.7.8
x86 Linux
: P2 normal
: ---
Assigned To: Mr. Bugs
ftp://ftp.rsasecurity.com/pub/agents/...
: download, Installer
Depends on:
Blocks: 35145
  Show dependency tree
 
Reported: 2013-12-17 05:31 UTC by Anastasius Focht
Modified: 2014-01-10 14:46 UTC (History)
0 users

See Also:
Regression SHA1:
Fixed by SHA1: f222582af6806bdd0aaab954bc87457b297647db
Distribution: ---
Staged patchset:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anastasius Focht 2013-12-17 05:31:42 UTC
Hello folks,

as mentioned here http://bugs.winehq.org/show_bug.cgi?id=35145#c2

--- quote ---
What version of the RSA client? I've never been able to install it, the msi installer hangs.
--- quote ---

After choosing the location which decides if domestic or export EULA should be displayed, the installer seems hang.
Actually it churns on one CPU with 100% trying to break up the complex RTF passed in as one chunk with window text and the same content added a _second_ time using richedit streamin callback.

Source: http://source.winehq.org/git/wine.git/blob/3271b982632e7730d6cee373f4c9a4af37012036:/dlls/msi/dialog.c#l1295

--- snip ---
1295 static UINT msi_dialog_scrolltext_control( msi_dialog *dialog, MSIRECORD *rec )
1296 {
...
1308     hRichedit = LoadLibraryA("riched20");
1309
1310     style = WS_BORDER | ES_MULTILINE | WS_VSCROLL |
1311             ES_READONLY | ES_AUTOVSCROLL | WS_TABSTOP;
1312     control = msi_dialog_add_control( dialog, rec, szRichEdit20W, style );
...
--- snip ---

The large RTF content will be loaded from column 10 and passed as one chunk to dialog_create_window().
Additionally MSI_RecordGetString() runs deformat_string() on that RTF which also takes some time.

--- snip ---
781 /* everything except radio buttons */
782 static msi_control *msi_dialog_add_control( msi_dialog *dialog,
783                   MSIRECORD *rec, LPCWSTR szCls, DWORD style )
784 {
785     DWORD attributes;
786     LPCWSTR text, name;
787     DWORD exstyle = 0;
788
789     name = MSI_RecordGetString( rec, 2 );
790     attributes = MSI_RecordGetInteger( rec, 8 );
791     ext = MSI_RecordGetString( rec, 10 );
792
793     TRACE("%s, %s, %08x, %s, %08x\n", debugstr_w(szCls), debugstr_w(name),
794                   attributes, debugstr_w(text), style);
795
796     if( attributes & msidbControlAttributesVisible )
797         style |= WS_VISIBLE;
798     if( ~attributes & msidbControlAttributesEnabled )
799         style |= WS_DISABLED;
800     if( attributes & msidbControlAttributesSunken )
801         exstyle |= WS_EX_CLIENTEDGE;
802
803     dialog_map_events( dialog, name );
804
805     return dialog_create_window( dialog, rec, exstyle, szCls, name, text, style, dialog->hwnd );
806 }
--- snip ---

All these things seem kind of redundant and inefficient because some lines later the same content is added again, now with more efficient richedit streamin callback mechanism (see msi_scrolltext_add_text()):

--- snip ---
1295 static UINT msi_dialog_scrolltext_control( msi_dialog *dialog, MSIRECORD *rec )
1296 {
...
1325     /* subclass the static control */
1326     info->oldproc = (WNDPROC) SetWindowLongPtrW( control->hwnd, GWLP_WNDPROC,
1327                            (LONG_PTR)MSIScrollText_WndProc );
1328     SetPropW( control->hwnd, szButtonData, info );
1329
1330     /* add the text into the richedit */
1331     text = MSI_RecordGetString( rec, 10 );
1332     if (text)
1333         msi_scrolltext_add_text( control, text );
1334
1335     return ERROR_SUCCESS;
1336 }
--- snip ---

If you avoid the first load via window text in scrolltext control case, the EULA is displayed almost instantly.

===

The 'hickup' when adding the content twice - through window text and richedit  streamin callback could be also subject to some bug.

With 'winetricks -q riched20' it still takes an awful lot time: ~25 seconds with i5 2.60 GHz machine - but at least it finishes unlike Wine builtin (maybe it does ... after 1 hour?)

$ sha1sum RSASecurIDToken411.zip 
e0e98c04bd8e1ba52fcf73e058703ccbb85d3252  RSASecurIDToken411.zip

$ du -sh RSASecurIDToken411.zip 
20M	RSASecurIDToken411.zip

$ wine --version
wine-1.7.8-232-g3bad812

Regards
Comment 1 Austin English 2013-12-17 13:02:44 UTC
(In reply to comment #0)
> With 'winetricks -q riched20' it still takes an awful lot time: ~25 seconds
> with i5 2.60 GHz machine - but at least it finishes unlike Wine builtin
> (maybe it does ... after 1 hour?)

FWIW, with dual i7's @ 3.20 GHZ, it took about 5 minutes
austin@aw25 ~/r $ WINEDEBUG=timestamp msiexec /i RSASecurIDToken411.msi 
499977.416:fixme:storage:create_storagefile Storage share mode not implemented.
500070.680:err:richedit:ReadStyleSheet skipping optional destination
500070.680:err:richedit:ReadStyleSheet skipping optional destination
500070.680:err:richedit:ReadStyleSheet skipping optional destination
500070.680:err:richedit:ReadStyleSheet skipping optional destination
500070.680:err:richedit:ReadStyleSheet skipping optional destination
500070.685:fixme:richedit:ME_RTFReadPictGroup 13 13
500151.987:err:richedit:ReadStyleSheet skipping optional destination
500151.987:err:richedit:ReadStyleSheet skipping optional destination
500151.987:err:richedit:ReadStyleSheet skipping optional destination
500151.987:err:richedit:ReadStyleSheet skipping optional destination
500151.987:err:richedit:ReadStyleSheet skipping optional destination
500151.993:fixme:richedit:ME_RTFReadPictGroup 13 13
Comment 2 Anastasius Focht 2013-12-19 13:53:38 UTC
Hello folks,

this is fixed by commit http://source.winehq.org/git/wine.git/commitdiff/f222582af6806bdd0aaab954bc87457b297647db

Thanks Hans

Regards
Comment 3 Alexandre Julliard 2013-12-20 12:43:36 UTC
Closing bugs fixed in 1.7.9.
Comment 4 Alexandre Julliard 2014-01-10 14:46:27 UTC
Removing 1.6.x milestone from bugs included in 1.6.2.


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

Hosted By CodeWeavers