http://bugs.winehq.org/show_bug.cgi?id=30491
Bug #: 30491 Summary: Microsoft Office Communicator 2007 R2 Trial fails to parse rule XML from resource file (BSTR/UTF-16 passed to SAXXMLReader) Product: Wine Version: 1.5.2 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: msxml3 AssignedTo: wine-bugs@winehq.org ReportedBy: focht@gmx.net Classification: Unclassified
Hello,
with bug 30313 fixed, it now runs into bug 29392
--- snip --- fixme:actctx:parse_depend_manifests Could not find dependent assembly L"UccApi" (2.0.0.0) fixme:activeds:ADsOpenObject (L"LDAP://rootDSE",(null),1,{fd8256d0-fd15-11ce-abc4-02608c9e7553},0x32e7f0)!stub wine: Call from 0x7b839357 to unimplemented function msvcp90.dll.??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z, aborting --- snip ---
After working around (VC++ 2008 runtime), it fails while trying to parse rule XML from embedded resource file:
--- snip --- ... 0028:Call KERNEL32.MultiByteToWideChar(0000fde9,00000008,0018ddb0 "<categoryPublicationManifest\r\n xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance%5C%22%5Cr%5Cn xmlns:xsd="http://www.w3.org/2001/XMLSchema%5C%22%5Cr%5Cn xmlns="http://schemas.microsoft.com/2008/09/sip/categoryPublicationManifest%5C%22%5... minSupportedClientVersion="2.0.0.0">\r\n <publicationList>\r\n <"...,00007a01,001957f8,00007a01) ret=21fbb99c 0028:Ret KERNEL32.MultiByteToWideChar() retval=00007a01 ret=21fbb99c 0028:Call oleaut32.SysAllocStringLen(001957f8 L"<categoryPublicationManifest\r\n xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance%5C%22%5Cr%5Cn xmlns:xsd="http://www.w3.org/2001/XMLSchema%5C%22%5Cr%5Cn xmlns="http://schemas.microsoft.com/2008/09/sip/categoryPublicationManifest%5C%22%5... minSupportedClientVersion="2.0.0.0">\r\n <publicationList>\r\n <"...,00007a01) ret=21fbcb0c 0028:Call ntdll.RtlAllocateHeap(00110000,00000000,0000f408) ret=7e92b022 0028:Ret ntdll.RtlAllocateHeap() retval=001a4c80 ret=7e92b022 0028:Ret oleaut32.SysAllocStringLen() retval=001a4c84 ret=21fbcb0c ... 0028:trace:msxml:internal_parse (0x15a098)->({VT_BSTR: L"<categoryPublicationManifest\r\n xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance%5C%22%5Cr%5Cn xmlns:xsd="http://www.w3.org/2001/XMLSchema%5C%22%5Cr%5Cn xmlns="http://schemas.microsoft.com/200) 0028:Call ntdll.RtlFreeHeap(00110000,00000000,00000000) ret=7d77632a 0028:Ret ntdll.RtlFreeHeap() retval=00000001 ret=7d77632a 0028:Call oleaut32.SysStringByteLen(001a4c84) ret=7d77b2f1 0028:Ret oleaut32.SysStringByteLen() retval=0000f402 ret=7d77b2f1 0028:Call ntdll.RtlAllocateHeap(00110000,00000000,0000004c) ret=7d7759c5 0028:Ret ntdll.RtlAllocateHeap() retval=001b41b8 ret=7d7759c5 0028:trace:msxml:saxxmlreader_AddRef 0x15a098 0028:Call oleaut32.SysAllocString(7d7a3300 L"http://www.w3.org/2000/xmlns/") ret=7d77a640 0028:Call ntdll.RtlAllocateHeap(00110000,00000000,00000040) ret=7e92b022 0028:Ret ntdll.RtlAllocateHeap() retval=001b4210 ret=7e92b022 0028:Ret oleaut32.SysAllocString() retval=001b4214 ret=7d77a640 0028:Call ntdll.RtlAllocateHeap(00110000,00000000,00000080) ret=7d7759c5 0028:Ret ntdll.RtlAllocateHeap() retval=001b4258 ret=7d7759c5 0028:trace:msxml:SAXLocator_create returning 0x1b41b8 0028:trace:msxml:internal_parseBuffer detected encoding: (null) 0028:trace:msxml:isaxlocator_AddRef (0x1b41b8)->(2) 0028:Call KERNEL32.MultiByteToWideChar(0000fdf2,00000000,0032dfd0 "Char 0x0 out of allowed range\n",ffffffff,00000000,00000000) ret=7d7792f4 0028:Ret KERNEL32.MultiByteToWideChar() retval=0000001f ret=7d7792f4 0028:Call ntdll.RtlAllocateHeap(00110000,00000000,0000003e) ret=7d7759c5 0028:Ret ntdll.RtlAllocateHeap() retval=001b42e0 ret=7d7759c5 0028:Call KERNEL32.MultiByteToWideChar(0000fdf2,00000000,0032dfd0 "Char 0x0 out of allowed range\n",ffffffff,001b42e0,0000001f) ret=7d779348 0028:Ret KERNEL32.MultiByteToWideChar() retval=0000001f ret=7d779348 0028:trace:msxml:libxmlFatalError fatal error for 0x1b41b8: L"Char 0x0 out of allowed range\n" 0028:fixme:msxml:libxmlFatalError Error handling is not compatible. ... --- snip ---
The data is passed as BSTR/UTF-16.
Debugging session:
--- snip --- Wine-dbg>bt Backtrace: =>0 0x7d723880 internal_parseBuffer+0x101(This=0x139278, buffer="<", size=0xf402, vbInterface=0) [/home/focht/projects/wine/wine-git/dlls/msxml3/saxreader.c:2162] in msxml3 (0x0033e7c4) 1 0x7d724313 internal_parse+0xfa(This=0x139278, varInput={n1={n2={vt=0x8, wReserved1=0x11, wReserved2=0xd338, wReserved3=0x15, n3={cVal=-116, uiVal=0x398c, ulVal=0x18398c, intVal=0x18398c, uintVal=0x18398c, bVal=-116, iVal=0x398c, lVal=0x18398c, ... bstrVal="<categoryPublicationManifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/2008/09/sip/categoryPublicationManifest" minSupportedClientVersion="2.0.0.0"> <publicationList> <publicationRule ruleType="transformation" categoryName="state" containerId="2" preferredSelfConsumption="true" /> <publicationRule ruleType="transformation" categoryName="state" containerId="3"> <categoryData> <![CDATA[ ... 2 0x7d7261c2 isaxxmlreader_parse+0x5a(iface=0x13928c, varInput={n1={n2={vt=0x8, wReserved1=0x11, wReserved2=0xd338, wReserved3=0x15, n3={cVal=-116, uiVal=0x398c, ulVal=0x18398c, intVal=0x18398c, uintVal=0x18398c, bVal=-116, iVal=0x398c, lVal=0x18398c, ... bstrVal="<categoryPublicationManifest ... gn=0}, signscale=0x11}, Hi32=0x15d338, ={={Lo32=0x18398c, Mid32=0x7bcbf544}, Lo64=0x7bcbf5440018398c}}}}) [/home/focht/projects/wine/wine-git/dlls/msxml3/saxreader.c:3194] in msxml3 (0x0033e894) 3 0x21fbe64e in ocapi (+0x33e64d) (0x0033f978) 4 0x21fbf5d6 in ocapi (+0x33f5d5) (0x0033f9a0) 5 0x221ab486 in ocapi (+0x52b485) (0x0033faac) 6 0x221abdce in ocapi (+0x52bdcd) (0x0033faf0) 7 0x221a7992 in ocapi (+0x527991) (0x0033fb44) 8 0x21ecb949 in ocapi (+0x24b948) (0x0033fb94) 9 0x21ecd5f2 in ocapi (+0x24d5f1) (0x0033fbe8) 10 0x21ecddba in ocapi (+0x24ddb9) (0x0033fc20) 11 0x21ea490d in ocapi (+0x22490c) (0x0033fc8c) 12 0x004213a2 in communicator (+0x213a1) (0x0033fcbc) --- snip ---
Code: http://source.winehq.org/git/wine.git/blob/4fb5872bd233c924cadbf3a4011dcd622...
--- snip --- 2139 static HRESULT internal_parseBuffer(saxreader *This, const char *buffer, int size, BOOL vbInterface) 2140 { 2141 xmlCharEncoding encoding = XML_CHAR_ENCODING_NONE; 2142 xmlChar *enc_name = NULL; 2143 saxlocator *locator; 2144 HRESULT hr; 2145 2146 hr = SAXLocator_create(This, &locator, vbInterface); 2147 if(FAILED(hr)) 2148 return hr; 2149 2150 if (size >= 4) 2151 { 2152 const unsigned char *buff = (unsigned char*)buffer; 2153 2154 encoding = xmlDetectCharEncoding((xmlChar*)buffer, 4); 2155 enc_name = (xmlChar*)xmlGetCharEncodingName(encoding); 2156 TRACE("detected encoding: %s\n", enc_name); 2157 /* skip BOM, parser won't switch encodings and so won't skip it on its own */ 2158 if ((encoding == XML_CHAR_ENCODING_UTF8) && 2159 buff[0] == 0xEF && buff[1] == 0xBB && buff[2] == 0xBF) 2160 { 2161 buffer += 3; 2162 size -= 3; 2163 } 2164 } 2165 2166 locator->pParserCtxt = xmlCreateMemoryParserCtxt(buffer, size); 2167 if(!locator->pParserCtxt) 2168 { 2169 ISAXLocator_Release(&locator->ISAXLocator_iface); 2170 return E_FAIL; 2171 } 2172 2173 if (encoding == XML_CHAR_ENCODING_UTF8) 2174 locator->pParserCtxt->encoding = xmlStrdup(enc_name); 2175 2176 xmlFree(locator->pParserCtxt->sax); 2177 locator->pParserCtxt->sax = &locator->saxreader->sax; 2178 locator->pParserCtxt->userData = locator; 2179 2180 This->isParsing = TRUE; 2181 if(xmlParseDocument(locator->pParserCtxt)==-1 && locator->ret==S_OK) 2182 hr = E_FAIL; 2183 else 2184 hr = locator->ret; 2185 This->isParsing = FALSE; 2186 2187 if(locator->pParserCtxt) 2188 { 2189 locator->pParserCtxt->sax = NULL; 2190 xmlFreeParserCtxt(locator->pParserCtxt); 2191 locator->pParserCtxt = NULL; 2192 } 2193 2194 ISAXLocator_Release(&locator->ISAXLocator_iface); 2195 return hr; 2196 } --- snip ---
Regards
http://bugs.winehq.org/show_bug.cgi?id=30491
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |http://www.microsoft.com/do | |wnload/en/details.aspx?disp | |laylang=en&id=8468 Depends on| |29392
--- Comment #1 from Anastasius Focht focht@gmx.net 2012-04-20 16:22:23 CDT --- Hello,
filling fields ...
'winetricks msxml6' obviously works around.
$ du -sh CommunicatorEval.msi 15M CommunicatorEval.msi
$ sha1sum CommunicatorEval.msi b2a1cc95362b93aef6dfbf9987cc5c4ca6c8038d CommunicatorEval.msi
$ wine --version wine-1.5.2-191-gd080774
Regards
http://bugs.winehq.org/show_bug.cgi?id=30491
--- Comment #2 from Nikolay Sivov bunglehead@gmail.com 2012-04-21 02:40:49 CDT --- Created attachment 39876 --> http://bugs.winehq.org/attachment.cgi?id=39876 patch
This should help. Actually I'm surprised it's a first report of this problem, cause every non-UTF8 with no prolog will fail the same way.
http://bugs.winehq.org/show_bug.cgi?id=30491
--- Comment #3 from Anastasius Focht focht@gmx.net 2012-04-21 08:59:28 CDT --- Hello Nikolay,
--- quote --- This should help. Actually I'm surprised it's a first report of this problem, cause every non-UTF8 with no prolog will fail the same way. --- quote ---
yes, UTF-16 data is now detected and it runs into next insufficiency which should be another bug ...
--- snip --- $ WINEDEBUG=+tid,+msxml wine ./communicator.exe ... 0009:trace:msxml:DllGetClassObject {88d96a11-f192-11d4-a65f-0040963251e5} {00000001-0000-0000-c000-000000000046} 0x32e838 0009:trace:msxml:ClassFactory_CreateInstance (nil) {c90352f5-643c-4fbc-bb23-e996eb2d51fd} 0x32e8a4 0009:trace:msxml:MXNamespaceManager_create ((nil), 0x32e7d8) 0009:trace:msxml:MXNamespaceManager_create returning iface 0x1949b8 0009:trace:msxml:vbnamespacemanager_QueryInterface (0x1949a8)->({c90352f5-643c-4fbc-bb23-e996eb2d51fd} 0x32e8a4) 0009:trace:msxml:vbnamespacemanager_AddRef (0x1949a8)->(2) 0009:trace:msxml:vbnamespacemanager_Release (0x1949a8)->(1) 0009:trace:msxml:vbnamespacemanager_put_allowOverride (0x1949a8)->(1) 0009:trace:msxml:vbnamespacemanager_AddRef (0x1949a8)->(2) 0009:trace:msxml:vbnamespacemanager_Release (0x1949a8)->(1) 0009:trace:msxml:internal_parse (0x13ae88)->({VT_BSTR: L"<categoryPublicationManifest\r\n xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance%5C%22%5Cr%5Cn xmlns:xsd="http://www.w3.org/2001/XMLSchema%5C%22%5Cr%5Cn xmlns="http://schemas.microsoft.com/200) 0009:trace:msxml:saxxmlreader_AddRef 0x13ae88 0009:trace:msxml:SAXLocator_create returning 0x194ad0 0009:trace:msxml:internal_parseBuffer detected encoding: (null) 0009:trace:msxml:internal_parseBuffer switching to UTF-16 0009:trace:msxml:isaxlocator_AddRef (0x194ad0)->(2) 0009:fixme:msxml:vbnamespacemanager_pushContext (0x1949a8): stub 0009:fixme:msxml:format_error_message_from_id MSXML errors not yet supported. 0009:trace:msxml:isaxlocator_Release (0x194ad0)->(1) 0009:trace:msxml:vbnamespacemanager_Release (0x1949a8)->(0) 0009:trace:msxml:internal_putContentHandler (0x13ae88)->((nil)) 0009:trace:msxml:internal_putProperty (0x13ae88)->(L"http://xml.org/sax/properties/lexical-handler" {VT_UNKNOWN: (nil)}) 0009:trace:msxml:internal_putErrorHandler (0x13ae88)->((nil)) 0009:trace:msxml:saxxmlreader_Release 0x13ae88 0009:trace:msxml:isaxlocator_Release (0x194ad0)->(0) 0009:trace:msxml:saxxmlreader_Release 0x13ae88 --- snip ---
Regards
http://bugs.winehq.org/show_bug.cgi?id=30491
--- Comment #4 from Nikolay Sivov bunglehead@gmail.com 2012-04-22 14:15:39 CDT --- Created attachment 39890 --> http://bugs.winehq.org/attachment.cgi?id=39890 patch2
This one is for :
--- 0009:fixme:msxml:vbnamespacemanager_pushContext (0x1949a8): stub ---
http://bugs.winehq.org/show_bug.cgi?id=30491
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |30505
http://bugs.winehq.org/show_bug.cgi?id=30491
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |221f9efe27fe786d4c2ee9c8d76 | |ea9d8a75fc279 Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #5 from Nikolay Sivov bunglehead@gmail.com 2012-04-23 13:56:17 CDT --- Should be fixed with 221f9efe27fe786d4c2ee9c8d76ea9d8a75fc279.
http://bugs.winehq.org/show_bug.cgi?id=30491
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org 2012-04-27 12:59:35 CDT --- Closing bugs fixed in 1.5.3.
http://bugs.winehq.org/show_bug.cgi?id=30491
Bug 30491 depends on bug 29392, which changed state.
Bug 29392 Summary: Multiple apps need msvcp90.dll.??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z (Juggernaut MMORPG, MS Office Communicator 2007 R2 Trial, Cmake, Elsterformular) http://bugs.winehq.org/show_bug.cgi?id=29392
What |Old Value |New Value ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
https://bugs.winehq.org/show_bug.cgi?id=30491
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://www.microsoft.com/do |https://web.archive.org/web |wnload/en/details.aspx?disp |/20130312155123/http://down |laylang=en&id=8468 |load.microsoft.com/download | |/E/2/B/E2B88A20-CC84-4F29-8 | |C15-751ADFB8F0BF/Communicat | |orEval.msi
--- Comment #7 from Anastasius Focht focht@gmx.net --- Hello folks,
adding stable download link via Internet Archive for documentation.
https://web.archive.org/web/20130312155123/http://download.microsoft.com/dow...
https://www.virustotal.com/gui/file/8b5a177b9367101e262f0e31bc3685e07a898b84...
$ sha1sum CommunicatorEval.msi b2a1cc95362b93aef6dfbf9987cc5c4ca6c8038d CommunicatorEval.msi
$ du -sh CommunicatorEval.msi 15M CommunicatorEval.msi
Regards