http://bugs.winehq.org/show_bug.cgi?id=27971
Summary: the /qb option of msiexec results in unhandled page fault Product: Wine Version: 1.3.25 Platform: x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: msi AssignedTo: wine-bugs@winehq.org ReportedBy: htl10@users.sourceforge.net
I have a few msi's (unfortunately of proprietary commercial source) which results in the message:
"This advertised application will not be installed because it might be unsafe. Contact your administrator to change the installation user interface option of the package to basic."
So I tried the /qb option of msiexec. This results in unhandled page fault. Granted this feature may not be implemented, but it should just do a FIXME or something and exit gracefully. Here is the message. I'd be happy to try any patch, or even have a go at doing a patch myself if somebody wants to point me in the right direction.
---------------------- fixme:storage:create_storagefile Storage share mode not implemented. wine: Unhandled page fault on read access to 0x00000000 at address 0x6848aa70 (thread 0009), starting debugger... Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x6848aa70). Register dump: CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b EIP:6848aa70 ESP:0033f910 EBP:00000000 EFLAGS:00010246( R- -- I Z- -P- ) EAX:00000000 EBX:684ffe00 ECX:00110064 EDX:001aef8c ESI:001aef68 EDI:00198060 Stack dump: 0x0033f910: 00175a10 684dccf2 00000000 00198060 0x0033f920: 00198060 68477236 684ffe00 6847a59d 0x0033f930: 00000000 00000002 0017ea00 0019d448 0x0033f940: 00000000 00000000 6848a7ab 684ffe00 0x0033f950: 00185248 00198060 001aef68 6847b7e3 0x0033f960: 00198060 00000001 001aef68 00000000 Backtrace: =>0 0x6848aa70 msi_load_media_info+0x2d0() in msi (0x00000000) 0x6848aa70 msi_load_media_info+0x2d0 in msi: movzwl 0x0(%ebp,%eax,1),%ecx ... ------------------------------
This is on x86_64 hardware but running 32-bit wine.
http://bugs.winehq.org/show_bug.cgi?id=27971
--- Comment #1 from Hans Leidekker hans@meelstraat.net 2011-08-04 12:41:48 CDT --- Please attach a +msi trace. Make sure you have debug symbols in your backtrace.
http://bugs.winehq.org/show_bug.cgi?id=27971
--- Comment #2 from Hin-Tak Leung htl10@users.sourceforge.net 2011-08-04 20:01:39 CDT --- (In reply to comment #1)
Please attach a +msi trace. Make sure you have debug symbols in your backtrace.
Thanks for the +msi tips. So I did the WINEDEBUG=+msi , and the relevant info is below:
-------------------- trace:msi:msi_get_property property L"SourceDir" not found Backtrace: =>0 0x6838dfe8 msi_load_media_info+0x2c8() in msi (0x001e80c4) 1 0x6837f0e3 ACTION_InstallFiles+0x1d2() in msi (0x001e80a0) 2 0x68345bbd ACTION_HandleStandardAction+0xcc() in msi (0x6837ef10) 3 0x68355db3 ACTION_PerformAction+0x42() in msi (0x00196bd8) 4 0x6835655b ITERATE_Actions+0xaa() in msi (0x00196bd8) 5 0x6839f2a9 MSI_IterateRecords+0x68() in msi (0x683564b0) 6 0x68345035 ACTION_ProcessExecSequence+0x114() in msi (0x00175546) 7 0x68356b26 MSI_InstallPackage+0x315() in msi (0x00175546) 8 0x68391786 MsiInstallProductW+0xf5() in msi (0x00000000) 0x6838dfe8 msi_load_media_info+0x2c8 in msi: movzwl 0x0(%edx,%eax,1),%ecx -------------------
I then ran 'objdump -f -d msi.dll.so' and found that the crash was lstrcpyW() trying to copy NULL from a previous 'msi_dup_property(.., szSourceDir)' result. So I made this patch:
---------------------- diff --git a/dlls/msi/media.c b/dlls/msi/media.c index c879af1..316c72a 100644 --- a/dlls/msi/media.c +++ b/dlls/msi/media.c @@ -681,6 +681,7 @@ UINT msi_load_media_info(MSIPACKAGE *package, UINT Sequence, MSIMEDIAINFO *mi) 'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','`','M','e','d','i','a','`',' ', 'W','H','E','R','E',' ','`','L','a','s','t','S','e','q','u','e','n','c','e','`',' ', '>','=',' ','%','i',' ','O','R','D','E','R',' ','B','Y',' ','`','D','i','s','k','I','d','`',0}; + static const WCHAR empty_dir[] = {0}; MSIRECORD *row; LPWSTR source_dir, source; DWORD options; @@ -711,6 +712,8 @@ UINT msi_load_media_info(MSIPACKAGE *package, UINT Sequence, MSIMEDIAINFO *mi)
msi_set_sourcedir_props(package, FALSE); source_dir = msi_dup_property(package->db, szSourceDir); + if (!source_dir) + source_dir = strdupW(empty_dir); lstrcpyW(mi->sourcedir, source_dir); PathAddBackslashW(mi->sourcedir); mi->type = get_drive_type(source_dir); ---------------
This patch puts a empty wide string into source_dir if source_dir is NULL. After applying this patch, it is somewhat curious that /qb works if I run it TWICE in a row!
It is as if the first time fails but copy the msi somewhere anyway (%WINDOWS%/Installer/ ? ) to allow the 2nd time to find it at some default location?
So the patch is a step in the right direction but not yet completely correct - any comments on improvements?
http://bugs.winehq.org/show_bug.cgi?id=27971
--- Comment #3 from Hans Leidekker hans@meelstraat.net 2011-08-05 00:48:47 CDT --- We need to know why the SourceDir property is not set here, so please attach a +msi trace that includes a proper backtrace with line numbers.
http://bugs.winehq.org/show_bug.cgi?id=27971
--- Comment #4 from Hin-Tak Leung htl10@users.sourceforge.net 2011-08-05 04:18:34 CDT --- (In reply to comment #3)
We need to know why the SourceDir property is not set here, so please attach a +msi trace that includes a proper backtrace with line numbers.
I am not sure why +msi or the winedebugger dump didn't show line numbers - I did compile with -g.
Is it not possible for the msi not to set the SourceDir property? The crash is 100% sure at lstrcpyW() copying NULL.
http://bugs.winehq.org/show_bug.cgi?id=27971
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net Summary|the /qb option of msiexec |Installation of FooBar.msi |results in unhandled page |using msiexec fails with |fault |/qb switch (unattended with | |basic UI)
--- Comment #5 from Anastasius Focht focht@gmx.net 2012-01-18 16:38:53 CST --- Hello,
correcting misleading summary. Unattended install with basic UI works fine with many other msi packages.
If you don't provide further information for this mal^H^H^Hsoftware you're basically on your own.
Try to pass "-g -gdwarf-2" to CFLAGS.
Regards
http://bugs.winehq.org/show_bug.cgi?id=27971
Hin-Tak Leung htl10@users.sourceforge.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #6 from Hin-Tak Leung htl10@users.sourceforge.net 2012-02-17 16:24:44 CST --- cannot reproduce for 1.4-rc3-ish . don't know what happened but it looks like there has been some 120 commits between then and now in the dll/msi directory alone, it is probably one of those. I suspect the original message about requesting qb was flawed, since the software (older versions) did not require it, and not with 1.4-rc3 either.
http://bugs.winehq.org/show_bug.cgi?id=27971
--- Comment #7 from Hin-Tak Leung htl10@users.sourceforge.net 2012-02-17 16:35:21 CST --- Just re-confirming that the same msi (I believe it is the same one), no longer prompt for basic UI option, so it looks like the original message was bogus.
http://bugs.winehq.org/show_bug.cgi?id=27971
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Alexandre Julliard julliard@winehq.org 2012-02-24 12:48:24 CST --- Closing bugs fixed in 1.4-rc5.
http://bugs.winehq.org/show_bug.cgi?id=27971
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Installer