diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-12-20 23:08:31 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-12-21 19:51:36 +0000 |
commit | 0cf5d53208e487f98f4351b4ca40110079914288 (patch) | |
tree | c23e4e60349abb0800012fa666755de7d2ec1b93 /sw | |
parent | a038b353af6e0658f1151613db11de90d9dda9f2 (diff) |
assert SwDrawContact unhandled attr. on exporting ooo67621-1.odt to DOCX
Check in SwModify::Remove() that unrelated clients aren't inserted into
an active SwClientIter.
Old value = (sw::WriterListener *) 0x0
New value = (SwDrawFrameFormat *) 0x72d83f0
SwModify::Remove (this=0x37fd850, pDepend=0x6ca85a8) at sw/source/core/attr/calbck.cxx:220
0 in SwModify::Remove(SwClient*) (this=0x37fd850, pDepend=0x6ca85a8) at sw/source/core/attr/calbck.cxx:220
1 in ClientModify(SwClient*, SfxPoolItem const*, SfxPoolItem const*) (pClient=0x6ca85a8, pOld=0x7ffe9d041bf0, pNew=0x7ffe9d041c10) at sw/source/core/unocore/unoobj2.cxx:326
2 in SwXShape::Modify(SfxPoolItem const*, SfxPoolItem const*) (this=0x6ca8540, pOld=0x7ffe9d041bf0, pNew=0x7ffe9d041c10) at sw/source/core/unocore/unodraw.cxx:2037
3 in SwClient::ModifyNotification(SfxPoolItem const*, SfxPoolItem const*) (this=0x6ca85a8, pOldValue=0x7ffe9d041bf0, pNewValue=0x7ffe9d041c10) at sw/inc/calbck.hxx:130
4 in SwFormat::~SwFormat() (this=0x39e6320, __in_chrg=<optimized out>) at sw/source/core/attr/format.cxx:239
5 in SwFrameFormat::~SwFrameFormat() (this=0x39e6320, __in_chrg=<optimized out>) at sw/source/core/layout/atrfrm.cxx:2519
So the SwXShape was a client of the SwFrameFormat that is deleted, then
is removed and added at the parent SwFrameFormat by ~SwFormat, then it
is removed *again* when its own Modify handles the SwFormatChg
notification, but this time it messes up the SwClientIter in ~SwFormat,
putting in a m_pPosition SwFrameFormat that is actually a client of the
parent SwFrameFormat, not the deleted one!
Thus the deleted SwFrameFormat is confused and sends a "sibling" of
itself the SwFormatChg notification and that then asserts with
dcontact.cxx:1468 "<SwDraw Contact::Modify(..)> - unhandled attribute?".
Change-Id: Ifba7fa8a1f41f09b1a3fcbb4cdf17f340e0fbe33
(cherry picked from commit 654b86cf3425d7a49b13a97e4b11223d43b9e86e)
Reviewed-on: https://gerrit.libreoffice.org/32260
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/attr/calbck.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx index 54a036bdb110..a9598b8cf082 100644 --- a/sw/source/core/attr/calbck.cxx +++ b/sw/source/core/attr/calbck.cxx @@ -219,7 +219,8 @@ SwClient* SwModify::Remove( SwClient* pDepend ) { for(auto& rIter : sw::ClientIteratorBase::our_pClientIters->GetRingContainer()) { - if( rIter.m_pCurrent == pDepend || rIter.m_pPosition == pDepend ) + if (&rIter.m_rRoot == this && + (rIter.m_pCurrent == pDepend || rIter.m_pPosition == pDepend)) { // if object being removed is the current or next object in an // iterator, advance this iterator |