You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Pete Robbins (JIRA)" <tu...@ws.apache.org> on 2007/04/26 11:10:15 UTC

[jira] Resolved: (TUSCANY-1225) Access violation in CopyHelper

     [ https://issues.apache.org/jira/browse/TUSCANY-1225?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pete Robbins resolved TUSCANY-1225.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: Cpp-current

> 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
>         Assigned To: Pete Robbins
>             Fix For: Cpp-current
>
>
> 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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org