http://bugs.winehq.org/show_bug.cgi?id=27338
Summary: Msi should provide detailed error if temporary row can't be inserted (MSIMODIFY_VALIDATE_NEW -> MSIDBERROR_DUPLICATEKEY support, Dirt3 installer fails) Product: Wine Version: 1.3.21 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: msi AssignedTo: wine-bugs@winehq.org ReportedBy: focht@gmx.net
Hello,
another bug while looking at "Dirt 3" game installer ...
The installer fails on "WixSchedInternetShortcuts" custom action.
$ wine msiexec -i game.msi
--- snip --- ... 0021:trace:msi:HANDLE_CustomType1 Calling function L"WixSchedInternetShortcuts" from L"C:\users\focht\Temp\msi628.tmp" ... 0024:Call msi.MsiRecordSetStringA(00000007,00000000,014f49b0 "WixSchedInternetShortcuts: Adding folder 'Fid_D5579516_84CF_3B51_7784_BD063F26A84D', component 'Shortcuts__0F4C15DF_B733_5E9F_AEB9_4AE3EB2CE922' to the CreateFolder table") ret=014e33e2 ... 0024:Call msi.MsiRecordSetStringA(00000009,00000000,014f49b0 "WixSchedInternetShortcuts: Adding folder 'Fid_5AD471A0_5D86_6CBD_CAA1_F4D40C3E18F0', component 'Shortcuts__0F4C15DF_B733_5E9F_AEB9_4AE3EB2CE922' to the CreateFolder table") ret=014e33e2 ... 0024:Call msi.MsiRecordSetStringA(00000009,00000000,014f49b0 "WixSchedInternetShortcuts: Adding folder 'ApplicationProgramsMenuFolder', component 'Shortcuts__CFDF6910_DB4F_C69E_9ADA_92860D3756B1' to the CreateFolder table") ret=014e33e2 ... 0024:Call msi.MsiRecordSetStringA(00000009,00000000,014f49b0 "WixSchedInternetShortcuts: Adding folder 'ApplicationProgramsMenuFolder', component 'Shortcuts__CFDF6910_DB4F_C69E_9ADA_92860D3756B1' to the CreateFolder table") ret=014e33e2 ... 0024:Call msi.MsiCreateRecord(00000002) ret=014e47b5 0024:Call ntdll.RtlAllocateHeap(00110000,00000008,0000002c) ret=6839152e 0024:Ret ntdll.RtlAllocateHeap() retval=016cc4a8 ret=6839152e 0024:trace:msi:alloc_msihandle 0x16cc4a8 -> 9 0024:Ret msi.MsiCreateRecord() retval=00000009 ret=014e47b5 ... 0024:Call msi.MsiRecordSetStringW(00000009,00000001,016cc6a0 L"ApplicationProgramsMenuFolder") ret=014e48e5 ... 0024:Call msi.MsiRecordSetStringW(00000009,00000002,016cc638 L"Shortcuts__CFDF6910_DB4F_C69E_9ADA_92860D3756B1") ret=014e48e5 ... 0024:Call msi.MsiViewModify(00000007,00000007,00000009) ret=014e491b 0024:trace:msi:MsiViewModify 7 7 9 0024:Call ntdll.RtlAllocateHeap(00110000,00000000,00000008) ret=683c8451 0024:Ret ntdll.RtlAllocateHeap() retval=016cc528 ret=683c8451 0024:Call ntdll.RtlFreeHeap(00110000,00000000,016cc528) ret=683c84f1 0024:Ret ntdll.RtlFreeHeap() retval=00000001 ret=683c84f1 0024:Ret msi.MsiViewModify() retval=0000065b ret=014e491b 0024:Call msi.MsiViewModify(00000007,00000009,00000009) ret=014e493e 0024:trace:msi:MsiViewModify 7 9 9 0024:Call ntdll.RtlAllocateHeap(00110000,00000000,00000008) ret=683c8451 0024:Ret ntdll.RtlAllocateHeap() retval=016cc528 ret=683c8451 0024:Call ntdll.RtlFreeHeap(00110000,00000000,016cc528) ret=683c84f1 0024:Ret ntdll.RtlFreeHeap() retval=00000001 ret=683c84f1 0024:Ret msi.MsiViewModify() retval=0000065b ret=014e493e 0024:Call msi.MsiViewGetErrorW(00000007,0a20e60c,0a20e5f4) ret=014e4961 0024:fixme:msi:MsiViewGetErrorW 7 0xa20e60c 0xa20e5f4 - returns empty error string 0024:Ret msi.MsiViewGetErrorW() retval=00000000 ret=014e4961 ... 0024:Call msi.MsiRecordSetStringA(0000000a,00000000,014f49b0 "WixSchedInternetShortcuts: Error 0x8007065b: failed to add temporary row, dberr: 0, err: ") ret=014e33e2 ... 0021:err:msi:ITERATE_Actions Execution halted, action L"WixSchedInternetShortcuts" returned 1603 --- snip ---
Orca dump of "WixInternetShort" table:
--- snip --- WixInternetShortcut Component_ Directory_ Name Target Attributes s72 s72 s72 s72 l0 i2 WixInternetShortcut WixInternetShortcut SCID__02F04857_1890_3E47_2CDB_ABB67103AA99 Shortcuts__0F4C15DF_B733_5E9F_AEB9_4AE3EB2CE922 Fid_D5579516_84CF_3B51_7784_BD063F26A84D Join Code M.lnk http://www.codemasters.com/codem 0 SCID__2B3E8C81_E632_A062_08E5_2F5110BA11C4 Shortcuts__0F4C15DF_B733_5E9F_AEB9_4AE3EB2CE922 Fid_5AD471A0_5D86_6CBD_CAA1_F4D40C3E18F0 DiRT 3 Homepage.lnk http://www.dirt3game.com 0 SCID__DAC95ADF_79FE_72E5_13F7_87C55123F117 Shortcuts__CFDF6910_DB4F_C69E_9ADA_92860D3756B1 ApplicationProgramsMenuFolder Join Code M.url http://www.codemasters.com/codem 1 SCID__80F28856_E815_8494_E21B_DE466EB73131 Shortcuts__CFDF6910_DB4F_C69E_9ADA_92860D3756B1 ApplicationProgramsMenuFolder DiRT 3 Homepage.url http://www.dirt3game.com 1 --- snip ---
The insertion of last temporary WixInternetShortcut record fails due to folder already existing in "CreateFolder" table -> duplicate item. This error is usually harmless but must be propagated somehow. Msi only returns ERROR_FUNCTION_FAILED on temporary row insertion failure. The installer tries to figure out exact error and issues MSIMODIFY_VALIDATE_NEW, see:
http://msdn.microsoft.com/en-us/library/aa370519.aspx
--- quote --- MSIMODIFY_VALIDATE_NEW 9
Validate a new record. Does not validate across joins. Checks for duplicate keys. Obtain validation errors by calling MsiViewGetError. Works with read-write and read-only records. This mode cannot be used with a view containing joins. --- quote ---
The following MsiViewGetErrorW() to fetch the detailed error should actually return MSIDBERROR_DUPLICATEKEY. The installer recognizes this error code and does not fail if returned.
Regards