You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Caroline Maynard (JIRA)" <tu...@ws.apache.org> on 2007/04/05 22:46:32 UTC

[jira] Created: (TUSCANY-1203) Yet another AccessViolation in DataObjectImpl::~DataObjectImpl

Yet another AccessViolation in DataObjectImpl::~DataObjectImpl
--------------------------------------------------------------

                 Key: TUSCANY-1203
                 URL: https://issues.apache.org/jira/browse/TUSCANY-1203
             Project: Tuscany
          Issue Type: Bug
          Components: C++ SDO
    Affects Versions: Cpp-current
         Environment: PHP 
            Reporter: Caroline Maynard


This one occurs when deleting a DataObject which has several open properties. The logic in the destructor is: 

  while (i != PropertyValues.end()) 
        {
            unsigned int pindx = (*i).first;
            DataObjectImplPtr dol = (*i).second;

            unset(pindx);
            i = PropertyValues.begin();
            if (i != PropertyValues.end() && (*i).first == pindx )
            {
                // unset has not removed the item from the list - do it 
                // here instead
                PropertyValues.erase(i);
                i = PropertyValues.begin();
            }
        }

However what happens in the unset() method is that if the property is open, undefineProperty() is called. This removes the open property and "shuffles up" the rest, so that a different property is assigned the property index pindx. Which means that even though the unset has removed the item from the list, the test (*).first==pindx  passes, which results in the next property being removed from the list even though it has not yet been unset. 

-- 
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


[jira] Updated: (TUSCANY-1203) Yet another AccessViolation in DataObjectImpl::~DataObjectImpl

Posted by "Caroline Maynard (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Caroline Maynard updated TUSCANY-1203:
--------------------------------------

    Patch Info: [Patch Available]

I'vve added to 1147 a combined patch for 1147, 1202 and 1203, which should be simpler to apply.

> Yet another AccessViolation in DataObjectImpl::~DataObjectImpl
> --------------------------------------------------------------
>
>                 Key: TUSCANY-1203
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1203
>             Project: Tuscany
>          Issue Type: Bug
>          Components: C++ SDO
>    Affects Versions: Cpp-current
>         Environment: PHP 
>            Reporter: Caroline Maynard
>         Attachments: Tuscany-1203.patch
>
>
> This one occurs when deleting a DataObject which has several open properties. The logic in the destructor is: 
>   while (i != PropertyValues.end()) 
>         {
>             unsigned int pindx = (*i).first;
>             DataObjectImplPtr dol = (*i).second;
>             unset(pindx);
>             i = PropertyValues.begin();
>             if (i != PropertyValues.end() && (*i).first == pindx )
>             {
>                 // unset has not removed the item from the list - do it 
>                 // here instead
>                 PropertyValues.erase(i);
>                 i = PropertyValues.begin();
>             }
>         }
> However what happens in the unset() method is that if the property is open, undefineProperty() is called. This removes the open property and "shuffles up" the rest, so that a different property is assigned the property index pindx. Which means that even though the unset has removed the item from the list, the test (*).first==pindx  passes, which results in the next property being removed from the list even though it has not yet been unset. 

-- 
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


[jira] Closed: (TUSCANY-1203) Yet another AccessViolation in DataObjectImpl::~DataObjectImpl

Posted by "Caroline Maynard (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Caroline Maynard closed TUSCANY-1203.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: Cpp-current

Combined patch committed

> Yet another AccessViolation in DataObjectImpl::~DataObjectImpl
> --------------------------------------------------------------
>
>                 Key: TUSCANY-1203
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1203
>             Project: Tuscany
>          Issue Type: Bug
>          Components: C++ SDO
>    Affects Versions: Cpp-current
>         Environment: PHP 
>            Reporter: Caroline Maynard
>             Fix For: Cpp-current
>
>         Attachments: Tuscany-1203.patch
>
>
> This one occurs when deleting a DataObject which has several open properties. The logic in the destructor is: 
>   while (i != PropertyValues.end()) 
>         {
>             unsigned int pindx = (*i).first;
>             DataObjectImplPtr dol = (*i).second;
>             unset(pindx);
>             i = PropertyValues.begin();
>             if (i != PropertyValues.end() && (*i).first == pindx )
>             {
>                 // unset has not removed the item from the list - do it 
>                 // here instead
>                 PropertyValues.erase(i);
>                 i = PropertyValues.begin();
>             }
>         }
> However what happens in the unset() method is that if the property is open, undefineProperty() is called. This removes the open property and "shuffles up" the rest, so that a different property is assigned the property index pindx. Which means that even though the unset has removed the item from the list, the test (*).first==pindx  passes, which results in the next property being removed from the list even though it has not yet been unset. 

-- 
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


[jira] Updated: (TUSCANY-1203) Yet another AccessViolation in DataObjectImpl::~DataObjectImpl

Posted by "Caroline Maynard (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Caroline Maynard updated TUSCANY-1203:
--------------------------------------

    Attachment: Tuscany-1203.patch

My solution is to check the property value as well as the property index. 

It might be better to work out why unset() sometimes doesn't remove the property. This way works, though.

> Yet another AccessViolation in DataObjectImpl::~DataObjectImpl
> --------------------------------------------------------------
>
>                 Key: TUSCANY-1203
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1203
>             Project: Tuscany
>          Issue Type: Bug
>          Components: C++ SDO
>    Affects Versions: Cpp-current
>         Environment: PHP 
>            Reporter: Caroline Maynard
>         Attachments: Tuscany-1203.patch
>
>
> This one occurs when deleting a DataObject which has several open properties. The logic in the destructor is: 
>   while (i != PropertyValues.end()) 
>         {
>             unsigned int pindx = (*i).first;
>             DataObjectImplPtr dol = (*i).second;
>             unset(pindx);
>             i = PropertyValues.begin();
>             if (i != PropertyValues.end() && (*i).first == pindx )
>             {
>                 // unset has not removed the item from the list - do it 
>                 // here instead
>                 PropertyValues.erase(i);
>                 i = PropertyValues.begin();
>             }
>         }
> However what happens in the unset() method is that if the property is open, undefineProperty() is called. This removes the open property and "shuffles up" the rest, so that a different property is assigned the property index pindx. Which means that even though the unset has removed the item from the list, the test (*).first==pindx  passes, which results in the next property being removed from the list even though it has not yet been unset. 

-- 
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