You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Geoff Winn (JIRA)" <tu...@ws.apache.org> on 2006/07/10 19:53:31 UTC
[jira] Updated: (TUSCANY-529) Access violation in
XMLHelperImpl::save
[ http://issues.apache.org/jira/browse/TUSCANY-529?page=all ]
Geoff Winn updated TUSCANY-529:
-------------------------------
Attachment: TUSCANY-529.patch
Built and tested on both Windows XP and Linux
> Access violation in XMLHelperImpl::save
> ---------------------------------------
>
> Key: TUSCANY-529
> URL: http://issues.apache.org/jira/browse/TUSCANY-529
> Project: Tuscany
> Type: Bug
> Components: C++ SDO
> Versions: Cpp-M1
> Environment: WinXP
> Reporter: Caroline Maynard
> Attachments: TUSCANY-529.patch
>
> Occurs in the case where the root element URI and name are both null.
> MSVCRTD! 00379060()
> std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign(const char * 0x00000000) line 138 + 16 bytes
> std::basic_string<char,std::char_traits<char>,std::allocator<char> >::basic_string<char,std::char_traits<char>,std::allocator<char> >(const char * 0x00000000, const std::allocator<char> & {...}) line 51 + 39 bytes
> commonj::sdo::SDOString::SDOString(const char * 0x00000000) line 53 + 51 bytes
> commonj::sdo::SDOXMLWriter::write(commonj::sdo::RefCountingPointer<commonj::sdo::XMLDocument> {...}, int 0xffffffff) line 124 + 52 bytes
> commonj::sdo::XMLHelperImpl::save(commonj::sdo::RefCountingPointer<commonj::sdo::XMLDocument> {...}, int 0xffffffff) line 256
> commonj::sdo::XMLHelperImpl::save(commonj::sdo::RefCountingPointer<commonj::sdo::DataObject> {...}, const char * 0x00000000, const char * 0x00000000, int 0xffffffff) line 268 + 68 bytes
> Here's a patch which worked for me. YMMV:
> --- SDOXMLWriter.cpp 2006-07-06 19:45:10.000000000 +0100
> +++ /cygdrive/c/phpbuild/pecl/sdo/commonj/sdo/SDOXMLWriter.cpp 2006-07-10 11:56:57.664945600 +0100
> @@ -121,15 +121,15 @@
> {
> elementURI = root->getType().getURI();
> }
> - SDOString elementName = doc->getRootElementName();
> - if (elementName.empty())
> + SDOXMLString elementName = doc->getRootElementName();
> + if (elementName.isNull() || elementName.equals(""))
> {
> elementName = root->getType().getName();
> elementName = elementName.toLower(0,1);
> writeXSIType = true;
> }
>
> - writeDO(root, elementURI, elementName.c_str(), true, true);
> + writeDO(root, elementURI, elementName, true, true);
> }
> rc = xmlTextWriterEndDocument(writer);
> if (rc < 0) {
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org