[Bug 32853] New: Microsoft Expression Design 4 (Free Version) installer fails while trying to check for msi.dll file version (MsiGetFileVersion)

wine-bugs at winehq.org wine-bugs at winehq.org
Wed Jan 30 17:23:40 CST 2013


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

             Bug #: 32853
           Summary: Microsoft Expression Design 4 (Free Version) installer
                    fails while trying to check for msi.dll file version
                    (MsiGetFileVersion)
           Product: Wine
           Version: 1.5.22
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: msi
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: focht at gmx.net
    Classification: Unclassified


Hello folks,

Microsoft Expression Design 4 (Free Version) installer still fails.

Prerequisite: 'winetricks -q dotnet40'

Suffers from bug 32471 hence:

WINEDLLOVERRIDES="d3d9=d" wine ./Design_Trial_en.exe

Managed backtrace:

--- snip ---
(29.44): CLR exception - code e0434352 (first chance)
OS Thread Id: 0x44 (5)
Child SP IP       Call Site
093bd8f0 7b83aa73 [HelperMethodFrame: 093bd8f0] 
093bd940 08c719e0
Microsoft.WindowsInstaller.Installer.FileVersion(System.String)
093bd958 08c718c4 Microsoft.WindowsInstaller.Installer.get_Version()
093bd968 08c71454 XSetupAct.ConfigMSI.CheckSupportedMsiVersion()
093bd9dc 08c71129 XSetupAct.ConfigMSI.OnTaskWorkerDoWork(System.Object,
System.ComponentModel.DoWorkEventArgs)
093bda10 0439721a
System.ComponentModel.BackgroundWorker.OnDoWork(System.ComponentModel.DoWorkEventArgs)
093bda24 04397121
System.ComponentModel.BackgroundWorker.WorkerThreadStart(System.Object)
093bdc3c 791421db [HelperMethodFrame_PROTECTOBJ: 093bdc3c]
System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr,
System.Object[], System.Object, Int32, Boolean, System.Object[] ByRef)
093bdf90 04396032
System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage,
System.Runtime.Remoting.Messaging.IMessageSink)
093bdff4 04395ea5
System.Runtime.Remoting.Proxies.AgileAsyncWorkerItem.DoAsyncCall()
093be000 04395e59
System.Runtime.Remoting.Proxies.AgileAsyncWorkerItem.ThreadPoolCallBack(System.Object)
093be008 04395c9d
System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object)
093be010 04395aa9
System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext,
System.Threading.ContextCallback, System.Object, Boolean)
093be034 0439588b
System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
093be048 04394ea6 System.Threading.ThreadPoolWorkQueue.Dispatch()
093be094 04394c3c
System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
093be454 791421db [DebuggerU2MCatchHandlerFrame: 093be454] 
--- snip ---

Relay trace log:

--- snip ---
...
002e:Call msi.MsiGetFileVersionW(013f03f8
L"C:\\windows\\system32\\Msi.dll",0458da50,0458db44,00000000,0458db40)
ret=08fd03f2
002e:trace:msi:MsiGetFileVersionW L"C:\\windows\\system32\\Msi.dll" 0x458da50 0
(nil) 0
002e:Call version.GetFileVersionInfoSizeW(013f03f8
L"C:\\windows\\system32\\Msi.dll",00000000) ret=7ce994ca 
...
002e:Ret  version.GetFileVersionInfoSizeW() retval=000006ac ret=7ce994ca
002e:Call ntdll.RtlAllocateHeap(00110000,00000000,000006ac) ret=7ce904de
002e:Ret  ntdll.RtlAllocateHeap() retval=072efeb8 ret=7ce904de
002e:Call version.GetFileVersionInfoW(013f03f8
L"C:\\windows\\system32\\Msi.dll",00000000,000006ac,072efeb8) ret=7ce99541
...
002e:Ret  version.GetFileVersionInfoW() retval=00000001 ret=7ce99541
002e:Call version.VerQueryValueW(072efeb8,7cef66fe L"\\",0458d904,0458d908)
ret=7ce99592
002e:Ret  version.VerQueryValueW() retval=00000001 ret=7ce99592
002e:Call version.VerQueryValueW(072efeb8,7cef57c0
L"\\VarFileInfo\\Translation",0458d900,0458d908) ret=7ce9968a
002e:Ret  version.VerQueryValueW() retval=00000001 ret=7ce9968a
002e:Call ntdll.RtlFreeHeap(00110000,00000000,072efeb8) ret=7ce90514
002e:Ret  ntdll.RtlFreeHeap() retval=00000001 ret=7ce90514
002e:Ret  msi.MsiGetFileVersionW() retval=000000ea ret=08fd03f2
...
--- snip ---

