To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=71662
Issue #|71662
Summary|strange dtor before ctor finished problem
Component|utilities
Version|OOo 2.1
Platform|All
URL|
OS/Version|Linux
Status|NEW
Status whiteboard|
Keywords|
Resolution|
Issue type|DEFECT
Priority|P3
Subcomponent|code
Assigned to|hro
Reported by|cmc
------- Additional comments from [EMAIL PROTECTED] Fri Nov 17 05:27:28 -0800
2006 -------
So I have a difficult to reproduce problem, I created a database and in base and
it crashed, now if I start base it prompts for recovery, I say no, and choose
open previous database from the base startup dialog, then I get the following
valgrind trace and a crash
==19434== Thread 6:
==19434== Invalid read of size 8
==19434== at 0xBA33040:
vos::ORef<configmgr::configapi::NotifierImpl>::operator->() const (ref.inl:135)
==19434== by 0xBA5B9F0: configmgr::configapi::ApiTreeImpl::getApiLock() const
(apitreeimplobj.cxx:492)
==19434== by 0xBA5C423:
configmgr::configapi::ApiTreeImpl::setParentTree(configmgr::configapi::ApiTreeImpl*)
(apitreeimplobj.cxx:706)
==19434== by 0xBA5C679:
configmgr::configapi::ApiTreeImpl::init(configmgr::configapi::ApiTreeImpl*)
(apitreeimplobj.cxx:672)
==19434== by 0xBA5ECEB:
configmgr::configapi::ApiTreeImpl::ApiTreeImpl(com::sun::star::uno::XInterface*,
configmgr::configapi::ApiProvider&, configmgr::configuration::TreeRef const&,
configmgr::configapi::ApiTreeImpl*) (apitreeimplobj.cxx:425)
==19434== by 0xBA51021:
configmgr::configapi::OSetElement<configmgr::configapi::NodeGroupAccess>::OSetElement(com::sun::star::uno::XInterface*,
configmgr::configuration::TreeRef const&, configmgr::configapi::ApiProvider&,
configmgr::configapi::ApiTreeImpl*) (apiaccessobj.hxx:106)
==19434== by 0xBA5323B:
configmgr::OSetElementGroupUpdate::OSetElementGroupUpdate(configmgr::configuration::TreeRef
const&, configmgr::configapi::ApiProvider&, configmgr::configapi::ApiTreeImpl*)
(groupobjects.hxx:191)
==19434== by 0xBA4BBBE:
configmgr::configapi::UpdateObjectFactory::doCreateSetElement(configmgr::configuration::ElementTree
const&, configmgr::configuration::Template*) (apifactoryimpl.cxx:340)
==19434== by 0xBA493A7:
configmgr::configapi::Factory::makeElement(configmgr::configuration::Tree
const&, configmgr::configuration::NodeRef const&) (apifactory.cxx:196)
==19434== by 0xBA494F1:
configmgr::configapi::Factory::makeUnoElement(configmgr::configuration::Tree
const&, configmgr::configuration::NodeRef const&) (apifactory.cxx:167)
==19434== by 0xBA5720B:
configmgr::configapi::makeElement(configmgr::configapi::Factory&,
configmgr::configuration::Tree const&, configmgr::configuration::AnyNodeRef
const&) (apinodeaccess.cxx:137)
==19434== by 0xBA449AA:
configmgr::configapi::implGetByName(configmgr::configapi::NodeAccess&,
rtl::OUString const&) (accessimpl.cxx:700)
==19434== Address 0x9435558 is 232 bytes inside a block of size 288 free'd
==19434== at 0x4A0541E: free (vg_replace_malloc.c:233)
==19434== by 0x3EE4238D0B: rtl_freeMemory (alloc_global.c:319)
==19434== by 0xB91B6D2: cppu::OWeakObject::operator delete(void*)
(weak.hxx:107)
==19434== by 0xBA6F156:
configmgr::OSetElementGroupUpdate::~OSetElementGroupUpdate()
(groupobjects.hxx:183)
==19434== by 0xBA4F83C:
cppu::WeakImplHelper6<com::sun::star::container::XChild,
com::sun::star::container::XNamed, com::sun::star::lang::XComponent,
com::sun::star::lang::XServiceInfo,
com::sun::star::configuration::XTemplateInstance,
com::sun::star::lang::XUnoTunnel>::release() (implbase6.hxx:126)
==19434== by 0xBA6834F: configmgr::BasicSetElement::release()
(elementaccess.cxx:84)
==19434== by 0xBA6D998: configmgr::OSetElementGroupUpdate::release()
(groupobjects.cxx:241)
==19434== by 0xB919BC5:
com::sun::star::uno::Reference<com::sun::star::uno::XInterface>::~Reference()
(Reference.hxx:115)
==19434== by 0xBA5CFFD:
configmgr::configapi::ApiTreeImpl::ComponentAdapter::disposing(com::sun::star::lang::EventObject
const&) (apitreeimplobj.cxx:214)
==19434== by 0x3EE463617C:
cppu::WeakComponentImplHelperBase::addEventListener(com::sun::star::uno::Reference<com::sun::star::lang::XEventListener>
const&) (in /usr/lib64/openoffice.org2.1/program/libuno_cppuhelpergcc3.so.3)
==19434== by 0xB91A424:
cppu::WeakComponentImplHelper1<com::sun::star::lang::XServiceInfo>::addEventListener(com::sun::star::uno::Reference<com::sun::star::lang::XEventListener>
const&) (compbase1.hxx:93)
==19434== by 0xBA6229B:
configmgr::configapi::ApiTreeImpl::ComponentAdapter::setComponent(com::sun::star::uno::Reference<com::sun::star::lang::XComponent>&,
com::sun::star::uno::Reference<com::sun::star::lang::XComponent> const&)
(apitreeimplobj.cxx:156)
What I seem to see is that in apitreeimplobj.cxx
void ApiTreeImpl::init(ApiTreeImpl* pParentTree)
{
m_xProvider = new ComponentAdapter(*this);
m_xProvider->setProvider( this->getProviderComponent() );
OSL_ENSURE(m_xProvider->getProvider().is(),"WARNING: Provider is no
Component - Lifetime trouble ahead");
OSL_ASSERT(m_pParentTree == 0);
setParentTree(pParentTree);
}
init is called from the objects constructor, setProvider is called which calls
setComponent and that calls...
if (xComp.is()) xComp->addEventListener(this);
the addEventListener is the normal...
// XComponent
void OComponentHelper::addEventListener(
const Reference<XEventListener > & rxListener )
throw(::com::sun::star::uno::RuntimeException)
{
ClearableMutexGuard aGuard( rBHelper.rMutex );
if (rBHelper.bDisposed || rBHelper.bInDispose)
{
aGuard.clear();
Reference< XInterface > x( (XComponent *)this, UNO_QUERY );
rxListener->disposing( EventObject( x ) );
}
else
{
rBHelper.addListener( ::getCppuType( &rxListener ) , rxListener
);
}
}
here though, "disposing" gets called...
void SAL_CALL
ApiTreeImpl::ComponentAdapter::disposing(com::sun::star::lang::EventObject
const& rEvt) throw()
...
this->xParent.clear();
...
and the object gets deleted before it's fully constructed, which seems somewhat
odd.
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]