Issue 109983 - [sw] SwXDocumentIndexMark::setPropertyValue calls disposing
Summary: [sw] SwXDocumentIndexMark::setPropertyValue calls disposing
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: programming (show other issues)
Version: DEV300m73
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: mst.ooo
QA Contact: issues@sw
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-09 17:53 UTC by mst.ooo
Modified: 2013-08-07 14:44 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description mst.ooo 2010-03-09 17:53:01 UTC
found this while debugging a regression (crash) introduced by my fix for issue
107672:

calling setPropertyValue() on a SwXDocumentIndex deletes the existing mark and
then inserts a modified mark.
unfortunately the deletion will cause Invalidate to be called, which notifies
the listeners that the instance is disposed, which it actually is not.
also, Invalidate un-registers at the SwTOXType, which is probably also bad.

=>[1] SwEventListenerContainer::Disposing(this = 0x88c446c), line 106 in
"unoevtlstnr.cxx"
  [2] SwXDocumentIndexMark::Impl::Invalidate(this = 0x88c4450), line 1668 in
"unoidx.cxx"
  [3] SwXDocumentIndexMark::Impl::Modify(this = 0x88c4450, pOld = 0xefe0d02c,
pNew = 0xefe0d02c), line 1682 in "unoidx.cxx"
  [4] SwModify::Modify(this = 0x88c4acc, pOldValue = 0xefe0d02c, pNewValue =
0xefe0d02c), line 241 in "calbck.cxx"
  [5] SwTOXMark::Modify(this = 0x88c4ac0, pOld = 0xefe0d02c, pNew = 0xefe0d02c),
line 236 in "tox.cxx"
  [6] SwTOXMark::InvalidateTOXMark(this = 0x88c4ac0), line 248 in "tox.cxx"
  [7] SwTxtNode::DestroyAttr(this = 0xf20c315c, pAttr = 0x8994198), line 1174 in
"thints.cxx"
  [8] SwTxtNode::EraseText(this = 0xf20c315c, rIdx = CLASS, nCount = 1U, nMode =
INS_DEFAULT), line 2301 in "ndtxt.cxx"
  [9] SwTxtNode::DeleteAttribute(this = 0xf20c315c, pAttr = 0x8994198), line
1512 in "thints.cxx"
  [10] SwDoc::DeleteTOXMark(this = 0x88b2600, pTOXMark = 0x88c4ac0), line 204 in
"doctxm.cxx"
  [11] SwXDocumentIndexMark::Impl::DeleteTOXMark(this = 0x88c4450), line 1641 in
"unoidx.cxx"
  [12] SwXDocumentIndexMark::setPropertyValue(this = 0xefecc280, rPropertyName =
CLASS, rValue = CLASS), line 2279 in "unoidx.cxx"
Comment 1 Oliver Specht 2010-03-09 18:24:57 UTC
Subject changed, it's about the mark, not the index.
Comment 2 mst.ooo 2010-03-17 10:13:16 UTC
fixed in cws odfmetadata4:
http://hg.services.openoffice.org/hg/cws/odfmetadata4/rev/0e2f8cbf9b9a
Comment 3 mst.ooo 2010-03-17 12:20:37 UTC
.
Comment 4 mst.ooo 2010-05-28 11:45:38 UTC
.