[ https://issues.apache.org/jira/browse/TUSCANY-1225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491222 ]
Caroline Maynard commented on TUSCANY-1225: ------------------------------------------- Of course those are two parts of the same schema - there is no input xml document > Access violation in CopyHelper > ------------------------------ > > Key: TUSCANY-1225 > URL: https://issues.apache.org/jira/browse/TUSCANY-1225 > Project: Tuscany > Issue Type: Bug > Components: C++ SDO > Affects Versions: Cpp-current > Environment: Win32, PHP > Reporter: Caroline Maynard > > Cloning a DataObject withe a property that has been explicitly set to null > results in an AccessViolation: > commonj::sdo::CopyHelper::internalCopy(commonj::sdo::RefCountingPointer<commonj::sdo::DataObject> > {...}, unsigned char 0x01) line 277 + 3 bytes > commonj::sdo::CopyHelper::internalCopy(commonj::sdo::RefCountingPointer<commonj::sdo::DataObject> > {...}, unsigned char 0x01) line 403 + 41 bytes > commonj::sdo::CopyHelper::copy(commonj::sdo::RefCountingPointer<commonj::sdo::DataObject> > {...}) line 267 + 29 bytes > sdo_do_clone_obj(_zval_struct * 0x0120c050, void * * * 0x003d2a20) line 208 + > 33 bytes > On the second entry to internalCopy(), the dataObject is null, which results > in the AccessViolation when trying to get the DataFactory. > Example: > schema: > <?xml version="1.0" encoding="UTF-8"?> > <schema xmlns="http://www.w3.org/2001/XMLSchema" > xmlns:ord="orderNS" xmlns:cust="customerNS" targetNamespace="orderNS"> > <include schemaLocation="./Customer.xsd"/> > <element name="order" type="ord:OrderType"> > <complexType name="OrderType"> > <sequence> > <element ref="cust:customer"/> > </sequence> > </complexType> > </element> > </schema> > document: > $customer_xsd = <<<EOF2 > <?xml version="1.0" encoding="UTF-8"?> > <schema xmlns="http://www.w3.org/2001/XMLSchema" > xmlns:cust="customerNS" targetNamespace="customerNS"> > <element name="customer" type="cust:CustomerType"> > <complexType name="CustomerType"> > <sequence> > </sequence> > </complexType> > </element> > </schema> > logic: > $xmldas = SDO_DAS_XML::create('Order.xsd'); > $order = $xmldas->createDataObject('orderNS','OrderType'); > $order->customer = null; > $o = clone $order; > If customer is unset, there is no problem. Or if it is set to a real data > object there is no problem either. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]