MsiGetFileVersionW() is called a second time, now with pcchVersionBuf properly
set (++pcchVersionBuf of first call):

--- snip ---
...
002e:Call msi.MsiGetFileVersionW(013f03f8
L"C:\\windows\\system32\\Msi.dll",0458da58,0458db44,00000000,0458db40)
ret=08fd03f2
002e:trace:msi:MsiGetFileVersionW L"C:\\windows\\system32\\Msi.dll" 0x458da58
15 (nil) 4
002e:Call version.GetFileVersionInfoSizeW(013f03f8
L"C:\\windows\\system32\\Msi.dll",00000000) ret=7ce994ca 
...
002e:Ret  version.GetFileVersionInfoSizeW() retval=000006ac ret=7ce994ca
002e:Call ntdll.RtlAllocateHeap(00110000,00000000,000006ac) ret=7ce904de
002e:Ret  ntdll.RtlAllocateHeap() retval=072efeb8 ret=7ce904de
002e:Call version.GetFileVersionInfoW(013f03f8
L"C:\\windows\\system32\\Msi.dll",00000000,000006ac,072efeb8) ret=7ce99541 
...
002e:Ret  version.GetFileVersionInfoW() retval=00000001 ret=7ce99541
002e:Call version.VerQueryValueW(072efeb8,7cef66fe L"\\",0458d914,0458d918)
ret=7ce99592
002e:Ret  version.VerQueryValueW() retval=00000001 ret=7ce99592
002e:Call version.VerQueryValueW(072efeb8,7cef57c0
L"\\VarFileInfo\\Translation",0458d910,0458d918) ret=7ce9968a
002e:Ret  version.VerQueryValueW() retval=00000001 ret=7ce9968a
002e:Call ntdll.RtlFreeHeap(00110000,00000000,072efeb8) ret=7ce90514
002e:Ret  ntdll.RtlFreeHeap() retval=00000001 ret=7ce90514
002e:Ret  msi.MsiGetFileVersionW() retval=000000ea ret=08fd03f2 
...
002e:Call
KERNEL32.FormatMessageA(00001200,00000000,000000ea,00000000,072ef688,00000400,00000000)
ret=08fd0b83
002e:Ret  KERNEL32.FormatMessageA() retval=00000016 ret=08fd0b83
...
002e:Call KERNEL32.MultiByteToWideChar(00000000,00000001,072ef688 "More data
available.\r\n",ffffffff,013f0db0,00000017) ret=793eddaa
...
002e:Call msi.MsiGetLastErrorRecord() ret=08fd0cac
002e:fixme:msi:MsiGetLastErrorRecord 
002e:Ret  msi.MsiGetLastErrorRecord() retval=00000000 ret=08fd0cac
002e:Call KERNEL32.RaiseException(e0434352,00000001,00000005,0458da44)
ret=791cac08
002e:trace:seh:raise_exception code=e0434352 flags=1 addr=0x7b83aa73
ip=7b83aa73 tid=002e
002e:trace:seh:raise_exception  info[0]=80131501
002e:trace:seh:raise_exception  info[1]=00000000
002e:trace:seh:raise_exception  info[2]=00000000
002e:trace:seh:raise_exception  info[3]=00000000
002e:trace:seh:raise_exception  info[4]=79140000
002e:trace:seh:raise_exception  eax=7b826849 ebx=7b8b96b0 ecx=79140000
edx=0458d928 esi=0458da00 edi=0458d980
002e:trace:seh:raise_exception  ebp=0458d958 esp=0458d8f4 cs=0023 ds=002b
es=002b fs=0063 gs=006b flags=00000283 
...
--- snip ---

Pseudo code of app:

--- snip ---
int cchVersionBuf = 0;
int cchLangBuf = 0;
int ret = MsiGetFileVersion( path, szVersionBuf, &cchVersionBuf, NULL,
&cchLangBuf);
if( ret == 0xea) {
    reserve( szVersionBuf, ++cchVersionBuf);
    ret = MsiGetFileVersion( path, szVersionBuf, &cchVersionBuf, NULL,
&cchLangBuf);
}
--- snip ---

MSDN:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa370122%28v=vs.85%29.aspx

--- quote ---
...
The MsiGetFileVersion returns the version string and language string in the
format that the installer expects to find them in the database. If you want
only version information, set lpLangBuf and pcchLangBuf to 0 (zero).
...
lpVersionBuf [out]

    Returns the file version.

    Set to 0 for language information only.
pcchVersionBuf [in, out]

    In and out buffer count as the number of TCHAR.

    Set to 0 (zero) for language information only. On input, this is the full
size of the buffer, including a space for a terminating null character. If the
buffer passed in is too small, the count returned does not include the
terminating null character.
lpLangBuf [out]

    Returns the file language.

    Set to 0 (zero) for version information only.
pcchLangBuf [in, out]

    In and out buffer count as the number of TCHAR.

    Set to 0 (zero) for version information only. On input, this is the full
size of the buffer, including a space for a terminating null character. If the
buffer passed in is too small, the count returned does not include the
terminating null character.
--- quote ---

Source:
http://source.winehq.org/git/wine.git/blob/5891ce25e5b45e69611c2848b87f9bf7a9c416bf:/dlls/msi/msi.c#l3155

---snip ---
3155 static UINT get_file_version( const WCHAR *path, WCHAR *verbuf, DWORD
*verlen,
3156                               WCHAR *langbuf, DWORD *langlen )
3157 {
...
3180     if (verlen)
3181     {
3182         if (VerQueryValueW( version, szVersionResource, (LPVOID *)&ffi,
&len ) && len > 0)
3183         {
3184             sprintfW( tmp, szVersionFormat,
3185                       HIWORD(ffi->dwFileVersionMS),
LOWORD(ffi->dwFileVersionMS),
3186                       HIWORD(ffi->dwFileVersionLS),
LOWORD(ffi->dwFileVersionLS) );
3187             if (verbuf) lstrcpynW( verbuf, tmp, *verlen );
3188             len = strlenW( tmp );
3189             if (len >= *verlen) ret = ERROR_MORE_DATA;
3190             *verlen = len;
3191         }
3192         else
3193         {
3194             if (verbuf) *verbuf = 0;
3195             *verlen = 0;
3196         }
3197     }
3198     if (langlen)
3199     {
3200         if (VerQueryValueW( version, szLangResource, (LPVOID *)&lang, &len
) && len > 0)
3201         {
3202             sprintfW( tmp, szLangFormat, *lang );
3203             if (langbuf) lstrcpynW( langbuf, tmp, *langlen );
3204             len = strlenW( tmp );
3205             if (len >= *langlen) ret = ERROR_MORE_DATA;
3206             *langlen = len;
3207         }
3208         else
3209         {
3210             if (langbuf) *langbuf = 0;
3211             *langlen = 0;
3212         }
3213     }
3214     msi_free( version );
3215     return ret;
3216 }
---snip ---

It seems the app wants only version information but additionally passes
"langlen" by reference (.NET code).
Both, "verlen" and "langlen" ref values get set by MsiGetFileVersion() during
first call.
"verlen" is properly increased by app (NULL terminator) but "langlen" ref value
is ignored by app -> passed again unmodified at second call.
Wine returns ERROR_MORE_DATA because it thinks the app also wants language
information, passing insufficient langlen, leading to app failure.

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