Jean-Sebastien Delfino wrote:
[snip]

I just tried it and was able to import our VC7 solution into it. I ran into two issues: - A minor issue, I had to remove the ODBC libraries from the link configuration - A more serious issue, the SDO runtime breaks with exceptions complaining about "incompatible list iterators" in DataObjectImpl::~DataObjectImpl()

This is probably easy to fix - although I have no idea how to fix it :)

Geoff,

Here's the Exception and call stack I'm getting from sdo_test on Windows, built with VC++ Express 2005:

msvcp80d.dll!104f9961() [Frames below may be incorrect and/or missing, no symbols loaded for msvcp80d.dll] > tuscany_sdo.dll!std::list<commonj::sdo::rdo,std::allocator<commonj::sdo::rdo> >::_Const_iterator<1>::_Compat(const std::list<commonj::sdo::rdo,std::allocator<commonj::sdo::rdo> >::_Const_iterator<1> & _Right={first=3452816845 second={...} }) Line 309 + 0x17 bytes C++ tuscany_sdo.dll!std::list<commonj::sdo::rdo,std::allocator<commonj::sdo::rdo> >::_Const_iterator<1>::operator==(const std::list<commonj::sdo::rdo,std::allocator<commonj::sdo::rdo> >::_Const_iterator<1> & _Right={first=3452816845 second={...} }) Line 290 C++ tuscany_sdo.dll!commonj::sdo::DataObjectImpl::~DataObjectImpl() Line 4564 + 0x37 bytes C++ tuscany_sdo.dll!commonj::sdo::DataObjectImpl::`scalar deleting destructor'() + 0x2b bytes C++ tuscany_sdo.dll!commonj::sdo::RefCountingObject::releaseRef() Line 69 + 0x4c bytes C++ sdo_test.exe!commonj::sdo::RefCountingPointer<commonj::sdo::DataObject>::~RefCountingPointer<commonj::sdo::DataObject>() Line 133 + 0x15 bytes C++
    sdo_test.exe!sdotest::scopetest()  Line 69 + 0x19 bytes    C++
sdo_test.exe!main(int argc=1, char * * argv=0x00386018) Line 48 + 0x5 bytes C++
    sdo_test.exe!__tmainCRTStartup()  Line 586 + 0x19 bytes    C
    sdo_test.exe!mainCRTStartup()  Line 403    C

The exception is raised in list.cpp - line 309:
#if _HAS_ITERATOR_DEBUGGING
       void _Compat(const _Myt_iter& _Right) const
           {    // test for compatible iterator pair
           if (this->_Mycont == 0 || this->_Mycont != _Right._Mycont)
               {
               _DEBUG_ERROR("list iterators incompatible"); <---- There
               _SCL_SECURE_TRAITS_INVALID_ARGUMENT;
               }
           }

This is called from DataObjectImpl::~DataObjectImpl():
        PropertyValueMap::iterator i = PropertyValues.begin();
       while (i != PropertyValues.end())
       {
           unset((*i).first);
           if (i == PropertyValues.begin())  <-- There
           {
               // unset has not removed the item from the list - do it
               // here instead
               PropertyValues.erase(i);
           }
           i = PropertyValues.begin();
       }

And I am a little puzzled by the code in the above loop... Although I didn't spend much time trying to grasp the logic here, and I have not been playing with C++ iterators too much lately, my experience is that removing entries from a collection that you're iterating on is usually a sure way to shoot yourself in the foot :) so I may be wrong but I sense a bug somewhere in this loop...

Could you please take a look and see if there's a quick fix for this? Thanks.

--
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to