http://bugs.winehq.org/show_bug.cgi?id=31618
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net Summary|Unable to run an old VB5 |Waterboy 1.0 (VB5 game) |app |fails on startup, claiming | |"Run-time error '13': Type | |mismatch" | |(VarParseNumFromStr with | |invalid number string)
--- Comment #4 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming.
Relevant part of trace log:
--- snip --- $ WINEDEBUG=+tid,+seh,+relay,+ole,+variant,+snoop wine ./WaterBoy.exe >>log.txt 2>&1 ... 0024:CALL MSVBVM50.__vbaVarInt(<unknown, check return>) ret=0043d9d9 0024:Call oleaut32.VariantChangeTypeEx(0033f8c4,0033f8d4,00000400,00000000,00000005) ret=0f105a71 0024:trace:variant:VariantChangeTypeEx (0x33f8c4->(VT_EMPTY),0x33f8d4->(VT_BSTR),0x00000400,0x0000,VT_R8) 0024:trace:variant:VariantClear (0x33f428->(VT_EMPTY)) 0024:trace:variant:VariantClear (0x33f418->(VT_EMPTY)) 0024:trace:variant:VariantCopyInd (0x33f418->(VT_EMPTY),0x33f8d4->(VT_BSTR)) 0024:trace:variant:VariantCopy (0x33f418->(VT_EMPTY),0x33f8d4->(VT_BSTR)) 0024:trace:variant:VariantClear (0x33f418->(VT_EMPTY)) 0024:Call ntdll.RtlAllocateHeap(00110000,00000000,00000010) ret=7e7a00ef 0024:Ret ntdll.RtlAllocateHeap() retval=00b70f38 ret=7e7a00ef 0024:trace:variant:VARIANT_Coerce (0x33f428->(VT_EMPTY),0x00000400,0x0000,0x33f418->(VT_BSTR),VT_R8) 0024:trace:variant:VarParseNumFromStr (L" 10 6",1024,0x00000000,0x33f2c0,0x33eec0) 0024:Call KERNEL32.GetLocaleInfoW(00000400,00000051,0033e9a4,00000002) ret=7e7f1d85 0024:Ret KERNEL32.GetLocaleInfoW() retval=00000002 ret=7e7f1d85 0024:trace:variant:VARIANT_GetLocalisedNumberChars lcid 0x400, cNegativeSymbol=45 '-' 0024:Call KERNEL32.GetLocaleInfoW(00000400,00000050,0033e9a4,00000002) ret=7e7f1e8c 0024:Ret KERNEL32.GetLocaleInfoW() retval=00000001 ret=7e7f1e8c 0024:trace:variant:VARIANT_GetLocalisedNumberChars lcid 0x400, cPositiveSymbol=43 '+' 0024:Call KERNEL32.GetLocaleInfoW(00000400,0000000e,0033e9a4,00000002) ret=7e7f1f96 0024:Ret KERNEL32.GetLocaleInfoW() retval=00000002 ret=7e7f1f96 0024:trace:variant:VARIANT_GetLocalisedNumberChars lcid 0x400, cDecimalPoint=46 '.' 0024:Call KERNEL32.GetLocaleInfoW(00000400,0000000f,0033e9a4,00000002) ret=7e7f20a0 0024:Ret KERNEL32.GetLocaleInfoW() retval=00000002 ret=7e7f20a0 0024:trace:variant:VARIANT_GetLocalisedNumberChars lcid 0x400, cDigitSeparator=44 ',' 0024:Call KERNEL32.GetLocaleInfoW(00000400,00000016,0033e9a4,00000002) ret=7e7f21aa 0024:Ret KERNEL32.GetLocaleInfoW() retval=00000002 ret=7e7f21aa 0024:trace:variant:VARIANT_GetLocalisedNumberChars lcid 0x400, cCurrencyDecimalPoint=46 '.' 0024:Call KERNEL32.GetLocaleInfoW(00000400,00000017,0033e9a4,00000002) ret=7e7f22b4 0024:Ret KERNEL32.GetLocaleInfoW() retval=00000002 ret=7e7f22b4 0024:trace:variant:VARIANT_GetLocalisedNumberChars lcid 0x400, cCurrencyDigitSeparator=44 ',' 0024:Call KERNEL32.GetLocaleInfoW(00000400,00000014,0033e9a4,00000004) ret=7e7f23be 0024:Ret KERNEL32.GetLocaleInfoW() retval=00000002 ret=7e7f23be 0024:trace:variant:VARIANT_GetLocalisedNumberChars lcid 0x400, cCurrencyLocal =36,0 '$',' ' 0024:trace:variant:VariantClear (0x33f428->(VT_EMPTY)) 0024:trace:variant:VariantClear (0x33f418->(VT_BSTR)) 0024:trace:variant:VariantChangeTypeEx returning 0x80020005, 0x33f8c4->(VT_EMPTY) 0024:Ret oleaut32.VariantChangeTypeEx() retval=80020005 ret=0f105a71 0024:Call oleaut32.SysFreeString(00000000) ret=0f047134 0024:Ret oleaut32.SysFreeString() retval=0033f470 ret=0f047134 0024:Call oleaut32.SysFreeString(00000000) ret=0f047139 0024:Ret oleaut32.SysFreeString() retval=0033f470 ret=0f047139 0024:Call oleaut32.SysFreeString(00000000) ret=0f04713e 0024:Ret oleaut32.SysFreeString() retval=0033f470 ret=0f04713e 0024:Call KERNEL32.RaiseException(c000008f,00000001,00000002,0033f4a4) ret=0f0476f9 0024:trace:seh:raise_exception code=c000008f flags=1 addr=0x7b83a89f ip=7b83a89f tid=0024 0024:trace:seh:raise_exception info[0]=deadcafe 0024:trace:seh:raise_exception info[1]=deadcafe 0024:trace:seh:raise_exception eax=7b826921 ebx=7b8ba000 ecx=deadcafe edx=0033f40c esi=0033f4a4 edi=0033f470 0024:trace:seh:raise_exception ebp=0033f448 esp=0033f3e4 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00000287 0024:trace:seh:call_stack_handlers calling handler at 0x4017f6 code=c000008f flags=1 0024:CALL MSVBVM50.__vbaExceptHandler(<unknown, check return>) ret=7bc864f1 ... 0024:Call winex11.drv.SetWindowText(00010184,00b62e08 L"Run-time error '13':\n\nType mismatch") ret=7ec9f739 --- snip ---
Debugger session:
--- snip --- Wine-dbg>bt Backtrace: =>0 0x7e80b501 VarParseNumFromStr(lpszStr=" 10 6", lcid=0x400, dwFlags=0, pNumprs=0x33f310, rgbDig="Φê'│ (∩3") [/home/focht/projects/wine/wine-git/dlls/oleaut32/variant.c:1622] in oleaut32 (0x0033f348) 1 0x7e81b81b VarR8FromStr+0x30(strIn=" 10 6", lcid=0x400, dwFlags=0, pDblOut=0x33f480) [/home/focht/projects/wine/wine-git/dlls/oleaut32/vartype.c:3154] in oleaut32 (0x0033f378) 2 0x7e806e69 VARIANT_Coerce+0x1e1c(pd=0x33f478, lcid=0x400, wFlags=0, ps=0x33f468, vt=0x5) [/home/focht/projects/wine/wine-git/dlls/oleaut32/variant.c:365] in oleaut32 (0x0033f408) 3 0x7e8093f4 VariantChangeTypeEx+0x347(pvargDest=<couldn't compute location>, pvargSrc=<couldn't compute location>, lcid=<couldn't compute location>, wFlags=0, vt=0x5) [/home/focht/projects/wine/wine-git/dlls/oleaut32/variant.c:1047] in oleaut32 (0x0033f4b8) 4 0x0f105a71 in msvbvm50 (+0x105a70) (0x0033f4fc) 5 0x0043d9d9 in waterboy (+0x3d9d8) (0x0033f968) 6 0x0f038913 in msvbvm50 (+0x38912) (0x0033f974) 7 0x0042947f in waterboy (+0x2947e) (0x0033f984) 8 0x0f0388ed in msvbvm50 (+0x388ec) (0x0033f9a0) 9 0x0f038811 in msvbvm50 (+0x38810) (0x0033f9d8)
...
1965 if (pNumprs->dwInFlags & NUMPRS_USE_ALL && *lpszStr != '\0') Wine-dbg> 1966 return DISP_E_TYPEMISMATCH; /* Not all chars were consumed */ Wine-dbg> --- snip ---
It all boils down to that strange 'VarParseNumFromStr(" 10 6")' call. I debugged that garbage and this string gets really passed through VB runtime.
MSDN: http://msdn.microsoft.com/en-us/library/aa913152.aspx
I think Wine does the right thing in this case by returning DISP_E_TYPEMISMATCH which ultimately leads to that runtime error.
I'm curious ... did anyone really verify this game works on modern Windows (no Win9X garbage)?
$ sha1sum WaterBoyFR.zip b6357dc9fcbd735c3e0cc5d1a7100d047db232a6 WaterBoyFR.zip
$ du -sh WaterBoyFR.zip 1.1M WaterBoyFR.zip
$ wine --version wine-1.7.9-250-g201ae48
Regards